/**
 * NEO page styles（通常の固定ページのみ読み込み. トップページは除く）
 *
 * - 固定ページ本文（管理画面で編集した the_content()）の「見せ方」だけを整える. 本文の内容には依存しない.
 * - 対象は body.page:not(.home) に限定する（読み込み条件は inc/enqueue.php）.
 * - 管理画面で色などを明示した要素（.has-text-color / .has-background / .has-border-color 等）はできるだけ上書きしない.
 * - VK Blocks の見出しスタイル（is-style-* / vk_heading）を選んだ見出しには、見出しの装飾リセットを当てない.
 * - テーブルは列の数・順番を決め打ちしない. 自然な折り返しを基本とし、収まらない表だけ横スクロールにする.
 * - スマホを基準に書き、768px / 992px で余白・文字サイズを調整する.
 * - グラデーション・発光・影・アニメーションは使わない.
 */

/* ==========================================================================
   1. ページタイトル（Lightning の .page-header をそのまま使い、見た目だけ EVENTS に揃える）
   ========================================================================== */

/* 元は中央寄せ・最小高さ 8rem・キーカラーの帯 */
body.page:not(.home) .page-header {
	min-height: 0;
	text-align: left;
	background-color: var(--neo-color-bg);
}

body.page:not(.home) .page-header-inner {
	margin-block: 2rem 1.5rem;
}

body.page:not(.home) .page-header-title {
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0.08em;
	color: var(--neo-color-text);
}

/* ==========================================================================
   2. 本文の周辺（パンくずから本文までの余白）
   ========================================================================== */

body.page:not(.home) .site-body {
	padding-top: 1.5rem;
	padding-bottom: 3.5rem;
}

body.page:not(.home) .entry-body > :first-child {
	margin-top: 0;
}

body.page:not(.home) .entry-body {
	color: var(--neo-color-text);
	line-height: 1.8;
}

/* ==========================================================================
   3. 見出し
   ========================================================================== */

/* Lightning / origin3 スキンの上線・下線をリセットし、下線1本にする */
body.page:not(.home) .entry-body h2:where(:not([class*="is-style-"]):not([class*="vk_heading"])) {
	margin: 3rem 0 1.25rem;
	border-top: 0;
	border-bottom: 1px solid var(--neo-color-line-strong);
	font-size: 1.375rem;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 0.04em;
}

body.page:not(.home) .entry-body h2:where(:not([class*="is-style-"]):not([class*="vk_heading"]):not(.has-background)) {
	padding: 0 0 0.625rem;
}

/* h3: 下線と ::after の短い線（幅 30%）をリセットし、h2 より控えめにする */
body.page:not(.home) .entry-body h3:where(:not([class*="is-style-"]):not([class*="vk_heading"])) {
	margin: 2.25rem 0 0.75rem;
	border-bottom: 0;
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.5;
}

body.page:not(.home) .entry-body h3:where(:not([class*="is-style-"]):not([class*="vk_heading"]):not(.has-background)) {
	padding: 0;
}

body.page:not(.home) .entry-body h3:where(:not([class*="is-style-"]):not([class*="vk_heading"]))::after {
	content: none;
}

/* ==========================================================================
   4. 段落・リスト・リンク・引用・区切り線
   ========================================================================== */

body.page:not(.home) .entry-body p {
	line-height: 1.8;
}

body.page:not(.home) .entry-body :is(ul, ol):where(:not(.has-background)) {
	padding-left: 1.5em;
}

body.page:not(.home) .entry-body li {
	line-height: 1.8;
}

body.page:not(.home) .entry-body li + li {
	margin-top: 0.25em;
}

/* 下線は neo-base.css で指定済み. ここでは色だけを揃える */
body.page:not(.home) .entry-body a:where(:not(.btn):not(.wp-block-button__link):not(.vk_button_link):not(.has-text-color)) {
	color: var(--neo-color-text);
}

body.page:not(.home) .entry-body a:where(:not(.btn):not(.wp-block-button__link):not(.vk_button_link):not(.has-text-color)):hover {
	color: var(--neo-color-text-sub);
}

/* 元はキーカラーの左線 + 薄い背景 */
body.page:not(.home) .entry-body blockquote {
	margin-block: 2rem;
	padding: 1rem 1.25rem;
	border-left: 2px solid var(--neo-color-line-strong);
}

body.page:not(.home) .entry-body blockquote:where(:not(.has-background)) {
	background-color: var(--neo-color-surface);
}

body.page:not(.home) .entry-body blockquote > :last-child {
	margin-bottom: 0;
}

body.page:not(.home) .entry-body blockquote cite {
	display: block;
	margin-top: 0.5rem;
	font-size: 0.875rem;
	font-style: normal;
	color: var(--neo-color-text-sub);
}

body.page:not(.home) .entry-body hr:where(:not(.has-background):not(.has-text-color):not(.is-style-dots)) {
	margin-block: 2.5rem;
	border: 0;
	border-top: 1px solid var(--neo-color-line);
}

/* ==========================================================================
   5. テーブル
   ========================================================================== */

/*
 * 横幅: WordPress 標準の .wp-block-table（figure）は overflow-x: auto を持つため、
 * 表が画面幅に収まらないときだけ横スクロールになる. 列の数・順番に依存する指定はしない.
 */
body.page:not(.home) .entry-body .wp-block-table {
	margin-block: 1.5rem 2rem;
	border-color: var(--neo-color-line);
}

/* Lightning は表の文字を小さくするため、読みやすい大きさに戻す（管理画面で文字サイズを指定した表は除く） */
body.page:not(.home) .entry-body .wp-block-table:where(:not([class*="font-size"])),
body.page:not(.home) .entry-body :where(:not(.wp-block-table)) > table :is(th, td) {
	font-size: 0.9375rem;
}

body.page:not(.home) .entry-body table:where(:not(.has-border-color)) {
	border-color: var(--neo-color-line);
}

body.page:not(.home) .entry-body :is(th, td) {
	padding: 0.625rem 0.75rem;
	line-height: 1.6;
}

body.page:not(.home) .entry-body th:where(:not(.has-text-align-center):not(.has-text-align-right)) {
	text-align: left;
}

/* 標準の見出し行・集計行の太線（3px）を細くする */
body.page:not(.home) .entry-body table:where(:not(.has-border-color)) thead {
	border-bottom: 1px solid var(--neo-color-line-strong);
}

body.page:not(.home) .entry-body table:where(:not(.has-border-color)) tfoot {
	border-top: 1px solid var(--neo-color-line-strong);
}

/* 表のキャプション（元は中央寄せ・0.75rem） */
body.page:not(.home) .entry-body figcaption:where(:not(.has-text-color)) {
	color: var(--neo-color-text-sub);
}

body.page:not(.home) .entry-body .wp-block-table figcaption {
	margin-top: 0.5rem;
	font-size: 0.8125rem;
	line-height: 1.6;
}

/* WordPress 標準「ストライプ」: 元は奇数行が #f0f0f0（白文字が読めない）のため暗色にする */
body.page:not(.home) .entry-body .wp-block-table.is-style-stripes {
	border-bottom-color: var(--neo-color-line);
}

body.page:not(.home) .entry-body .wp-block-table.is-style-stripes table:where(:not(.has-background)) tbody tr:nth-child(odd),
body.page:not(.home) .entry-body .wp-block-table.is-style-vk-table-border-stripes table:where(:not(.has-background)) tbody tr:nth-child(odd) {
	background-color: var(--neo-color-surface);
}

/* VK Blocks「横スクロール」: スクロール案内のアイコンを揺らすアニメーションを止め、案内の文字だけ残す */
body.page:not(.home) .entry-body .vk-scroll-hint {
	color: var(--neo-color-text-sub);
}

body.page:not(.home) .entry-body .vk-scroll-hint i {
	animation: none;
}

/*
 * 「料金・営業時間」ページ（body.neo-price-page. inc/page.php で付与）の3列の表だけ、スマホで1列目（料金名）を広げる.
 * WordPress 標準の「固定幅のテーブルセル」は3列が均等幅になり料金名が細かく折り返されるため、42% / 29% / 29% にする.
 * 3列ちょうどの表だけが対象. 横スクロールにはせず、文字サイズ・余白を少しだけ詰める.
 */
@media (max-width: 767.98px) {
	/*
	 * ページタイトル: 固定 MENU ボタン（neo-base.css で左端 0.75rem・幅 34px）とタイトルが重ならないよう、
	 * ボタンの右端 + 1rem の位置から文字を始める（.container の左 padding 15px を差し引く）. 文字サイズ・上下余白は変えない.
	 */
	body.page:not(.home) .page-header-title {
		padding-left: calc(0.75rem + 34px + 1rem - var(--vk-width-container-padding, 15px));
		overflow-wrap: anywhere;
	}

	body.neo-price-page .entry-body table:has(tr > :nth-child(3):last-child) {
		width: 100%;
		table-layout: fixed;
	}

	body.neo-price-page .entry-body table:has(tr > :nth-child(3):last-child) :is(th, td) {
		width: 29%;
		padding: 0.5rem 0.5rem;
		font-size: 0.875rem;
		line-height: 1.55;
		overflow-wrap: anywhere;
	}

	body.neo-price-page .entry-body table:has(tr > :nth-child(3):last-child) :is(th, td):first-child {
		width: 42%;
	}

	/*
	 * 料金表の下の説明ブロック（管理画面で追加 CSS クラス neo-price-notes を付けたブロックだけ）.
	 * WordPress 標準の .has-background の左右 padding（2.375em）を詰める. 上下の padding は変えない.
	 * p.has-background（詳細度 0,1,1）にも勝つよう body / .entry-body から指定する.
	 */
	body.page:not(.home) .entry-body .neo-price-notes {
		padding-left: 1rem;
		padding-right: 1rem;
	}

	/*
	 * 定休日ブロック（追加 CSS クラス neo-price-closed を付けたブロックだけ）.
	 * 中央寄せをやめて左詰めにし、左右 padding を neo-price-notes と揃える. 上下 padding・太字・文字サイズは変えない.
	 */
	body.page:not(.home) .entry-body .neo-price-closed {
		padding-left: 1rem;
		padding-right: 1rem;
		text-align: left;
	}
}

/* ==========================================================================
   6. Q&A（管理画面で追加 CSS クラス neo-faq-* を付けたブロックだけ）
   ========================================================================== */

/* 1組の Q&A。背景・左右 padding は付けず、下の細い線と余白で区切る */
body.page:not(.home) .entry-body .neo-faq-item {
  margin: 0 0 1.75rem;
  padding: 0 0 1.75rem;
  border-bottom: 1px solid var(--neo-color-line);
}

/* 質問：回答より少しだけ強く。文字サイズは本文のまま */
body.page:not(.home) .entry-body .neo-faq-question {
  margin: 0 0 0.5rem;
  font-weight: 700;
  line-height: 1.6;
  color: var(--neo-color-text);
}

body.page:not(.home) .entry-body .neo-faq-question strong {
  color: var(--neo-color-text);
}

/* 回答：白をわずかに落としたグレー。「A.」だけ少し明確にする */
body.page:not(.home) .entry-body .neo-faq-answer {
  margin: 0;
  font-weight: 400;
  line-height: 1.8;
  color: #e0e0e0;
}

body.page:not(.home) .entry-body .neo-faq-answer strong {
  font-weight: 700;
  color: var(--neo-color-text);
}

/* 一覧最後の問い合わせ欄 */
body.page:not(.home) .entry-body .neo-faq-contact {
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--neo-color-line-strong);
}

/* 問い合わせ欄の電話番号 */
body.page:not(.home) .entry-body :is(a.neo-faq-contact-phone, .neo-faq-contact-phone a)[href^="tel:"] {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
  color: var(--neo-color-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}

body.page:not(.home) .entry-body :is(a.neo-faq-contact-phone, .neo-faq-contact-phone a)[href^="tel:"]:hover {
  color: var(--neo-color-text);
  text-decoration-thickness: 2px;
}

/* ==========================================================================
   7. アクセス（本文の上の住所・電話・Googleマップ. inc/page.php で出力）
   ========================================================================== */

/* カードにはせず、本文と同じ左端に並べる. 下の本文（行き方の補足）との間を空ける */
.neo-access-info {
	margin: 0 0 2rem;
	color: var(--neo-color-text);
}

.neo-access-info__label {
	margin: 0 0 0.25rem;
	font-size: 0.875rem;
	line-height: 1.6;
	letter-spacing: 0.04em;
	color: var(--neo-color-text-sub);
}

.neo-access-info__address {
	margin: 0;
	line-height: 1.8;
	overflow-wrap: anywhere;
}

/* 電話: トップページ ACCESS と同じ見せ方（受話器 + 常時下線. タップしやすい高さ） */
.neo-access-info__phone {
	margin: 0.75rem 0 0;
	font-size: 1.0625rem;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: 0.02em;
}

.neo-access-info__phone-link {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 44px;
	color: var(--neo-color-text);
	text-decoration: none;
}

.neo-access-info__phone-icon {
	flex-shrink: 0;
	width: 17px;
	height: 17px;
	color: var(--neo-color-text-sub);
}

.neo-access-info__phone-text {
	text-decoration-line: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.15em;
	text-decoration-color: var(--neo-color-text-sub);
}

.neo-access-info__phone-link:hover,
.neo-access-info__phone-link:focus-visible {
	color: var(--neo-color-text);
	text-decoration: none;
}

.neo-access-info__phone-link:hover .neo-access-info__phone-icon,
.neo-access-info__phone-link:focus-visible .neo-access-info__phone-icon {
	color: var(--neo-color-text);
}

.neo-access-info__phone-link:hover .neo-access-info__phone-text,
.neo-access-info__phone-link:focus-visible .neo-access-info__phone-text {
	text-decoration-color: var(--neo-color-text);
}

/* Googleマップ: 既存の副ボタン（白枠 + 黒背景. neo-base.css）. 画面幅を超えない */
.neo-access-info__map {
	margin: 1.25rem 0 0;
}

.neo-access-info__map .neo-button {
	max-width: 100%;
}

/*
 * アクセス補足（NEO Core の店舗設定 access_note）.
 * 住所のすぐ下に、トップページ ACCESS の補足と同じ小さめのグレーで置く. 電話との間は少し空ける.
 */
.neo-access-info__note {
	margin: 0.375rem 0 0;
	font-size: 0.9375rem;
	line-height: 1.8;
	color: var(--neo-color-text-sub);
	overflow-wrap: anywhere;
}

.neo-access-info__note + .neo-access-info__phone {
	margin-top: 1rem;
}

/* ==========================================================================
   8. 768px 以上
   ========================================================================== */

@media (min-width: 768px) {
	body.page:not(.home) .page-header-inner {
		margin-block: 2.5rem 2rem;
	}

	body.page:not(.home) .page-header-title {
		font-size: 1.75rem;
	}

	body.page:not(.home) .entry-body h2:where(:not([class*="is-style-"]):not([class*="vk_heading"])) {
		margin-top: 3.5rem;
		font-size: 1.5rem;
	}

	body.page:not(.home) .entry-body h3:where(:not([class*="is-style-"]):not([class*="vk_heading"])) {
		font-size: 1.25rem;
	}

	body.page:not(.home) .entry-body .wp-block-table:where(:not([class*="font-size"])),
	body.page:not(.home) .entry-body :where(:not(.wp-block-table)) > table :is(th, td) {
		font-size: 1rem;
	}

	body.page:not(.home) .entry-body :is(th, td) {
		padding: 0.75rem 1rem;
	}
}

/* ==========================================================================
   9. 992px 以上
   ========================================================================== */

@media (min-width: 992px) {
	body.page:not(.home) .site-body {
		padding-top: 2.5rem;
		padding-bottom: 5rem;
	}
}
