/* 読みやすさの共通規則（2026-10-01）。改行位置・行間・要素どうしの余白を全ページでそろえる。
   各ページの CSS より後に読み込み、同じ @layer pages の中で上書きする。個別ページの見た目の調整はここへ足さず、各ページの CSS に書く。 */
@layer pages {
/* 改行位置：見出しと短い一文は文節の切れ目で折り返し、最終行に1〜2文字だけ残さない。
   word-break: auto-phrase は Chromium だけが解釈し、Safari・Firefox は text-wrap: balance だけが効く（どちらも未対応なら従来どおり）。 */
:where(h1, h2, h3, h4, summary, legend, figcaption, dt, .button, .section-index, .form-title, .account-tiles strong) { text-wrap: balance; word-break: auto-phrase; }
/* 短い導入文は文節で折り返す。行の長さをそろえる balance は文節の切れ目より優先されて「命式／を」のように切れるため、ここでは使わない */
:where(.section-heading p, .account-heading p, .fortune-heading p, .about-hero > p, .features-hero > p) { text-wrap: pretty; word-break: auto-phrase; }
/* 改行で区切っていた導入文は1行ずつ .lead-line で包む。行ごとに長さをそろえるため（<br> の区切りには balance が効かない） */
.lead-line { display: block; text-wrap: balance; word-break: auto-phrase; }
/* 1行に2文あるときは、文ごとに丸ごと次の行へ送る（文の途中で切らない） */
.phrase { display: inline-block; }
/* 文中のリンクは途中で折り返さず、一続きで読めるようにする（長い本文リンクは対象外） */

/* 説明文と、その下のボタン・選択肢の間を空ける（密着していた箇所の是正） */
.member-card > :is(p, .field-help) + :is(.button, .member-actions, .member-toolbar, .account-tiles) { margin-top: 14px; }
.member-card .button + .field-help, #shortcut-card .button + .field-help { margin-top: 10px; }
.features-section > p + :is(ul, ol) { margin-top: 12px; }
.features-section > :is(ul, ol) + p { margin-top: 16px; }
.legal > p + h2 { margin-top: 28px; }

/* 長文ページの本文：薄い灰色を一段濃くして、読み続けやすくする（補足の .field-help は従来の色のまま） */
:is(.about-section, .features-section, .legal) :is(p, li, dd):not(.field-help) { color: var(--nc-800); }

/* コラム本文：表・図の直後の段落が密着しないようにする */
.news-body :is(table, .table-scroll, .frq-table-stack-wrap) { margin-bottom: 1.6em; }

/* 人生の運気・年ごとの運勢・精密命式カルテ：カード見出しと表・一覧の間、表と注記の間 */
/* 操作欄のラベル（対象年・年運表）が1文字ずつ折り返さないようにする */
:is(.fortune-controls, .karte-options, .year-switcher) label { white-space: nowrap; }
.fortune-card :is(h2, h3) { margin-bottom: 12px; }
.fortune-card :is(.fortune-table-scroll, .fortune-facts, .karte-definition-list) + :is(p, .field-help) { margin-top: 12px; }
.fortune-card p + :is(.fortune-table-scroll, .fortune-facts) { margin-top: 10px; }
:not(.fortune-grid, .fortune-insights) > .fortune-card + .fortune-card { margin-top: 16px; }
}
@layer pages {
@media (min-width: 761px) {
.fortune-card { padding: 24px 28px; }
}
@media (max-width: 760px) {
/* 会員タブは横スクロール。右端を薄くして続きがあることを示す */
.member-subnav { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); }
.member-subnav a:last-child { margin-right: 32px; }
}
@media (max-width: 600px) {
.fortune-card { padding: 18px 16px; }
}
}
