.language-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: .25rem .6rem;
  padding: .35rem 1rem;
  font: 500 .8rem/1.4 system-ui, sans-serif;
  color: inherit;
}
.language-menu a {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .25rem .4rem;
  color: inherit;
  text-decoration: none;
  border-radius: .3rem;
}
.language-menu img { object-fit: contain; }
.language-menu a:hover, .language-menu a[aria-current] { outline: 1px solid currentColor; }
@media (max-width: 640px) {
  .language-menu { justify-content: center; gap: .1rem .25rem; padding-inline: .4rem; }
}

/* Let translated headings, long buttons and East Asian text fit narrow screens. */
html:not(:lang(ko)) :is(h1, h2, h3, .site-intro p, .site-section p, .feature-notes dd,
  .site-onboarding li span, .site-faq p, .guide-intro, .guide-steps, .guide-definitions, .guide-section p) {
  word-break: normal;
  overflow-wrap: anywhere;
}
html:not(:lang(ko)) :is(.button, .cloud-check) {
  white-space: normal;
  max-width: 100%;
}
html:not(:lang(ko)) .site-intro { min-width: 0; }
html:not(:lang(ko)) .transfer-panel { grid-template-columns: minmax(0, 1fr); }
html:lang(ja) { font-family: "Noto Sans JP", "Noto Sans CJK JP", "Yu Gothic", sans-serif; }
html:lang(zh-TW) { font-family: "Noto Sans TC", "Noto Sans CJK TC", "Microsoft JhengHei", sans-serif; }
html:lang(zh-HK) { font-family: "Noto Sans HK", "Noto Sans CJK HK", "Microsoft JhengHei", sans-serif; }
