.lang-switcher {
  position: absolute;
  top: 0;
  right: 5.5rem;
  z-index: 21;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  height: var(--header-height, 120px);
  padding: 0 1rem;
  font-family: "Noto Sans TC", "Noto Sans JP", sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: height 0.5s ease;
}

.lang-switcher__btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  padding: 0.2rem 0.35rem;
  cursor: pointer;
  line-height: 1.4;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.lang-switcher__btn:hover,
.lang-switcher__btn:focus-visible {
  color: #fff;
  outline: none;
}

.lang-switcher__btn.is-active {
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.lang-switcher__sep {
  color: rgba(255, 255, 255, 0.45);
  user-select: none;
  pointer-events: none;
}

body:not(.page-home) .lang-switcher {
  background: transparent;
}

body:not(.page-home) .lang-switcher__btn {
  color: rgba(255, 255, 255, 0.85);
}

@media (max-width: 767.98px) {
  .lang-switcher {
    right: 4.5rem;
    height: auto;
    top: 1.25rem;
    padding: 0;
    font-size: 0.75rem;
    gap: 0.2rem;
  }

  .lang-switcher__btn {
    padding: 0.15rem 0.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lang-switcher,
  .lang-switcher__btn {
    transition: none;
  }
}
