/*
 * Migration Fixes (CSS) — 手動追記ファイル
 *
 * 移行元サイトは1ページ完結のLPで、セクションを全幅で敷き詰める設計。
 * 一方 seiryu-theme は「ヒーロー + 1200px幅のコンテナ」でページを組む。
 * そのままだと以下の2点が競合するため、ここで打ち消す。
 *
 * 適用範囲は body.home（移行コンテンツを載せたトップページ）に限定する。
 * 移行ページを増やした場合はセレクタを追加すること。
 */

/* ── 1. 親テーマのフルスクリーンヒーローを抑止 ──────────────
 * seiryu-theme は has-post-thumbnail のページに
 * section.seiryu-hero--fullscreen (min-height:100vh) を出力する。
 * 移行コンテンツは自前のヒーロー (#mv) を持っているため、
 * 親テーマ側のヒーローは画面を1画面ぶん占有する空領域になる。 */
body.home section.seiryu-hero {
	display: none;
}

/* ── 2. コンテンツ領域の幅制限を解除 ────────────────────────
 * .seiryu-container が max-width:1200px / padding-inline を課すため、
 * 全幅前提の移行セクション（100vw 基準の calc を多用）が破綻する。
 * 移行CSS側の .entry-content 調整は既に構造パッチが入れているので、
 * ここでは外側のコンテナだけを開放する。 */
body.home .seiryu-container.seiryu-page-content {
	max-width: none;
	padding-inline: 0;
}

/* ── 3. 見出しの色・書体を移行元に戻す ──────────────────────
 * seiryu-theme は見出しに以下を当てており、移行元の指定を上書きしてしまう。
 *   h1〜h6            … font-family: Noto Serif JP / color: #1a1a1a
 *   .entry-content h2 … padding-bottom + border-bottom + ::after のグラデ帯
 *   .entry-content h3 … padding-left + border-left 4px
 *   .entry-content h1〜h6 … margin-top/bottom
 * 移行元では見出しの色・書体は body からの継承で成立しているため、
 * 親テーマ側の指定を打ち消して継承と移行CSSに委ねる。
 *
 * セレクタの詳細度は .entry-content + 要素 = (0,1,1) に揃えてある。
 * 親テーマの .entry-content h2 等と同値で、読み込み順が後なので勝つ。
 * 一方、移行CSS側の .mv__inner h1.wp-block-heading (0,2,1) などには負けるため、
 * 移行元固有の見出し指定は保持される。
 * font-size / font-weight は移行元と一致しているため触らない。 */
.entry-content :is(h1, h2, h3, h4, h5, h6) {
	color: inherit;
	font-family: inherit;
	line-height: inherit;
	margin-top: 0;
	margin-bottom: 0;
	padding-bottom: 0;
	padding-left: 0;
	border: 0;
}

/* 親テーマが h2 に足すグラデーションの下線バーを消す */
.entry-content h2::after {
	content: none;
}

/* ── 4. コンテンツ領域に敷かれる白背景を外す ────────────────
 * プラグインの構造パッチ（migrated-adjustments.css）が
 *   .entry-content { background-color: var(--container-bg, #fdfdfc); }
 * を入れている。--container-bg はどこにも定義されていないため
 * フォールバックの #fdfdfc（ほぼ白）が全面に敷かれ、
 * body の #262626 を覆い隠していた。文字色は白のままなので
 * ページ全体が白地に白文字になり、内容が読めなくなる。
 * 移行元には .entry-content 自体が存在せず、各セクションは
 * body の背景の上に直接載るので、透過に戻す。 */
.entry-content {
	background-color: transparent;
}

/* ── 5. フォーム入力欄の背景を移行元に戻す ──────────────────
 * seiryu-theme の input[type="text"] 等（詳細度 0,1,1）が
 * 移行CSSの .c-form-control__input（0,1,0）に勝ってしまい、
 * 入力欄が白背景になる。文字色は白のままなので入力文字が見えない。
 * 移行元では背景は透過。詳細度を 0,1,1 に揃えて読み込み順で打ち消す。
 *
 * readonly 状態はここで触らないこと。移行CSSの
 *   .c-form-control__input:read-only                        (0,2,0)
 *   .c-form-control__textarea:not(.privacy-textarea):read-only (0,3,0)
 *   .c-form-control__textarea:is(.privacy-textarea)          (0,2,0)
 * がいずれも下記 (0,1,1) より強く、確認モードのグレー地と
 * プライバシー本文欄の透過は移行CSS側で正しく決まる。 */
.entry-content :is(input, textarea, select) {
	background-color: transparent;
}

/* 親テーマは書体・文字サイズ・余白・枠線も入力欄に当ててくるため、
 * 移行元の基底ルール
 *   .c-form-control__input, .c-form-control__textarea {
 *     padding: 1rem; font-size: 16px; border: none;
 *     border-radius: var(--form-control-border-radius); }
 * と同じ値をここで再宣言する。
 *
 * :where() でクラス分を 0 に落として詳細度を (0,1,1) に保つのが要点。
 * 親テーマの input[type="text"] 等と同値なので読み込み順で勝ち、
 * かつ移行CSSの :read-only / :is(.privacy-textarea) (0,2,0) には負けるので
 * 確認モードのグレー地とプライバシー欄の枠線はそのまま残る。
 * クラスを持たないチェックボックスには当たらない。 */
.entry-content :where(.c-form-control__input, .c-form-control__textarea):is(input, textarea) {
	font-family: inherit;
	font-size: 16px;
	padding: 1rem;
	border: none;
	border-radius: var(--form-control-border-radius);
}

/* ボタンは移行元が padding-left/right のみ指定し、高さは flex 中央寄せで
 * 作っている。親テーマの button 側 padding が縦方向に効いてしまうため戻す。 */
.entry-content :is(.wp-block-button__link, .wp-element-button) {
	padding-top: 0;
	padding-bottom: 0;
}

/* letter-spacing だけは詳細度 (0,0,1) に落とす。
 * 親テーマの h1〜h6 { letter-spacing: 0.03em } は読み込み順で打ち消しつつ、
 * 移行元がクラス指定で letter-spacing を与えている見出し
 * （#pride / #menu / #news / #shop-info の h2 = 1.6px）は保持する。 */
:where(.entry-content) :is(h1, h2, h3, h4, h5, h6) {
	letter-spacing: inherit;
}
