/* 制作サンプル共通の日本語の文字組み。
   文節の途中や、文末の1〜2文字だけで改行されるのを防ぐ。
   各ページの style 属性（インライン）の指定のほうが優先される。 */
:lang(ja) :is(h1, h2, h3, h4, h5, h6, p, li, dt, dd, td, th, figcaption, label, a, button, span, small, strong, em) {
  word-break: auto-phrase;   /* 文節の切れ目で改行（Chrome・Edge。lang="ja" が必要） */
  overflow-wrap: break-word; /* 文節が長すぎて入らないときだけ、途中で折り返す */
  line-break: strict;        /* 行頭の小書き文字・句読点を避ける */
}
:is(h1, h2, h3, h4, h5, h6, dt, th, figcaption, button) {
  text-wrap: balance;        /* 見出しの行の長さをそろえる */
}
:is(p, li, dd, td) {
  text-wrap: pretty;         /* 段落の最後の行が1〜2文字にならないようにする */
}
/* ロゴの「®」だけが次の行に落ちないようにする */
:has(> sup) { white-space: nowrap; }
