/* =========================================
   LPベースCSS（page-forfront テンプレを使う子テーマLPページの共通前処理）

   読込条件：
     enqueue.php 側で is_page_template('page-forfront.php') の場合のみ読み込む。
     対象は home / profile / minecraft_adventure / kamieshi_note 等（page-forfront テンプレ使用LP）。
     blog / archives 等の通常ページには読み込まない（SANGO標準のレイアウトを保つため）。

   読込順：
     sango-theme-child → legacy → common → ★lp-base★ → slug別CSS（pages/{slug}.css）

   セレクタ：
     すべて `body.page-template-page-forfront` でスコープ。万が一誤って読み込まれた
     ページでもクラスが付いてないと効かない、という二重防御。
   ========================================= */

/* M PLUS Rounded 1c の太字でChromiumのアンチエイリアスが甘くなる現象を抑える。
   小サイズ見出しは Zen Maru Gothic 700（hinting安定）に切替が推奨。 */
body.page-template-page-forfront {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* SANGO親 page-forfront テンプレの 3層 wrapper を解除：
     #content.page-forfront ── 上下padding+margin、左右padding を持つ
     #inner-content.wrap ───── 固定幅 + 左右padding を持つ
     .entry-content ────────── 左右margin/padding を持つ
   各層が独自の幅・余白を当てていて、子テーマのセクション幅を締め付ける。
   全部解除して、子テーマ側のセクション max-width だけを効かせる。

   注意：
     #main や #main-container まで広げてリセットすると、タブレット幅で
     SANGO親のレイアウトを壊して横はみ出しが起きる。3層に絞ること。 */
body.page-template-page-forfront #content.page-forfront {
    padding: 0;
    margin: 0;
}
body.page-template-page-forfront #inner-content.inner-content,
body.page-template-page-forfront #inner-content {
    max-width: none;
    width: auto;
    padding-left: 0;
    padding-right: 0;
}
body.page-template-page-forfront .entry-content {
    max-width: none !important;
    width: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* wpautop副産物の <br> や空 <p> はセクション間に入れない（CSS側で余白制御するため）。
   #container > p:empty は <header> 直後に生まれる空pを潰す（本番はAutoptimizeのHTML
   minifyで消えるが、ローカルAutoptimize無効時に余白差が出るので明示的に除去）。 */
body.page-template-page-forfront #container > p:empty,
body.page-template-page-forfront .entry-content > br,
body.page-template-page-forfront .entry-content > p:empty {
    display: none;
}

/* 上で空<p>を消した分の隙間を <header> 下マージンで補う（元の空pのデフォルト約1em相当）。 */
body.page-template-page-forfront .lp-site-header {
    margin-block-end: 1em;
}
