:root {
  --site-header-height: 80px;
  --site-header-width: 1400px;
  --site-header-gutter: clamp(16px, 3vw, 32px);
  --site-header-account-width: 174px;
}
html:has(body > .site-header, body > .mast) {
  scroll-padding-top: calc(var(--site-header-height) + 12px);
  scrollbar-gutter: stable;
}

body > :is(.site-header, .mast) {
  position: sticky;
  top: 0;
  z-index: 60;
  background: #0a2657;
  color: #fff;
  box-shadow: 0 1px 0 #ffffff1a;
  border: 0;
}
.site-header > .site-header-row, body > .mast > .shell {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: clamp(12px, 3vw, 38px);
  width: min(var(--site-header-width), 100% - 2 * var(--site-header-gutter));
  max-width: none;
  height: var(--site-header-height);
  min-height: 0;
  margin-inline: auto;
  padding: 0;
  border: 0;
  background: none;
  font: 600 14px/1.4 system-ui, "Noto Sans Thai", sans-serif;
}

:is(.site-header, .mast) .brand {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}
:is(.site-header, .mast) .brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}
:is(.site-header, .mast) .brand > span {
  font: 800 24px/1.12 system-ui, "Noto Sans Thai", sans-serif;
  letter-spacing: -.04em;
}
:is(.site-header, .mast) .brand small {
  display: block;
  font: 500 10px/1.35 system-ui, "Noto Sans Thai", sans-serif;
  letter-spacing: 0;
}

.site-header .site-header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  flex: none;
  gap: 12px;
}
.site-header .site-header-account {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 var(--site-header-account-width);
}
.site-header .site-header-language {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid #ffffff40;
  border-radius: 24px;
}
.site-header .site-header-language button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 27px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  font: 600 11px/1 system-ui, sans-serif;
  color: #c4d6f8;
  background: transparent;
}
.site-header .site-header-language [aria-pressed="true"] {
  color: #fff;
  background: #ffffff1a;
}
.site-header .mobile-nav:not([hidden]) {
  top: calc(100% + 4px);
  left: var(--site-header-gutter);
  right: var(--site-header-gutter);
  max-height: calc(100dvh - var(--site-header-height) - 12px);
  overflow: auto;
}

@media (max-width: 1100px) {
  :root { --site-header-account-width: 125px; }
  .site-header .brand img, .mast .brand img { width: 38px; height: 38px; }
}
@media (max-width: 700px) {
  :root {
    --site-header-height: 68px;
    --site-header-account-width: 106px;
  }
  .site-header > .site-header-row, body > .mast > .shell { gap: 8px; }
  .site-header .site-header-actions { gap: 8px; }
  :is(.site-header, .mast) .brand img { width: 34px; height: 34px; }
  :is(.site-header, .mast) .brand > span { font-size: 21px; }
  :is(.site-header, .mast) .brand small { display: none; }
  .site-header .site-header-language button { width: 25px; height: 25px; }
}
@media (max-width: 390px) {
  :root {
    --site-header-gutter: 12px;
    --site-header-account-width: 99px;
  }
  .site-header > .site-header-row { gap: 5px; }
  .site-header .site-header-actions { gap: 5px; }
  .site-header .brand { gap: 4px; }
  .site-header .brand img { width: 30px; height: 30px; }
  .site-header .brand > span { font-size: 19px; }
  .site-header .mobile-menu { width: 31px; height: 36px; }
  .site-header .site-header-language button { width: 23px; height: 24px; }
}
