.top,
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-card-strong) 86%, transparent);
  backdrop-filter: blur(14px);
}

.top-inner,
.site-header-inner {
  width: min(1440px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 430px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.site-header-inner {
  height: 100%;
}

.brand {
  display: flex;
  align-items: center;
  color: var(--accent-2, #173633);
  text-decoration: none;
  white-space: nowrap;
  font-family: "SF Pro Text", "PingFang SC", "Noto Sans SC", sans-serif;
}

.brand-mark {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  background: var(--accent, var(--brand, #204f4a));
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}

.brand-type {
  margin-left: 10px;
  color: var(--ink, var(--text, #171714));
  font-size: 18px;
  font-weight: 900;
  letter-spacing: .16em;
}

.brand-divider {
  height: 16px;
  margin: 0 12px;
  border-left: 1px solid #cbd5e1;
}

.brand-slogan {
  color: var(--nav-slogan, #94a3b8);
  font-size: 14px;
  font-weight: 300;
  letter-spacing: .06em;
}

.wave-locale-switcher--v1 {
  position: relative;
  width: 34px !important;
  min-width: 34px !important;
  max-width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  max-height: 34px !important;
  flex: 0 0 34px !important;
  overflow: visible !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--locale-action-color, #3e3a32) !important;
  isolation: isolate;
  z-index: 3000;
}

.wave-locale-switcher--v1 .locale-globe-trigger {
  box-sizing: border-box;
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  min-height: 34px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  border: 1px solid rgba(40,40,30,.28) !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: inherit !important;
  cursor: pointer !important;
  line-height: 1 !important;
  box-shadow: none !important;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.wave-locale-switcher--v1 .locale-globe-trigger svg {
  width: 17px;
  height: 17px;
  display: block;
  flex: 0 0 17px;
  margin: auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.wave-locale-switcher--v1.open .locale-globe-trigger,
.wave-locale-switcher--v1 .locale-globe-trigger:hover,
.wave-locale-switcher--v1 .locale-globe-trigger:focus-visible {
  border-color: rgba(156,124,61,.46) !important;
  background: transparent !important;
  color: #2f2a22 !important;
  outline: none !important;
  box-shadow: none !important;
}

.wave-locale-switcher--v1 .locale-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 3000;
  min-width: 132px;
  max-width: min(220px, calc(100vw - 24px));
  display: none !important;
  gap: 4px;
  padding: 6px;
  border: 1px solid rgba(40,40,30,.14);
  border-radius: 8px;
  background: #f6f2e8 !important;
  color: var(--text, #171714);
  opacity: 1 !important;
  pointer-events: auto;
  box-shadow: 0 18px 42px rgba(37,47,41,.16);
}

.wave-locale-switcher--v1 .locale-menu[hidden] {
  display: none !important;
}

.wave-locale-switcher--v1.open .locale-menu {
  display: grid !important;
}

.wave-locale-switcher--v1 .locale-menu button,
.wave-locale-switcher--v1 .locale-menu a,
.wave-locale-switcher--v1 .locale-menu span {
  box-sizing: border-box;
  width: 100% !important;
  min-height: 32px;
  display: flex !important;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  border: 0 !important;
  border-radius: 6px !important;
  padding: 0 9px !important;
  background: transparent !important;
  color: inherit !important;
  font-family: "SF Pro Text", "PingFang SC", "Noto Sans SC", system-ui, sans-serif !important;
  font-size: 12px !important;
  font-weight: 720 !important;
  line-height: 1 !important;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.wave-locale-switcher--v1 .locale-menu span {
  cursor: default;
}

.wave-locale-switcher--v1 .locale-menu [data-locale-unavailable="true"] {
  cursor: not-allowed;
  opacity: .42;
}

.wave-locale-switcher--v1 .locale-menu button:hover,
.wave-locale-switcher--v1 .locale-menu button:focus-visible,
.wave-locale-switcher--v1 .locale-menu button.active,
.wave-locale-switcher--v1 .locale-menu a:hover,
.wave-locale-switcher--v1 .locale-menu a:focus-visible,
.wave-locale-switcher--v1 .locale-menu a.active,
.wave-locale-switcher--v1 .locale-menu span[aria-current="page"] {
  background: rgba(174,160,128,.14) !important;
  color: #4a4234 !important;
}

.wave-locale-switcher--v1 .locale-menu button.active::after,
.wave-locale-switcher--v1 .locale-menu a.active::after,
.wave-locale-switcher--v1 .locale-menu [aria-current="page"]::after {
  content: "";
  width: 5px;
  height: 5px;
  display: block;
  flex: 0 0 5px;
  margin-left: auto;
  border-radius: 999px;
  background: rgba(156,124,61,.78);
}

html[data-theme="dark"] .wave-locale-switcher--v1 {
  color: rgba(241,234,220,.86) !important;
}

html[data-theme="dark"] .wave-locale-switcher--v1 .locale-globe-trigger {
  border-color: rgba(238,232,218,.28) !important;
  background: transparent !important;
}

html[data-theme="dark"] .wave-locale-switcher--v1.open .locale-globe-trigger,
html[data-theme="dark"] .wave-locale-switcher--v1 .locale-globe-trigger:hover,
html[data-theme="dark"] .wave-locale-switcher--v1 .locale-globe-trigger:focus-visible {
  border-color: rgba(198,178,113,.46) !important;
  background: transparent !important;
  color: rgba(245,241,232,.92) !important;
}

html[data-theme="dark"] .wave-locale-switcher--v1 .locale-menu {
  border-color: rgba(238,232,218,.14);
  background: #161616 !important;
  color: rgba(241,234,220,.86);
  box-shadow: 0 18px 42px rgba(0,0,0,.32);
}

html[data-theme="dark"] .wave-locale-switcher--v1 .locale-menu button:hover,
html[data-theme="dark"] .wave-locale-switcher--v1 .locale-menu button:focus-visible,
html[data-theme="dark"] .wave-locale-switcher--v1 .locale-menu button.active,
html[data-theme="dark"] .wave-locale-switcher--v1 .locale-menu a:hover,
html[data-theme="dark"] .wave-locale-switcher--v1 .locale-menu a:focus-visible,
html[data-theme="dark"] .wave-locale-switcher--v1 .locale-menu a.active,
html[data-theme="dark"] .wave-locale-switcher--v1 .locale-menu span[aria-current="page"] {
  background: rgba(174,160,128,.10) !important;
  color: rgba(245,241,232,.94) !important;
}

html[data-theme="dark"] .wave-locale-switcher--v1 .locale-menu [data-locale-unavailable="true"] {
  color: rgba(187,178,161,.52) !important;
  opacity: .46;
}

html[data-theme="dark"] .wave-locale-switcher--v1 .locale-menu button.active::after,
html[data-theme="dark"] .wave-locale-switcher--v1 .locale-menu a.active::after,
html[data-theme="dark"] .wave-locale-switcher--v1 .locale-menu [aria-current="page"]::after {
  background: rgba(198,178,113,.78);
}

html[data-theme="dark"] .intro-shell .wave-locale-switcher--v1 {
  color: var(--locale-action-color, #3e3a32) !important;
}

html[data-theme="dark"] .intro-shell .wave-locale-switcher--v1 .locale-globe-trigger {
  border-color: rgba(40,40,30,.28) !important;
  background: transparent !important;
}

html[data-theme="dark"] .intro-shell .wave-locale-switcher--v1.open .locale-globe-trigger,
html[data-theme="dark"] .intro-shell .wave-locale-switcher--v1 .locale-globe-trigger:hover,
html[data-theme="dark"] .intro-shell .wave-locale-switcher--v1 .locale-globe-trigger:focus-visible {
  border-color: rgba(156,124,61,.46) !important;
  background: transparent !important;
  color: #2f2a22 !important;
}

html[data-theme="dark"] .intro-shell .wave-locale-switcher--v1 .locale-menu {
  border-color: rgba(40,40,30,.14);
  background: #f6f2e8 !important;
  color: var(--text, #171714);
  box-shadow: 0 18px 42px rgba(37,47,41,.16);
}

html[data-theme="dark"] .intro-shell .wave-locale-switcher--v1 .locale-menu button:hover,
html[data-theme="dark"] .intro-shell .wave-locale-switcher--v1 .locale-menu button:focus-visible,
html[data-theme="dark"] .intro-shell .wave-locale-switcher--v1 .locale-menu button.active,
html[data-theme="dark"] .intro-shell .wave-locale-switcher--v1 .locale-menu a:hover,
html[data-theme="dark"] .intro-shell .wave-locale-switcher--v1 .locale-menu a:focus-visible,
html[data-theme="dark"] .intro-shell .wave-locale-switcher--v1 .locale-menu a.active,
html[data-theme="dark"] .intro-shell .wave-locale-switcher--v1 .locale-menu span[aria-current="page"] {
  background: rgba(174,160,128,.14) !important;
  color: #4a4234 !important;
}

html[data-theme="dark"] .intro-shell .wave-locale-switcher--v1 .locale-menu button.active::after,
html[data-theme="dark"] .intro-shell .wave-locale-switcher--v1 .locale-menu a.active::after,
html[data-theme="dark"] .intro-shell .wave-locale-switcher--v1 .locale-menu [aria-current="page"]::after {
  background: rgba(156,124,61,.78);
}

.site-actions [data-locale-switcher],
.top-actions [data-locale-switcher],
.topline-right [data-locale-switcher] {
  order: 10 !important;
}

.site-actions .site-theme-toggle,
.site-actions .theme-switch,
.top-actions .site-theme-toggle,
.top-actions .theme-switch,
.topline-right .site-theme-toggle,
.topline-right .theme-switch {
  order: 20 !important;
}

.site-actions .top-login,
.site-actions .login-button,
.site-actions .account,
.site-actions .account-menu,
.site-actions #accountEntry,
.site-actions #avatar,
.top-actions .top-login,
.top-actions .login-button,
.top-actions .account,
.top-actions .account-menu,
.top-actions #accountEntry,
.top-actions #avatar {
  order: 90 !important;
}

.site-actions #globalSearchEntry,
.top-actions #globalSearchEntry {
  order: 5 !important;
}

.site-actions #adminEntry,
.top-actions #adminEntry {
  order: 80 !important;
}

.wave-mobile-menu-button,
.wave-mobile-menu-panel {
  display: none !important;
}

.wave-mobile-menu-panel.open {
  display: none !important;
}

.wave-pwa-install-hint {
  position: fixed;
  right: 14px;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  z-index: 2600;
  width: min(360px, calc(100vw - 28px));
  display: none;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(40,40,30,.14);
  border-radius: 12px;
  background: #f6f2e8;
  color: #171714;
  box-shadow: 0 18px 42px rgba(37,47,41,.18);
}

.wave-pwa-install-hint.is-visible {
  display: grid;
}

.wave-pwa-install-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.wave-pwa-install-copy strong {
  font-size: 13px;
  line-height: 1.25;
}

.wave-pwa-install-copy span {
  color: rgba(87,84,76,.76);
  font-size: 12px;
  line-height: 1.35;
}

.wave-pwa-install-actions {
  display: inline-flex;
  gap: 6px;
}

.wave-pwa-install-actions button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(40,40,30,.14);
  border-radius: 8px;
  background: rgba(255,253,248,.72);
  color: inherit;
  font-size: 12px;
  font-weight: 720;
}

html[data-theme="dark"] .wave-pwa-install-hint {
  border-color: rgba(238,232,218,.14);
  background: #191d19;
  color: rgba(241,234,220,.90);
  box-shadow: 0 18px 42px rgba(0,0,0,.34);
}

html[data-theme="dark"] .wave-pwa-install-copy span {
  color: rgba(241,234,220,.66);
}

html[data-theme="dark"] .wave-pwa-install-actions button {
  border-color: rgba(238,232,218,.14);
  background: rgba(255,253,248,.055);
  color: rgba(241,234,220,.86);
}

@media (max-width: 760px) {
  .top,
  .site-header {
    padding: 0 14px;
  }

  .top-inner,
  .site-header-inner {
    display: flex;
    justify-content: space-between;
  }

  .brand-divider,
  .brand-slogan {
    display: none !important;
  }

  .site-actions,
  .top-actions,
  .topline-right {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important;
  }

  .site-actions [data-locale-switcher],
  .top-actions [data-locale-switcher],
  .topline-right [data-locale-switcher] {
    order: 10 !important;
  }

  .site-actions .site-theme-toggle,
  .top-actions .site-theme-toggle,
  .topline-right .site-theme-toggle {
    order: 20 !important;
  }

  .site-actions .wave-mobile-menu-button,
  .top-actions .wave-mobile-menu-button,
  .topline-right .wave-mobile-menu-button {
    order: 30 !important;
  }

  .site-actions > .site-action,
  .top-actions > .site-action,
  .topline-right > .site-action {
    display: none !important;
  }

  .wave-mobile-menu-button {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    display: inline-flex !important;
    flex: 0 0 34px !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    padding: 0 !important;
    border: 1px solid rgba(40,40,30,.12) !important;
    border-radius: 999px !important;
    background: rgba(243,241,234,.72) !important;
    color: var(--brand, var(--accent, #204f4a)) !important;
  }

  .wave-mobile-menu-button span {
    width: 13px;
    height: 1px;
    display: block;
    border-radius: 999px;
    background: currentColor;
  }

  .wave-mobile-menu-panel {
    position: fixed !important;
    right: 12px !important;
    left: 12px !important;
    top: calc(64px + env(safe-area-inset-top) + 8px) !important;
    z-index: 2400 !important;
    max-height: calc(100dvh - 84px) !important;
    display: none !important;
    overflow-y: auto !important;
    padding: 12px !important;
    border: 1px solid rgba(216,209,195,.78) !important;
    border-radius: 14px !important;
    background: #f6f2e8 !important;
    color: #171714 !important;
    box-shadow: 0 16px 46px rgba(37,47,41,.14) !important;
  }

  .wave-mobile-menu-panel.open {
    display: grid !important;
    gap: 10px !important;
  }

  .wave-mobile-menu-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    padding: 2px 2px 8px;
    border-bottom: 1px solid rgba(216,209,195,.58);
  }

  .wave-mobile-menu-head span,
  .wave-mobile-menu-head small {
    font-family: "SF Mono", "Roboto Mono", Consolas, monospace;
    font-size: 9px;
    font-weight: 760;
    letter-spacing: .12em;
    line-height: 1.25;
    text-transform: uppercase;
  }

  .wave-mobile-menu-list {
    display: grid;
    gap: 1px;
  }

  .wave-mobile-menu-link {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px;
    border-bottom: 1px solid rgba(216,209,195,.38);
    color: #4f5f59;
    font-size: 14px;
    font-weight: 760;
    text-decoration: none;
  }

  .wave-locale-switcher--v1 {
    z-index: 3000;
  }

  .wave-locale-switcher--v1 .locale-menu {
    right: auto !important;
    left: 50% !important;
    max-width: calc(100vw - 24px) !important;
    transform: translateX(-50%);
  }

  html[data-theme="dark"] .wave-mobile-menu-button {
    border-color: rgba(238,232,218,.12) !important;
    background: rgba(255,253,248,.06) !important;
    color: rgba(241,234,220,.78) !important;
  }

  html[data-theme="dark"] .wave-mobile-menu-panel {
    border-color: rgba(238,232,218,.14) !important;
    background: #191d19 !important;
    color: rgba(241,234,220,.90) !important;
    box-shadow: 0 18px 42px rgba(0,0,0,.34) !important;
  }
}
