/* 2026-11-26 1〜2文字だけの行を減らす（hokenkikaku bca49c2f と同じ考え方・子サイトの UI 分析）
   見出しは行の長さをそろえる（balance。Safari 17.5 以降も対応）。longhand の text-wrap-style を使い、nowrap の指定は変えない。 */
:is(h1, h2, h3, h4) { text-wrap-style: balance; }
/* 本文は Chrome 系だけ text-wrap: pretty。iPhone の Safari の pretty は段落全体の行をそろえて文の右に空きが出るので、
   Safari が持たない word-break: auto-phrase の有無で Chrome 系に限る。見出しは語の途中で切らない。 */
@supports (word-break: auto-phrase) {
  :is(h1, h2, h3, h4) { word-break: auto-phrase; }
  :is(p, li, td, th, dd, dt, figcaption, label, a, span) { text-wrap-style: pretty; }
}

/* 幅がちょうど 768px のとき、スマホ用（767px まで）と PC 用（769px から）の目次の指定がどちらも効かず、
   よくある質問の目次のリンクが折り返さずにはみ出して横スクロールが出ていた。769px からと同じ並びにする */
@media (width: 768px) {
  .related-nav--toc .related-nav__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(13em, 1fr)); gap: 6px; }
  .related-nav--toc .related-nav__item { min-width: 0; }
  .related-nav--toc .related-nav__item a { box-sizing: border-box; height: 100%; min-height: 44px; padding-inline: 4px; text-align: center; white-space: normal; word-break: keep-all; overflow-wrap: anywhere; }
}
