/* HOPPA · UI languages (src/i18n/strings.js). <html lang> is the active language (en · ja · zh-Hant · zh-Hans · ko · fr · es).
   CJK glyphs: the display face (Titan One) gets per-language CJK faces from strings.js (applyFonts: Zen Maru Gothic for
   Japanese, Huninn for Traditional Chinese, a local bold SC face for Simplified); body text (Rubik) falls back to the
   system sans-serif, which <html lang> steers to the JP / TC / SC glyph forms. Here: the spacing those scripts need. */

/* CJK: the wide Latin tracking of the caps labels reads as gaps between ideographs — tighten it (the HOPPA wordmark
   and key caps keep theirs); running text gets a little more line height */
html:is(:lang(ja), :lang(zh-Hant), :lang(zh-Hans), :lang(ko)) #ui-root :not(.hp-logo, .hp-logo *, .iw-logo, .iw-logo *, kbd, .iw-key) { letter-spacing: .02em !important; }
html:is(:lang(ja), :lang(zh-Hant), :lang(zh-Hans), :lang(ko)) #ui-root :is(.iw-rule__text, .iw-modal__text, .iw-tip__text, .pz-prof__hint, .hs-row__help, .iw-head__sub, .iw-main__desctext,
  .pz-card__blurb, .pz-note, .pz-toast__text, .pz-line__txt, .pz-popup__line, .pz-fm__empty, .pz-loc__status, .pz-note__text, .iw-cred__lead, .iw-cred__sec p) { line-height: 1.45; }
html:is(:lang(ja), :lang(zh-Hant), :lang(zh-Hans), :lang(ko)) body { font-synthesis: none; }   /* (no faux bold / italic on CJK faces) */
/* Korean: lines break at the spaces between words, never inside one (노점 must not split into 노 / 점); a word longer than
   its box still breaks rather than overflow */
html:lang(ko) #ui-root, html:lang(ko) #hp-boot, html:lang(ko) #hp-rotate { word-break: keep-all; overflow-wrap: break-word; }

/* fixed-width labels: never wrap a word (ダッシュ must not split into ダッシ / ュ); the war HUD's HP / DASH column is a
   little wider outside English so both bars still start on one line */
#ui-root :is(.pz-war__lbl, .pz-bd__lbl, .pz-popup__lbl, .hs-tab, .pz-war__chip, .iw-hint__label, .pz-tod__lab, .iw-btn__label, .pz-fr__chip, .hs-link) { white-space: nowrap; }
html:not(:lang(en)) #ui-root .pz-war__lbl { width: calc(var(--u) * 5.4); }
/* the top bar's key chips ("Clic derecho", 右クリック) stay one line */
#ui-root .pz-bd__key { white-space: nowrap; }
