/* 2026-11-26 全ページ UI 分析（PC・スマホ）の修正 */

/* 1〜2文字だけの行を減らす。
   見出しと中央寄せの短い文は、行の長さをそろえる（balance。Safari 17.5 以降も対応）。
   longhand の text-wrap-style を使い、white-space: nowrap の指定（text-wrap-mode）は変えない。 */
main :is(h1, h2, h3, h4),
main :is(.section__subtitle, .result-box__text) { text-wrap-style: balance; }

/* 本文は Chrome 系だけ text-wrap: pretty にする。
   iPhone の Safari の pretty は段落全体の行の長さをそろえて文の右に空きが出る（2026-11-20 に外した理由）ので、
   Safari が持たない word-break: auto-phrase の有無で Chrome 系に限る。 */
@supports (word-break: auto-phrase) {
  main :is(p, li, td, th, dd, dt, figcaption, label, a, span) { text-wrap-style: pretty; }
}

/* 改行させたくない語のまとまり（mobile-wrap-fix を読まないページでも効かせる） */
.wrap-unit { white-space: nowrap; }

/* パンくず：区切りの「/」を次の項目と一緒に折り返す（行末と行頭の両方に「/」が来ていた） */
.page-hero__crumb { display: inline-flex; align-items: center; gap: var(--space-sm); min-width: 0; max-width: 100%; white-space: nowrap; }

/* ヘッダーの「LINE相談」：見た目は変えず、押せる範囲を高さ 44px まで広げる（スマホで 30px だった） */
@media (max-width: 768px) {
  .header-line-btn { position: relative; }
  .header-line-btn::after { content: ""; position: absolute; inset: -7px -2px; }
}

/* 個人情報の取扱い：スマホで見出し行を縦に積むと、どの欄の中身か分からなかった。各欄の頭に見出しを出す */
@media (width <= 480px) {
  .info-table--labeled thead { display: none; }
  .info-table--labeled td[data-label]::before {
    content: attr(data-label); display: block; margin-bottom: 4px;
    font-size: 14px; font-weight: 700; line-height: 1.5; color: var(--color-primary-dark, #1e6b4a);
  }
}

/* 完了画面などの短い文：<wbr> を入れた文は、その位置でだけ折り返す（行をそろえると「担／当者」のように語の途中で切れた） */
.result-box__text:has(wbr) { word-break: keep-all; overflow-wrap: anywhere; }

/* PC のリスク系ページ：手順カードの枠が 1136px で中身が 760px のため、左の緑の縁と文字が約190px離れていた。枠を中身に合わせる */
@media (min-width: 1024px) {
  .content__inner--wide > .risk-card { max-width: 920px; margin-inline: auto; }
}

/* 業種カード：同じ段で見出しが1行と2行に分かれ、本文の始まりが約28pxずれていた。見出しを2行分の高さにそろえる */
@media (min-width: 768px) {
  .industry-grid .industry-card__title { min-height: 2lh; }
}

/* 完了画面・404 のボタン：紺の枠をブランドの濃い緑にそろえる（ほかのページのボタンは緑と黄土色） */
.result-box__actions .btn--outline-dark { border-color: var(--color-primary-dark); color: var(--color-primary-dark); }
.result-box__actions .btn--outline-dark:hover { background: var(--color-primary-dark); color: #fff; }
