/* 自動生成 — 直接編集しない。scripts/gen-tokens.mjs で再生成する。 */
/* ===== foundation/recipes/ja-text.css ===== */
/*!
 * foundation/recipes/ja-text.css
 * 日本語本文の line-break / word-break / overflow-wrap 基本方針
 * 適用対象: html:lang(ja), p, li, dd / 全profile共通
 * 由来: jp-ui-contracts (MIT) / recipes/ja-text.css
 */

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

body {
  text-rendering: optimizeLegibility;
}

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

:where(article, .prose, .content) p {
  max-width: 42em;
}

/* ===== foundation/recipes/headings.css ===== */
/*!
 * foundation/recipes/headings.css
 * 日本語見出しの line-break / line-height 基本方針
 * 適用対象: h1, h2, h3, h4 / 全profile共通
 * 由来: jp-ui-contracts (MIT) / recipes/headings.css
 */

:lang(ja) h1,
:lang(ja) h2,
:lang(ja) h3,
:lang(ja) h4 {
  line-break: strict;
  word-break: normal;
  overflow-wrap: anywhere;
  font-kerning: auto;
}

:lang(ja) h1 {
  line-height: 1.35;
}

:lang(ja) h2 {
  line-height: 1.4;
}

:lang(ja) h3 {
  line-height: 1.45;
}

/* ===== foundation/recipes/mixed-script.css ===== */
/*!
 * foundation/recipes/mixed-script.css
 * 日本語+英語混植の safety ルール
 * 適用対象: em, strong, a, .latin, .product-name / h1-h3 / 全profile共通
 * 注意: text-autospace は progressive enhancement（未対応環境で壊れない前提）
 * 由来: jp-ui-contracts (MIT) / recipes/mixed-script.css
 */

html:lang(ja) {
  text-autospace: normal;
}

:lang(ja) em,
:lang(ja) strong,
:lang(ja) a,
:lang(ja) .latin,
:lang(ja) .product-name {
  word-break: normal;
  overflow-wrap: anywhere;
}

:lang(ja) h1,
:lang(ja) h2,
:lang(ja) h3 {
  word-break: auto-phrase;
}

/* ===== foundation/recipes/forms.css ===== */
/*!
 * foundation/recipes/forms.css
 * 日本語フォームの line-height / overflow-wrap 基本方針
 * 適用対象: label, input, textarea, select, button / saas・dashboard profile推奨
 * 由来: jp-ui-contracts (MIT) / recipes/forms.css
 */

:lang(ja) label,
:lang(ja) input,
:lang(ja) textarea,
:lang(ja) select,
:lang(ja) button {
  line-break: strict;
  word-break: normal;
}

:lang(ja) input,
:lang(ja) textarea,
:lang(ja) select {
  line-height: 1.5;
}

:lang(ja) .form-help,
:lang(ja) .form-error {
  line-height: 1.5;
  overflow-wrap: anywhere;
}
