/* jp-typography.css
 * 日本語UI向け共通契約（jp-ui-contracts の recipes を集約）
 * - 本文の字間は normal を既定とし、letter-spacing をやみくもに広げない
 * - line-break/word-break は明示し、ブラウザ既定に丸投げしない
 * - mixed-script の見出しは word-break: auto-phrase で自然な分割を期待
 * - 表・フォームは本文ルールから分離
 */

html:lang(ja),
html {
  line-break: strict;
  word-break: normal;
  overflow-wrap: anywhere;
  font-kerning: auto;
  font-feature-settings: normal;
  text-rendering: optimizeLegibility;
}

p, li, dd, dt {
  line-break: strict;
  word-break: normal;
  overflow-wrap: anywhere;
  letter-spacing: normal;
}

/* 見出し：mixed-script を含む可能性があるため auto-phrase を試行 */
h1, h2, h3, h4 {
  line-break: strict;
  word-break: auto-phrase;
  overflow-wrap: anywhere;
  font-kerning: auto;
}

/* リンク・固有名詞・英単語の overflow 対策（本文ルールを壊さない範囲で） */
a, em, strong, .latin, .product-name {
  word-break: normal;
  overflow-wrap: anywhere;
}

/* 表・フォームは本文の line-height/letter-spacing を引きずらない */
table, th, td {
  line-height: 1.5;
  letter-spacing: normal;
  word-break: normal;
  overflow-wrap: anywhere;
}

label, input, textarea, select, button {
  line-break: strict;
  word-break: normal;
  letter-spacing: normal;
}

input, textarea, select {
  line-height: 1.5;
}

.form-help, .form-error {
  line-height: 1.6;
  overflow-wrap: anywhere;
}
