/* ==========================================
 * 日本語の組版（仕上げ用）
 * レイアウトは変えず、文字の並び・改行・約物の詰めだけを整える。
 * 新しいCSSは @supports で囲み、対応していないブラウザでは今まで通りの表示になる
 * ========================================== */

/* ---------- 全体 ---------- */
html:lang(ja) body{
  line-break: strict;          /* 禁則処理：「。」「、」「ー」や小さい「っ」を行頭に置かない */
  overflow-wrap: anywhere;     /* 長いURLなどで画面からはみ出さない */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* 本文の字間を少しだけ詰めて、長文を読みやすく（見出し・ボタンは個別の設定のまま） */
body{
  letter-spacing: .14em;
}

/* 段落：最後の行が1〜2文字だけになる「泣き別れ」を防ぐ */
p,
li,
dd,
.txt_desc{
  text-wrap: pretty;
}

/* ---------- 見出し・短い文字 ----------
 * 約物（「」、。）の余分な空きを詰める（palt）。
 * 本文には使わない（長文で詰めると読みにくくなるため） */
h1, h2, h3, h4,
.txt_m,
.ttl h2,
.space_ttl,
.flow_ttl,
.profile_name,
.profile_position,
.news_single_title,
.reason_body h3,
#gnav li a,
#spnav li a,
.btn1 :is(a, button),
.btn2 a,
.con_btn a,
.hd_reserve a,
.ser_post a,
.news_cats a{
  font-feature-settings: "palt" 1;
}

/* 見出しは文節（意味のまとまり）で改行し、行の長さをそろえる */
h1, h2, h3,
.txt_m,
.space_ttl,
.flow_ttl,
.news_single_title,
.news_title,
.maintxt h2{
  text-wrap: balance;
}

@supports (word-break: auto-phrase){
  h1, h2, h3,
  .txt_m,
  .space_ttl,
  .flow_ttl,
  .news_single_title,
  .news_title,
  .maintxt h2,
  .ser_post a{
    word-break: auto-phrase;
  }
}

/* 約物が連続した時（「。」」など）の空きを自動で詰める */
@supports (text-spacing-trim: normal){
  html:lang(ja) body{
    text-spacing-trim: normal;
  }
}

/* 日本語と英数字の間に自然なすき間を入れる（「4D超音波」「WEB予約」など） */
@supports (text-autospace: normal){
  html:lang(ja) body{
    text-autospace: normal;
  }
}

/* ---------- 数字 ----------
 * 日付・時間は数字の幅をそろえて、縦に並んだ時にきれいに見せる */
.date,
.news_meta .date,
.flow_step,
.cal_head h3{
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* 日付は途中で改行しない。幅は固定せず中身に合わせる */
.date{
  width: auto;
  white-space: nowrap;
}

/* ---------- 強調 ----------
 * 日本語に斜体は使わない。エディタで斜体にした所は、傍点（ゴマ点）で強調 */
.singlebox em,
.singlebox i,
.ser_detail_body em,
.ser_detail_body i,
.message_txt em{
  font-style: normal;
  text-emphasis: filled sesame;
  -webkit-text-emphasis: filled sesame;
  text-emphasis-position: over right;
  -webkit-text-emphasis-position: over right;
}

.singlebox strong,
.ser_detail_body strong,
.ser_intro_txt strong{
  font-weight: 700;
  color: #5d5448;
}

/* ---------- 本文の行間・段落 ---------- */
.singlebox,
.ser_detail_body,
.message_txt{
  line-height: 2;
}

/* 記事本文の段落は少し広めの字間で、ゆったり読ませる */
.singlebox p{
  letter-spacing: .1em;
}

/* ---------- スマホ ---------- */
@media screen and (max-width: 700px){
  body{
    letter-spacing: .08em;
  }

  /* 長い説明文は行間を少し広げて、小さい画面でも詰まって見えないように */
  .txt_desc,
  .ser_intro_txt,
  .ser_detail_body,
  .message_txt p,
  .intro_txt .txt_desc{
    line-height: 2;
  }

  /* 見出しの字間はPCより控えめに（1行に収まる文字数を増やす） */
  .txt_m,
  .space_ttl{
    letter-spacing: .12em;
  }
}
