.language-switcher {
  position: fixed;
  top: max(0.75rem, env(safe-area-inset-top));
  left: 50%;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0.18rem;
  padding: 0.22rem;
  border: 1px solid rgba(244, 238, 221, 0.24);
  border-radius: var(--radius-pill);
  background: rgba(30, 36, 26, 0.68);
  box-shadow: 0 0.8rem 2.5rem rgba(13, 17, 11, 0.22);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transform: translateX(-50%);
}

.language-switcher__button {
  min-width: 2.65rem;
  min-height: 2rem;
  padding: 0.42rem 0.66rem;
  border: 0;
  border-radius: var(--radius-pill);
  color: rgba(247, 241, 224, 0.72);
  background: transparent;
  font-family: "DM Sans", "Microsoft YaHei", "PingFang SC", "PingFang TC", sans-serif;
  font-size: 0.64rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.05em;
  white-space: nowrap;
  transition: color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.language-switcher__button:hover,
.language-switcher__button:focus-visible {
  color: #fffaf0;
  background: rgba(255, 255, 255, 0.1);
}

.language-switcher__button.is-active {
  color: #2e3528;
  background: #f3ead5;
  box-shadow: 0 0.35rem 1rem rgba(10, 14, 9, 0.2);
}

html[lang="zh-CN"] body,
html[lang="zh-TW"] body {
  font-family: "DM Sans", "Microsoft YaHei", "PingFang SC", "PingFang TC", sans-serif;
}

html[lang="zh-CN"] h1,
html[lang="zh-CN"] h2,
html[lang="zh-CN"] h3,
html[lang="zh-CN"] em,
html[lang="zh-TW"] h1,
html[lang="zh-TW"] h2,
html[lang="zh-TW"] h3,
html[lang="zh-TW"] em {
  font-family: "Cormorant Garamond", "Songti SC", "PMingLiU", serif;
  font-style: normal;
  letter-spacing: 0.015em;
}

html[lang="zh-CN"] .section-heading h2,
html[lang="zh-TW"] .section-heading h2 {
  line-height: 1.14;
}

html[lang="zh-CN"] .eyebrow,
html[lang="zh-CN"] .section-number,
html[lang="zh-TW"] .eyebrow,
html[lang="zh-TW"] .section-number {
  letter-spacing: 0.14em;
}

@media (max-width: 389px) {
  .language-switcher {
    top: max(0.6rem, env(safe-area-inset-top));
  }

  .language-switcher__button {
    min-width: 2.35rem;
    padding-inline: 0.5rem;
    font-size: 0.59rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .language-switcher__button {
    transition: none;
  }
}
