:lang(zh-CN) {
  font-family: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Noto Sans", sans-serif;
}

:lang(zh-CN) h1,
:lang(zh-CN) h2,
:lang(zh-CN) h3,
:lang(zh-CN) h4,
:lang(zh-CN) button,
:lang(zh-CN) .button,
:lang(zh-CN) .sg-button {
  font-family: "Space Grotesk", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

.locale-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex: 0 0 auto;
  padding: 0.48rem 0.72rem;
  border: 1px solid rgba(24, 60, 48, 0.16);
  border-radius: 999px;
  color: #315a42;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.locale-switch a {
  color: inherit;
  text-decoration: none;
}

.locale-switch a[aria-current="page"] {
  color: #163d30;
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.site-header > .locale-switch {
  margin-inline: 0.4rem;
}

.site-footer > .locale-switch {
  margin-left: auto;
}

.sg-header .locale-switch {
  margin-left: auto;
}

@media (max-width: 760px) {
  .site-header > .locale-switch {
    position: absolute;
    right: 4.5rem;
    top: 50%;
    transform: translateY(-50%);
  }

  .site-footer > .locale-switch {
    grid-column: 1 / -1;
    justify-self: start;
    margin: 0;
  }

  .sg-header .locale-switch {
    margin: 0.35rem 0;
  }
}
