/* KOWRAP0071: Korean UI copy wraps at word boundaries, with a long-token escape. */
:where(html:lang(ko)) {
  word-break: keep-all;
  overflow-wrap: anywhere;
}

/* The mobile conversation uses the same stylesheet inside its shadow root. */
:host(:lang(ko)) {
  word-break: keep-all;
  overflow-wrap: anywhere;
}

:where(:lang(ko)) :where(h1, h2, h3, h4, .synopsis strong, .preview-title) {
  text-wrap: balance;
}

:where(:lang(ko)) :where(p, li, dd, .note, .description) {
  text-wrap: pretty;
}

/* Keep deliberate line breaks/spaces and stable wrapping while editing. */
:where(:lang(ko)) :where(textarea, .message p, .user p, .reply p) {
  white-space: pre-wrap;
  text-wrap: wrap;
}

/* Technical text uses its existing whitespace/scrolling rather than title balance. */
:where(:lang(ko)) :where(pre, code, kbd, samp) {
  word-break: normal;
  text-wrap: wrap;
}

:where(:lang(ko)) :where(.phase, .badge, .primary-nav-item, .header-button, #send, #full, #connect, #check) {
  white-space: nowrap;
}
