/*
Theme Name: Nest Design V5
Theme URI: https://nest-design.net
Author: 一級建築士事務所 ネストデザイン
Author URI: https://nest-design.net
Description: nest-design.net Vol.5 のテーマ。シンプルで内容が主のサイト。どのテーマの子でもない独立したテーマ（以前の親 Twenty Twenty-Five から借りていた theme.json と style.css は併合してある）。
Requires at least: 6.7
Requires PHP: 7.4
Version: 1.11.930
Text Domain: nest-design-v5
*/

/* style.css — the whole site: one sheet for every page.
   nest-design.net V5 · theme nest-design-v5

   サイト全体の見た目。ヘッダー・フッター・メニュー・事務所案内・English・お問い合わせなど、どのページにも効く決まり。 */



/* もとは親テーマ（Twenty Twenty-Five）の決まりで、base.css として別に読んでいたもの。ここへ移した。
   リンクの下線の太さ、キーボードで操作するときの枠、メニューの枠の間、見出しと段落の行末の折り方など */
a {
	text-decoration-thickness: 1px !important;
	text-underline-offset: .1em;
}
:where(.wp-site-blocks *:focus) {
	outline-width: 2px;
	outline-style: solid;
}
.wp-block-navigation .wp-block-navigation-submenu .wp-block-navigation-item:not(:last-child) {
	margin-bottom: 3px;
}
.wp-block-navigation .wp-block-navigation-item .wp-block-navigation-item__content {
	outline-offset: 4px;
}
.wp-block-navigation .wp-block-navigation-item ul.wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	outline-offset: 0;
}
h1, h2, h3, h4, h5, h6, blockquote, caption, figcaption, p {
	text-wrap: pretty;
}
.more-link {
	display: block;
}
:where(pre) {
	overflow-x: auto;
}

/**
 * 本文の書体。和文を持たない Manrope（親テーマの既定）には任せず、並びを明示する。
 * Mac・iPhone・iPad はヒラギノ。無い環境（Windows・Android など）は Noto Sans JP・游ゴシック・メイリオの順。
 * 「Hiragino Sans」を「Hiragino Kaku Gothic ProN」より先に置くこと。
 * ProN は太さが W3 と W6 の二つしかなく、400 を指定しても W3 に丸められる。
 * Hiragino Sans は細かい段階を持つので、400 で W3 より少し力強く、W6 ほど太くない。
 */
body {
	font-family:
		-apple-system,
		BlinkMacSystemFont,
		"Hiragino Sans",
		"Hiragino Kaku Gothic ProN",
		"Noto Sans JP",
		"Yu Gothic",
		Meiryo,
		sans-serif;
	font-weight: 400;
}

/**
 * 見出しも本文と同じゴシック。明朝は使わない（body の書体を受け継ぐだけなので、個別の指定は無い）。
 */

/**
 * モバイルの文字サイズ自動調整（text-size-adjust）を切る。
 * これが効くと、アコーディオンを開くときに測る高さ（クローンの scrollHeight）が実際より低く出続け、
 * スマホと Firefox で、開く途中に一度止まってから跳ねていた。CSS で指定した大きさがそのまま出る。
 */
html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

/**
 * 折り返しを標準（text-wrap: wrap）に戻す。
 * WordPress が見出し・段落などに text-wrap: pretty を付けており、iPhone の Safari では
 * 右端に大きな空きを残して改行していた（Chrome では出にくい）。
 */
blockquote,
caption,
figcaption,
h1,
h2,
h3,
h4,
h5,
h6,
p {
	text-wrap: wrap;
}

/**
 * サブメニューを持つ項目（例：仕事実績集）の「∨」アイコンは表示しない。
 * クリック／ホバーでの開閉機能自体は残す（アイコンだけ非表示）。
 */
.wp-block-navigation__submenu-icon {
	display: none !important;
}

/**
 * ヘッダーロゴマーク：画像そのものの見た目の重心（家の窓＝円のあたり）は
 * 画像の枠（バウンディングボックス）の中央よりもやや下寄りにあるため、
 * 単純に上下中央揃えにすると「一級建築士事務所」の「一」の芯より
 * 少し下にズレて見える。見た目の中心が文字の中心に合うよう、
 * ロゴ画像だけをわずかに上へ調整する。
 */
.nd-logo-mark {
	transform: translateY(-5px);
}

/**
 * 画面幅が狭くなっていく時、先に「一級建築士事務所　ネストデザイン」が
 * 2段に折り返ってしまうと格好が悪いので、ロゴ＋事務所名のブロックは
 * 縮まない・折り返さないようにする。その代わりメインメニュー側が先に
 * 幅を譲り、事務所名が2段になるより前にハンバーガー（三本線）メニューへ
 * 切り替わるようにする。
 */
.nd-brand {
	flex-shrink: 0;
}
/**
 * ロゴ画像と事務所名（サイトタイトル）の間の余白（本来10px）も、
 * これまでと同じ原因（クラシックPHPテンプレートではブロック単位の
 * gapの実測値が出力されず、theme.json既定のブロック間隔＝約19.2pxに
 * フォールバックしてしまう）で広がってしまい、事務所名の位置がFSEページ
 * より右にずれて見えていた。正しい値（10px）を明示する。
 */
.nd-brand {
	gap: 10px !important;
}
/**
 * ヘッダー内のロゴ＋事務所名／メインメニューを横に並べる行そのものが
 * 折り返ってしまうと、（クラシックPHPテンプレートのページでのみ発生する
 * 現象として）ハンバーガーボタンが下の行に落ちてしまう不具合があったため、
 * 折り返さないことを明示的に固定する。
 */
.nd-header-row {
	flex-wrap: nowrap !important;
}
/**
 * クラシック PHP テンプレートのページ（仕事実績集・探究ノートなど）では、
 * この行（nd-header-row）の並べ方の CSS が出ないことがあり、メニューがロゴのすぐ右に詰まる。
 * wp_head() のあとで block_template_part('header') を描くため、生成が間に合わない。
 * FSE のページ（トップなど）での計算値をそのまま書き、どのページも同じにする。
 */
.nd-header-row {
	display: flex !important;
	justify-content: space-between !important;
	align-items: center !important;
	gap: 19.2px !important;
}
/**
 * ヘッダーの行の幅の上限は 900px（これ以上は広がらない）。
 * 上限が無いと事務所名とメニューが画面の両端まで離れる。645px では窮屈だった。
 * WordPress の .is-layout-constrained の max-width と詳細度が同じで負けるので !important。
 */
.nd-header-row {
	max-width: 945px !important;
	margin-left: auto !important;
	margin-right: auto !important;
}
/**
 * ヘッダー下部の1px区切り線を、ヘッダー内容幅（945px）ではなく
 * ページ全幅にする。ヘッダーブロック全体を包む一番外側の
 * alignfullラッパー（.wp-block-group.alignfull.is-layout-flow、
 * このクラスの組み合わせはヘッダーだけに使われておりフッター等の他の
 * alignfullブロックとは区別できる）にborder-bottomを付ける。
 * .nd-header-row側にはpadding-bottomだけ残し、ロゴ・メニュー行と
 * ラインの間の余白を保つ。
 */
.nd-header-row {
	/*
	 * 要素に直接 style="padding-bottom:var(--wp--preset--spacing--30)"が
	 * インライン指定されており、これが外部CSSのクラス指定より優先されて
	 * しまうため、!importantを付けないと反映されなかった。
	 */
	padding-bottom: 11px !important;
}
.wp-block-group.alignfull.is-layout-flow:has(.nd-header-row) {
	border-bottom: 1px solid rgba(0, 0, 0, 0.25);
}

/*
 * スマホのメニュー（ハンバーガー）の中の縦の並び。
 * ドロワー全体（close→dialog→content）を flex で縦に伸ばし、
 * 外枠（.responsive-container）の元々の padding-bottom はなくす。
 * 下の余白の値は、後ろの「上と下の余白を詰める」決まりで決めている。
 */
@media (max-width: 665px) {
	.wp-block-navigation__responsive-container.is-menu-open {
		padding-bottom: 0 !important;
	}
	.wp-block-navigation__responsive-close {
		display: flex;
		flex-direction: column;
		height: 100%;
		box-sizing: border-box;
	}
	.wp-block-navigation__responsive-dialog {
		flex: 1 1 auto;
		min-height: 0;
		display: flex;
		flex-direction: column;
		box-sizing: border-box;
	}
	.wp-block-navigation__responsive-container-content {
		flex: 1 1 auto;
		min-height: 0;
		padding-bottom: 30px;
		box-sizing: border-box;
	}
}

/*
 * メニューを開いたときの白背景オーバーレイは、デフォルトでは画面
 * 最上部（top:0）からヘッダー（ロゴ・事務所名・下線）ごと覆い隠して
 * しまう。オーバーレイの開始位置をヘッダー本体の下端に合わせることで、
 *ドロワーを開いてもヘッダーの実物がそのまま見え続け、
 * ロゴをそのままタップしてトップへ戻れるようにする。座標は
 * assets/js/hamburger-morph.js側で都度 --nd-header-bottom として
 * 記録している。
 */
@media (max-width: 665px) {
}

/*
 * 閉じるボタン（.wp-block-navigation__responsive-container-close）は透明で、見えている☰⇔✕の真下に重ねてタップを受ける。
 * オーバーレイを下へずらすとこれも一緒にずれ、✕を押しても閉じなくなる。
 * ハンバーガーと同じ座標（--nd-hamburger-top / --nd-hamburger-right。hamburger-morph.js が計算）に固定する。
 */
@media (max-width: 665px) {
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close {
		position: fixed;
		top: var(--nd-hamburger-top, 6px) !important;
		right: var(--nd-hamburger-right, 18px) !important;
		z-index: 100002;
	}
}
/**
 * ヘッダーはスクロールしても上に固定する。
 * ログイン中は管理バー（position:fixed）の下に来るよう top をずらす。
 * z-index は子メニュー（1000）より上にし、開いた子メニューがヘッダーの前に出るようにする。
 */
/**
 * sticky ではなく fixed。WebKit 系ではリロードや戻るのときに sticky の位置の計算が遅れ、ヘッダーが一瞬消える。
 * alignfull の左右の負の margin を打ち消し、left:0; right:0; で画面幅いっぱいにする。
 */
.wp-block-group.alignfull.is-layout-flow:has(.nd-header-row) {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	margin-left: 0 !important;
	margin-right: 0 !important;
	z-index: 1002;
	background: #fff;
}
/* 管理バーの高さは幅で変わる。
   782px 超は 32px、782px 以下は 46px。
   32px 固定にすると、広い画面でヘッダーの下に 14px のすき間が出る。
   ログイン中だけの現象だが、毎日見る画面なので揃える */
body.admin-bar .wp-block-group.alignfull.is-layout-flow:has(.nd-header-row) {
	top: 32px;
}
@media screen and (max-width: 782px) {
	body.admin-bar .wp-block-group.alignfull.is-layout-flow:has(.nd-header-row) {
		top: 46px;
	}
}
/**
 * 事務所案内（About）ページなど、FSE（フルサイト編集）で描画される
 * ページでは、上記の sticky グループが <header class="wp-block-template-part">
 * （高さがヘッダーと同じ約66pxしかない）の内側に入れ子になっている。
 * position:sticky は「自分の親要素の範囲内でのみ」貼り付くため、親の高さが
 * 子と同じだと、最初の数十pxだけ貼り付いてすぐ通常のスクロールに戻ってしまう
 * （仕事実績集等のクラシックPHPテンプレートではこの<header>ラッパーが無く、
 * bodyの直接の子になっているため問題が起きなかった）。
 * 外側の<header>自体も同じ条件でstickyにすることで解消する。
 */
header.wp-block-template-part:has(.nd-header-row) {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1002;
}
body.admin-bar header.wp-block-template-part:has(.nd-header-row) {
	top: 32px;
}
/**
 * ヘッダーをposition:fixedにしたことで文書の流れから外れ、
 * 本来ヘッダーが占めていた高さ分のスペースが失われる（後続コンテンツが
 * ヘッダーの下に隠れる）ため、bodyにヘッダー高さ分のpadding-topを
 * 補って隠れないようにする。
 */
body {
	padding-top: 67px;
}
/**
 * ログイン中も上の余白はヘッダーの高さ（67px）だけ。
 * 管理バーの分は WordPress が html の margin-top で取っているので、足すと二重になり、
 * ヘッダーの下線と本文の間にすき間が出る。
 */
body.admin-bar {
	padding-top: 67px;
}

/**
 * フッター上部にも、ヘッダー下部と同じ薄いグレーの全幅区切り線を引く。
 * フッターのラッパー（.wp-block-group.alignfull.has-global-padding.
 * is-layout-constrained）はこのページ内で他と重複しない組み合わせ。
 */
.wp-block-group.alignfull.has-global-padding.is-layout-constrained {
	border-top: 1px solid rgba(0, 0, 0, 0.4);
}
/**
 * ロゴ（＋事務所名・メインメニュー）が上に寄りすぎて見えるため、
 * ヘッダー上部の余白を5px増やす（本来20px→25px）。
 */
.nd-header-row {
	padding-top: 25px !important;
}
/**
 * 同じ理由（クラシックPHPテンプレートではtheme.json由来のブロック単位の
 * スタイルが出力されないことがある）で、事務所名（サイトタイトル）の
 * フォントサイズもtheme.json指定（15px）ではなくブラウザの既定サイズ
 * （見出し相当・約20.7px）で表示されてしまっていた。
 * メインメニューと同じ15pxに明示的に揃える。
 */
.wp-block-site-title,
.wp-block-site-title a {
	font-size: 15px !important;
	letter-spacing: -0.5px !important;
}
.nd-brand .wp-block-site-title,
.nd-brand .wp-block-site-title a {
	white-space: nowrap;
}
/**
 * 事務所名の「一級建築士事務所」だけを一回り小さく、下端そろえにする（文字を分けるのは functions.php）。
 */
.nd-office-prefix {
	font-size: 12px;
	vertical-align: bottom;
}
.nd-office-name {
	margin-left: 4px;
	vertical-align: bottom;
	position: relative;
	top: 1px;
}
/**
 * 事務所名にマウスを乗せたときの下線。
 * クラシック PHP テンプレートでは theme.json のリンクのホバーの決まりが出ないことがあるので、ここで明示する。
 * 線の色は #ddd（色はベンガラだけ、ほかはモノクローム）。
 * text-decoration ではなく border-bottom にする。二つの span の間で線が途切れないように。
 * ふだんも透明の線を置いておく。ホバーのときだけ付けると高さが 1px 変わり、事務所名の文字が動く。
 */
.wp-block-site-title a {
	border-bottom: 1px solid transparent;
	/*
	 * 下線の位置をロゴマークの下端に合わせる（実測で 0.75px 上へ）。
	 * <a> はインラインなので transform は効かない。position: relative を使う（周りの配置は動かない）。
	 */
	position: relative;
	top: -0.75px;
}
.wp-block-site-title a:hover {
	text-decoration: none !important;
	border-bottom-color: rgba(0, 0, 0, 0.35);
}

/**
 * メインメニュー（PC幅の横並び表示の時のみ）の項目間に縦棒「|」の区切りを入れる。
 * スマホのハンバーガーメニュー展開時（.is-menu-open）には区切りを入れない。
 * （メニューの中身は横並び時・展開時とも同じ .wp-block-navigation__responsive-container
 * の中に入っているため、.is-menu-open が付いているかどうかで判定する）
 */
.wp-block-navigation__container > .wp-block-navigation-item + .wp-block-navigation-item > .wp-block-navigation-item__content {
	position: relative;
}
.wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__container > .wp-block-navigation-item + .wp-block-navigation-item > .wp-block-navigation-item__content::before {
	content: "|";
	margin-right: 1em;
	color: rgba(0, 0, 0, 0.25);
	/*
	 * ホバーの下線が「|」まで伸びないように inline-block にする。
	 * 子に text-decoration: none を付けても、親の下線は止まらない。
	 */
	text-decoration: none;
	display: inline-block;
}
/**
 * メインメニュー項目のホバー時の下線も、区切り線「｜」や事務所名の下線と
 * 同じ#ddd（線色）に揃える（色はベンガラ以外モノクロームの方針）。
 */
.wp-block-navigation .wp-block-navigation-item__content:hover {
	text-decoration-color: rgba(0, 0, 0, 0.35) !important;
	text-decoration-thickness: 1px !important;
}

/**
 * スマホのハンバーガー。WordPress 標準の2本線をやめ、3本線（v4 と同じ）を CSS で描く。標準の SVG は隠す。
 * ・3本とも同じ方法（background の linear-gradient）で描く。border と background を混ぜると、線ごとに太さや濃さが揃わない。
 * ・押せる範囲は padding で 44×44px。見た目が大きくならないよう、周りへの影響は負の margin で相殺する。
 * ・表示するのは画面幅 665px 未満だけ（下の @media）。常に display:flex にすると、PC でも横並びのメニューと両方が出る。
 * ・アイコンの高さは事務所名の line-height（21px）に合わせ、事務所名の行と縦の中心をそろえる。
 */
.wp-block-navigation__responsive-container-open {
	position: relative;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: -12px -12px -12px auto !important;
	padding: 0 !important;
	cursor: pointer;
	/*
	 * ☰→✕のモーフのため、開いている間もこのボタンは出したままにする（下の z-index / pointer-events）。
	 * 閉じる操作を受けるのは別の要素（.wp-block-navigation__responsive-container-close）で、そちらは透明。
	 * 見えるのは、このボタンのアイコンが☰⇔✕に変わるところだけ。
	 */
	z-index: 3;
	/*
	 * タップしたときの黒いハイライト（-webkit-tap-highlight-color）を消す。スマホだけで出る。
	 */
	-webkit-tap-highlight-color: transparent;
}
/**
 * ハンバーガーに切り替える幅は 665px 未満（WordPress 標準は 600px）。
 * 事務所名＋3項目のメニューは 645px までは1行、644px で折り返すので、20px ほど余裕を見る。
 * 標準の横並び（600px 以上）も 665px 未満では打ち消し、両方が同時に出ないようにする。
 * 事務所名やメニューの幅が変わったら測り直す。
 */
@media (max-width: 665px) {
	.wp-block-navigation__responsive-container-open {
		display: flex !important;
	}
	.wp-block-navigation__responsive-container:not(.is-menu-open) {
		display: none !important;
	}
	/*
	 * パネルを閉じる処理は hamburger-morph.js の forceClosePanelNow（要素の style に display:none を直接書く）。
	 * クラスで隠す方式は使えない。WordPress が className を作り直すときに、付けたクラスごと消される。
	 * そのための CSS は要らない。
	 */
	/**
	 * ☰ボタンと✕ボタンは兄弟の要素で、同じ角に重ねてある。
	 * ☰は消さずに出したまま、アイコンの形だけを✕に変える（なめらかにモーフさせるため）。
	 * 開閉の操作は裏の✕ボタンが受けるので、☰ボタンは pointer-events: none でタップを通す。
	 *
	 * 開いている間は、☰ボタンも position:fixed にしてオーバーレイより上に置く。
	 * オーバーレイ（.wp-block-navigation__responsive-container）は z-index:100000 の fixed で、
	 * 重なりの文脈が違うため、ボタンの z-index をいくら上げても上に出ない。
	 * 座標（--nd-hamburger-top / right）は hamburger-morph.js がふだんの位置を測って入れるので、管理バーの有無によらず合う。
	 */
	.wp-block-navigation:has(.wp-block-navigation__responsive-container.is-menu-open) .wp-block-navigation__responsive-container-open,
	.wp-block-navigation:has(.wp-block-navigation__responsive-container.is-menu-closing) .wp-block-navigation__responsive-container-open {
		pointer-events: none;
		position: fixed !important;
		top: var( --nd-hamburger-top, 20px );
		right: var( --nd-hamburger-right, 20px );
		left: auto;
		margin: 0 !important;
		z-index: 100001;
	}
}
/*
 * ☰→✕のモーフ。
 * WordPress 標準の SVG（2本線から✕へ丸ごと差し替え）では動かせないので、3本線を3つの要素で描き直す。
 * ・上の線 → ::before
 * ・下の線 → ::after
 * ・真ん中の線 → 既存の SVG 要素を1本の棒として塗る（中の矢印は隠す）
 * 3本とも同じ「absolute ＋ top:50% / left:50% ＋ translate(-50%,-50%)」で置く。
 * 真ん中だけ flex の中央寄せにすると、半端なピクセル位置で薄く見える。
 * 開くと上下の線が中心で交わるまで回り、真ん中の線は消えて✕になる。
 */
.wp-block-navigation__responsive-container-open svg {
	display: block;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 20px;
	height: 1.5px;
	background: currentColor;
	transition: opacity 0.3s ease;
}
.wp-block-navigation__responsive-container-open svg path {
	display: none;
}
.wp-block-navigation__responsive-container-open::before,
.wp-block-navigation__responsive-container-open::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 20px;
	height: 1.5px;
	background: currentColor;
	transition: transform 0.3s ease;
}
.wp-block-navigation__responsive-container-open::before {
	transform: translate(-50%, -50%) translateY(-7px);
}
.wp-block-navigation__responsive-container-open::after {
	transform: translate(-50%, -50%) translateY(7px);
}
/*
 * ✕の形にする条件は、hamburger-morph.js がクリックのときにすぐ付け外しする .nd-icon-is-x。
 * WordPress の is-menu-open を見ると、パネルの閉じる動きに引きずられ、押してもしばらく✕のまま残る。
 */
.wp-block-navigation__responsive-container-open.nd-icon-is-x::before {
	transform: translate(-50%, -50%) rotate(45deg);
}
.wp-block-navigation__responsive-container-open.nd-icon-is-x::after {
	transform: translate(-50%, -50%) rotate(-45deg);
}
.wp-block-navigation__responsive-container-open.nd-icon-is-x svg {
	opacity: 0;
}
/*
 * 実際に「閉じる」を処理するのはこの✕ボタン（別要素）。見た目は
 * ☰ボタン側のモーフアニメーションに任せるため、こちらの独自の✕アイコンは
 * 透明にしておく（クリック領域・機能はそのまま残す）。
 */
.wp-block-navigation__responsive-container-close svg {
	opacity: 0;
}
/* こちらもタップしたときの黒いハイライトを消す。 */
.wp-block-navigation__responsive-container-close {
	-webkit-tap-highlight-color: transparent;
}

/**
 * ハンバーガーボタン（開く／閉じるとも）をクリックした後にブラウザ標準の
 * 青い四角いフォーカス枠が出てしまうため非表示にする。
 */
.wp-block-navigation__responsive-container-open:focus,
.wp-block-navigation__responsive-container-open:focus-visible,
.wp-block-navigation__responsive-container-close:focus,
.wp-block-navigation__responsive-container-close:focus-visible {
	outline: none;
	box-shadow: none;
}

/**
 * 展開時に表示される✕（閉じる）ボタンの位置が、ハンバーガーの見た目の
 * 中心よりわずかに高い位置にあったため、少し下へ調整する。
 */
.wp-block-navigation__responsive-container-close {
	top: 6px !important;
	right: -2px !important; /* ハンバーガーの中心に対して右・上に各2pxずつ調整 */
}

/**
 * スマホメニューを開いた時の中身：
 * ・v4同様、項目を中央揃えにする（既定は右揃え）
 * ・項目タップ時に表示される既定のフォーカス枠（四角い青枠）は非表示にする
 */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container,
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
	align-items: center !important;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item,
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	text-align: center;
}
/* 「仕事実績集」のようにサブメニューを持つ項目は、それ自体が縦方向のflex
   ボックス（ラベル＋子メニュー一覧を縦に並べる箱）になっており、横位置は
   自分自身のalign-itemsで右寄せに固定されているため、これも中央寄せに
   上書きする。 */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	align-items: center !important;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:focus,
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:focus-visible {
	outline: none;
	box-shadow: none;
}

/**
 * スマホメニュー展開時のグループ分け：
 * 「事務所案内」／「仕事実績集＋その子カテゴリ」／「探究ノート＋その子カテゴリ」
 * の3つのまとまりが視覚的に分かるよう、2番目・3番目の大項目（＝
 * 仕事実績集、探究ノート。どちらもサブメニューを持つ項目）の上に
 * 区切り線を入れる。PC横並び表示（.is-menu-open が付いていない状態）
 * には出さない。
 * ・項目間には親コンテナ側のflex gap（約19.2px）が既に入っているため、
 * 　線の上下の余白が均等になるよう、margin-top側を狭く・padding-top側を
 * 　広めに配分し、線（top:0の位置）がgap込みでちょうど中央に来るようにする。
 */
.wp-block-navigation__responsive-container.is-menu-open
	.wp-block-navigation__container
	> .wp-block-navigation-item:nth-child(2),
.wp-block-navigation__responsive-container.is-menu-open
	.wp-block-navigation__container
	> .wp-block-navigation-item:nth-child(3) {
	position: relative;
}
.wp-block-navigation__responsive-container.is-menu-open
	.wp-block-navigation__container
	> .wp-block-navigation-item:nth-child(2)::before,
.wp-block-navigation__responsive-container.is-menu-open
	.wp-block-navigation__container
	> .wp-block-navigation-item:nth-child(3)::before {
	content: "";
	position: absolute;
	top: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 48px;
	height: 1px;
	background: rgba(0, 0, 0, 0.25);
}

/**
 * サブメニュー（仕事実績集・探究ノートの子カテゴリ一覧）の項目は、
 * 親項目より一回り小さい文字サイズ・少し薄い色にして階層関係を
 * 分かりやすくする。
 */
/* スマホのハンバーガー内で小さく感じるため 13px→14px。
   親項目（15px＝事務所名と同じ）より小さいまま。PC幅のドロップダウンは
   下の :not(.is-menu-open) の指定で 11.5px のまま変わらない。 */
.wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	font-size: 14px;
	color: rgba(0, 0, 0, 0.55) !important;
}
/**
 * PC 幅のドロップダウン（.is-menu-open が付かないとき）だけ、子メニューの文字を少し小さくする。
 * 幅を親項目に合わせて狭くしているので、スマホと同じ大きさだと「リノベーション」などが2行になる。
 */
.wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	font-size: 11.5px;
}
/**
 * 子メニューの文字は中央そろえ（2行に折り返したとき、左そろえだと不格好）。
 * .wp-block-navigation-item__content は flex なので、text-align だけでは効かない。justify-content: center も要る。
 */
.wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	text-align: center;
	justify-content: center;
}
/**
 * 子メニュー項目同士の間隔をほんの少し狭める。
 * 標準では項目内padding-top/bottom各5.5px（+li側margin-bottom3px）で
 * 項目間が14pxになっていたところを、paddingを1pxずつ減らして12pxにする。
 * PC幅のホバー表示（デスクトップ子メニュー）専用の調整のため、
 * スマホのハンバーガーメニュー展開時（.is-menu-open）には適用しない。
 */
.wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding-top: 4.5px !important;
	padding-bottom: 4.5px !important;
	/*
	 * 子メニューの幅は親項目の左右の「｜」のあいだ（112px 前後）しかない。
	 * 左右の余白が既定（1em）のままだと「インテリア・家具」などが2行になるので、PC 幅のドロップダウンだけ 8px に詰める。
	 */
	padding-left: 8px !important;
	padding-right: 8px !important;
}
/**
 * 子メニューの項目のあいだを 11px にする。
 * 上下の端（枠線から最初・最後の項目まで）の余白は変えないので、項目の中の padding ではなく li の margin-bottom（2px）で詰める。
 * 最後の項目は WordPress 標準で margin-bottom:0。
 */
.wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__submenu-container > li {
	margin-bottom: 2px !important;
}

/**
 * スマホのメニューを開くとき、ゆっくりフェードしながら少し上から現れる。
 * WordPress 標準は display の切り替えだけで動きが無いので、is-menu-open が付いた瞬間に CSS のアニメーションを走らせる。
 */
@media (prefers-reduced-motion: no-preference) {
	.wp-block-navigation__responsive-container.is-menu-open {
		animation: nd-nav-modal-fade-in 0.4s ease both;
	}
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
		animation: nd-nav-modal-item-in 0.45s ease both;
	}
}
@keyframes nd-nav-modal-fade-in {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}
@keyframes nd-nav-modal-item-in {
	from {
		opacity: 0;
		transform: translateY(-6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/**
 * スマホのメニューを閉じるときも、開くときと同じようにふわっと消す。
 * WordPress 標準は is-menu-open が外れた瞬間に消えるので、nav-close-animation.js が外れる直前に気づき、
 * is-menu-open を付けたまま is-menu-closing を足して、このフェードを流してから隠す。
 *
 * is-menu-open は外さないこと。外すと全画面の表示（position:fixed や縦並び）が効かなくなり、
 * 閉じる瞬間に✕のまわりへ横並びのメニューが一瞬見える。
 * 開くときのアニメーションが走り直さないよう、「.is-menu-open.is-menu-closing」の二つ重ねのセレクタで上書きする（詳細度で必ず勝つ）。
 */
@media (prefers-reduced-motion: no-preference) {
	.wp-block-navigation__responsive-container.is-menu-open.is-menu-closing {
		animation: nd-nav-modal-fade-out 0.35s ease both;
	}
	.wp-block-navigation__responsive-container.is-menu-open.is-menu-closing .wp-block-navigation-item {
		animation: nd-nav-modal-item-out 0.3s ease both;
	}
}
@keyframes nd-nav-modal-fade-out {
	from {
		opacity: 1;
	}
	to {
		opacity: 0;
	}
}
@keyframes nd-nav-modal-item-out {
	from {
		opacity: 1;
		transform: translateY(0);
	}
	to {
		opacity: 0;
		transform: translateY(-6px);
	}
}

/**
 * 子メニュー（PC 幅でホバーしたとき）の開閉も、スマホのメニューと同じ動きにそろえる。
 * WordPress 標準は 0.1 秒の opacity だけなので、0.4 秒・ease で出す。上下には動かさない。
 */
/*
 * 以下の子メニューの位置と幅（中央そろえ・区切り線のあいだに収める など）は、PC 幅の横並びのときだけ。
 * スマホの全画面表示（.is-menu-open）にまで効くと、そちらの中央そろえとぶつかってずれる。
 * そのため :not(.is-menu-open) を付けている。
 */
.wp-block-navigation__responsive-container:not(.is-menu-open) .has-child .wp-block-navigation__submenu-container {
	/*
	 * 閉じるときはフェードさせず、すぐ消す。
	 * フェードさせると、文字が先に消えて枠線と背景だけが 0.4 秒残り、空の四角が見える。
	 * 開くとき（下の aria-expanded 側）は 0.4 秒でふわっと出す。
	 */
	transition: none !important;
	will-change: opacity, transform;
	backface-visibility: hidden;
	contain: paint;
}
.wp-block-navigation__responsive-container:not(.is-menu-open) .has-child .wp-block-navigation-submenu__toggle[aria-expanded="true"] ~ .wp-block-navigation__submenu-container,
.wp-block-navigation__responsive-container:not(.is-menu-open) .has-child:not(.open-on-click):not(.open-on-hover-click):focus-within > .wp-block-navigation__submenu-container {
	/*
	 * 開いたときは親項目のすぐ下（すき間 0）で止める。
	 * 2px でもすき間があると、カーソルがそこを通るときに :hover が外れて閉じ、また開く（ちらつく）。
	 */
	transform: translate3d(0, 0, 0) !important;
	/* 開いている状態（カーソルが乗っている間）にも同じtransitionを明示しておく。
	   カーソルが離れて閉じる瞬間は、この開いている状態からベース状態へ
	   戻る形になるため、こちらにも同じ0.4秒を指定して確実に揃える。 */
	transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.4s ease !important;
	/*
	 * WordPress 標準は開いたときに min-width:200px を付けていて、詳細度も高い。
	 * そのままだと、下の「親項目の幅に合わせる」が開いた瞬間だけ 200px に戻るので、同じセレクタに !important で書く。
	 */
	width: calc(var(--nd-li-w, 120px) + 1px) !important;   /* マス 120 に合わせる（左 -1 と対。区切り線のピクセルに枠線を重ねる）。旧：calc(100% + 18.7px) */
	min-width: calc(var(--nd-li-w, 120px) + 1px) !important;
}
/**
 * 子メニューの表示位置は、WordPress標準では親項目の左端に揃える
 * （末尾の項目だけ画面端はみ出し防止のため右端揃えになる）ため、項目に
 * よって寄り方がバラバラに見えていた。幅を親項目と同じにし（下の決まり）、
 * 左端を親項目の左端（区切り線）に合わせて統一する。ずらしの transform は使わない。
 */
.wp-block-navigation__responsive-container:not(.is-menu-open) .has-child .wp-block-navigation__submenu-container {
	left: -0.5px !important;   /* 旧 1.5px（文字の「|」時代）→ -1 → -0.5 */
	right: auto !important;
	transform: none !important;
}
/**
 * 子メニューの幅を、親項目（例：「仕事実績集」）の左右の「｜」のあいだに合わせる。
 * 中央そろえ（left:50% ＋ translateX(-50%)）と組み合わせ、右の「｜」まで届くよう、幅を +20px、位置を +10px 右にしている。
 */
.wp-block-navigation__responsive-container:not(.is-menu-open) .has-child .wp-block-navigation__submenu-container {
	width: calc(var(--nd-li-w, 120px) + 1px);   /* 旧 calc(100% + 18.7px) */
	min-width: calc(var(--nd-li-w, 120px) + 1px);
}
/**
 * 子メニューのいちばん上と下の、文字と枠線のあいだは 11.5px。
 */
.wp-block-navigation__responsive-container:not(.is-menu-open) .has-child .wp-block-navigation__submenu-container {
	padding-top: 5.5px;
	padding-bottom: 5.5px;
}

/**
 * 「ページの先頭へ戻る」ボタン（プラグインなし）。
 * 仕事実績集の一覧ページ等にある画面下固定の注記バー（.wa-footnote）に
 * 重ならないよう、bottomの余白を広めに取ってある。
 */
#nd-back-to-top {
	position: fixed;
	right: 30px;
	bottom: 60px;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1px solid rgba(0, 0, 0, 0.25);
	background: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	cursor: pointer;
	color: rgba(0, 0, 0, 0.8);
	z-index: 60;
	opacity: 0;
	visibility: hidden;
	/* 円のボタンごと右に 4px 寄せ、アイコンは円の中心に置く。表示のアニメーションの translateY と合わせて書く。
 */
	transform: translateX(4px) translateY(8px);
	transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}
#nd-back-to-top.is-visible {
	opacity: 0.85;
	visibility: visible;
	transform: translateX(4px) translateY(0);
}
#nd-back-to-top:hover {
	opacity: 1;
	border-color: rgba(0, 0, 0, 0.25);
}
#nd-back-to-top svg {
	width: 16px;
	height: 16px;
}
/* スマホ幅ではハンバーガーメニューのタップ領域等と競合しないよう少し内側・下げに調整 */
@media (max-width: 480px) {
	#nd-back-to-top {
		right: 14px;
		bottom: 56px;
	}
}

/**
 * 「詳細」ブロック（summary）を押したときに出る青い枠（フォーカスリング）を消す。
 * FAQ や設計料のアコーディオンだけでなく、詳細ブロックすべてに効くよう summary に直接指定している。
 */
summary {
	outline: none;
}
summary:focus,
summary:focus-visible {
	outline: none;
}

/**
 * ============================================================
 * 事務所案内ページ
 * ============================================================
 * 事務所案内と設計料のモックアップ（HTML）の配色・余白・書体を、ブロックエディタの上で再現する。
 * 本文幅は .works-archive などと同じ 645px。色や罫線は .nd-about の中だけに効き、サイト全体には影響しない。
 * 写真（プロフィール・もんちゃん）はふつうの画像ブロックなので、エディタの「置き換え」でいつでも差し替えられる。
 */
/* このページの投稿タイトルを CSS で隠す指定はやめた（HTML に h1 が残り、本文の h1「事務所案内」と合わせて2つになっていた）。
   いまは functions.php の nd_drop_duplicate_post_title() が、本文に h1 のあるページでは投稿タイトルブロックを出さない。 */
/* 本文を包むグループの上の罫線（page テンプレート標準）も、見出しが無いと一本だけ浮いて見えるので、このページでは消す。
 */
/* 投稿タイトルブロックが出なくなったので、:has(> .wp-block-post-title) では当たらない。
   目印は本文ブロック（.wp-block-post-content）。これが外れると上の余白 30px と罫線が戻る（スマホで ABOUT が 31px 下がる）。 */
body.page-id-19902 main > .wp-block-group:has(> .wp-block-post-content) {
	border-top: none !important;
}
/* タイトル用の上の余白（padding-top:70px）と本文との margin-top（19.2px）も、Works・Note のヘッダー直下（約22px）にそろえて縮める。
 */
body.page-id-19902 main > .wp-block-group:has(> .wp-block-post-content) {
	padding-top: 0 !important;
}
body.page-id-19902 .entry-content {
	margin-top: 14px !important;
}
/* 節を区切る線の上下をともに 35 にそろえる。
   文章で終わる節は段落の下の 14px が残って線が遠くなるので、節の最後の要素の下マージンを 0 にする。
   CONCEPT の末尾にある空の段落も拾えるよう、二つ目のセレクタを並べている。 */
body.page-id-19902 .nd-about-section {
	padding-top: 35.4px !important;   /* 線から次の英語の墨までを 45 に */
	/* 節と節のあいだにブロックの余白 19.2px が挟まり、線の下だけが広かった。上下を 35 にそろえるため 0 にする。
 */
	margin-top: 0 !important;
}
/* 本文の墨の下端から線までを 45 に。PROFILE は最後が経歴の表で、
   表の最終行が自前の余白を持つため 7px 弱小さい値にする。 */
body.page-id-19902 .nd-about-section:not(:has(.nd-about-flow)):not(:has(.nd-about-qa)):not(:has(.nd-about-fee-block)) {
	padding-bottom: 36.3px !important;
}
body.page-id-19902 #about-profile {
	padding-bottom: 29.3px !important;
}

/* 線の無い三節（PROCESS・FAQ・PRICE）。中身が箱なので線は入れず、
   節の切れ目だけ 35.4→40 に広げる（次の節の padding-top 35.4 に 4.6 を足す）。 */
body.page-id-19902 #about-process,
body.page-id-19902 #about-faq,
body.page-id-19902 #about-price {
	padding-bottom: 4.6px !important;
}
/* スマホだけ。最後の節（PRICE）の箱の下からフッターの線までを、箱の一段の高さ（約 62px）にそろえる（54→62。PC は幅を狭めるとそろっている） */
@media (max-width: 640px) {
	body.page-id-19902 #about-price {
		padding-bottom: 12.6px !important;
	}
}

body.page-id-19902 .nd-about-section > p:empty {
	display: none !important;
}
body.page-id-19902 .nd-about-section > *:last-child,
body.page-id-19902 .nd-about-section > *:has(+ p:empty:last-child) {
	margin-bottom: 0 !important;
}

/* Aboutの各節：見出しと説明の間を 16→35（+19）。
   英語の行と見出しはくっついたまま。Contact は同じ nd-about を共有するので
   About のページに限ってかける。 */
body.page-id-19902 .nd-about-sec-title {
	margin-bottom: 35px !important;
}

/* 資格・専門の三つのかたまりの間を 19.2→35。
   名前とリストの間（14）はそのまま。見出し下の 35 と同じ拍に乗せる。 */
body.page-id-19902 .nd-about-pillar {
	margin-top: 35px !important;
}
#about-faq .nd-about-sec-title {
	margin-bottom: 21px !important;
}
body.page-id-19902 main {
	margin-top: 0 !important;
}

/*
 * 事務所案内ページだけ、ヘッダー直下の区切り線とその余白を無くす（ほかのページはそのまま）。
 * main の margin-top は theme.json 由来のインライン style なので、!important で上書きする。
 */

.nd-about {
	/*
	 * About の線と文字の色は、仕事実績集（works.css）と同じ黒の rgba（sumi / gray / hairline）でモノトーンにする。
	 * ベンガラは見出しのラベル（FAQ・PRICE）と「仕事の進め方」の丸数字にだけ残す（Works がタグや eyebrow にだけ使うのと同じ）。
	 */
	--nd-about-kinari: #FFFFFF;
	--nd-about-sumi: rgba(0, 0, 0, 0.8);
	--nd-about-gray: rgba(0, 0, 0, 0.5);
	--nd-about-hairline: rgba(0, 0, 0, 0.25);
	--nd-about-bengara: #9C4A34;
	/*
	 * FAQ と設計料のアコーディオンは、v4 と同じ「罫線で囲んだ箱」。色はすべてモノクロームで、黒の半透明（rgba(0,0,0,X)）にそろえている。
	 */
	--nd-about-box-border: rgba(0, 0, 0, 0.25);
	--nd-about-box-bg: rgba(0, 0, 0, 0.03);
	--nd-about-box-mono-icon: rgba(0, 0, 0, 0.35);
	/* 縦線をトップの枠（芯々720）にそろえる。組み幅 645 はそのまま、左右 37px で外法 721（border-box）。
	   About は「部屋の壁」だけで、欄外の細線（margin-composition）は出さない。Contact は線もなし。 */
	max-width: 645px;
	margin: 0 auto;
	color: var(--nd-about-sumi);
}
/* About の PC の縦線は入れない。About・Contact は線なし。Works・Note だけが枠を持つ。 */
/* スマホだけ。About の左右余白は親（has-global-padding）の 30px で、Works・Note（20px）より 10px 狭かった。
   箱を左右 10px ずつ張り出して、本文の左端を Works・Note と揃える。PC には影響しない */
@media (max-width: 640px) {
	/* .nd-about 自身の margin は親テーマが !important で auto に固定しているので効かない。親（本文ブロック）の余白を 30→20px に */
	.page-id-19902 .entry-content.has-global-padding,
	.page-id-20362 .entry-content.has-global-padding {   /* Contact も同じ */
		padding-left: 20px !important;
		padding-right: 20px !important;
	}
}

/* About・Contact の本文幅を 645 → 680（枠の線から 20）に。Works・Note と同じ柱間。箱は中央揃えなので左右 17.5 ずつ広がる。PC だけ */
@media (min-width: 641px) {
	.nd-about { max-width: 680px; }
}
/* About の冒頭を Works・Note と同じ二段（ABOUT ／ 事務所案内）にする。「事務所案内」は見出しの大きさ（h1 と同じ 23px/800）。 */
/* h1「事務所案内」を Note の見出し（.na-header h1：21px/800/lh1.125/ls-0.1/上 4px）と同じ寸法にする。 */
.nd-about-header .nd-about-h1 {
	font-size: 21px !important;
	font-weight: 800 !important;
	line-height: 1.125 !important;
	letter-spacing: -0.1px !important;
	margin: 4px 0 0 !important;
}
.nd-about-header { padding-bottom: 15px !important; }

.nd-about-header {
	padding: 8px 0 22px;
	border-bottom: 1px solid var(--nd-about-hairline);
	margin-bottom: 0 !important;
}
.nd-about-eyebrow {
	font-size: 11px;
	letter-spacing: 0.12em;
	color: var(--nd-about-gray);
	margin: 0 !important;
}
.nd-about-h1 {
	color: var(--nd-about-sumi);
}

.nd-about-section {
	padding: 34px 0;
	border-bottom: 1px solid var(--nd-about-hairline);
	margin-bottom: 0 !important;
}
.nd-about-section:last-child {
	border-bottom: none;
}
/*
 * 節のあいだには区切り線を引くが、次の3か所だけは無くす。
 * 「仕事の進め方」→「よくある質問」、「よくある質問」→「設計料について」、「設計料について」→「お問い合わせ（CONTACT）」。
 * ページの中身にクラスは足さず、各節の中の既存の目印（PROCESS は .nd-about-flow、FAQ は .nd-about-qa、PRICE は .nd-about-fee-block）で見分ける。
 * 自分の下線を消すと、次の節とのあいだの線が消える。
 *
 * 線を消す側は padding-bottom も 0 にする。上下の padding（34px＋34px）が両方残ると 68px あき、線のある所より間延びする。
 * 次の節の padding-top（34px）だけで間をつくり、線のある所と同じ「見出しの前 34px」にそろえる。
 */
.nd-about-section:has(.nd-about-flow),
.nd-about-section:has(.nd-about-qa),
.nd-about-section:has(.nd-about-fee-block) {
	border-bottom: none;
}

.nd-about-sec-label {
	letter-spacing: 0.1em;
	font-weight: 700;
}
.nd-about-sec-title {
	font-size: 17px;
	font-weight: 800;
	margin: 0 0 16px !important;
	color: var(--nd-about-sumi);
}

.nd-about-section p {
	font-size: 14px;
	line-height: 2.05;
	color: var(--nd-about-sumi);
	margin: 0 0 14px !important;
}
/* プライバシーポリシー等でwp:listブロックを使った際、テーマ標準の
 * リストfont-size（22px）が本文（T05・14px）と大きく食い違っていたため、
 * 本文と同じ大きさに揃える。 */
.nd-about-section ul,
.nd-about-section ol,
.nd-about-section li {
	font-size: 14px;
	line-height: 2.05;
	color: var(--nd-about-sumi);
}
.nd-about-section p:last-child {
	margin-bottom: 0 !important;
}

/* プロフィール（代表写真＋氏名） */
.nd-about-profile-top {
	display: flex;
	gap: 16px;
	/* 写真の高さが自由に変えられるようになった（幅・高さ固定を解除した）ため、
	   写真の「上」ではなく「縦方向の中央」に氏名テキストを揃える方が、
	   どんな比率の写真を入れても綺麗に見える。 */
	align-items: center;
	margin-bottom: 18px !important;
}
/* 写真の幅と高さは CSS で固定しない。エディタ（サイドバーの「幅」「高さ」やドラッグ）で決める。
 */
.nd-about-photo-sm {
	flex-shrink: 0;
	margin: 0 !important;
}
.nd-about-photo-sm img {
	display: block;
	border-radius: 4px;
}
.nd-about-profile-name-block {
	padding-top: 2px;
	margin-top: 0 !important; /* 仕事の進め方と同じ原因のWP自動余白を念のため打ち消す */
}
.nd-about-name {
	font-weight: 800;
}
/*
 * 「もん ♀」の♀は、文字ではなくインライン SVG で描く。
 * ♀は和文の書体に無く、代わりの書体で描かれる。その縦位置がブラウザで違い、iPhone の Safari だけ下にずれた。SVG ならどこでも同じに見える。
 * 色は currentColor で文字色（--nd-about-sumi）に従う。太さは stroke-width で決め、「もん」の太字（800）は受け継がない（♀は太字にしない）。
 */
.nd-about-name-symbol {
	display: inline-flex;
	align-items: center;
	vertical-align: middle;
	/* SVG の位置の微調整は -1px（-3px では上がりすぎ）。自前の図形なので、固定の px がどの環境でも同じに効く。
 */
	transform: translateY(-1px);
}
.nd-about-name-symbol svg {
	display: block;
	color: var(--nd-about-sumi);
}

/* 略歴テーブル */
.nd-about-history.wp-block-table table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
	margin-top: 4px;
	border: none;
}
.nd-about-history.wp-block-table td {
	padding: 9px 0;
	border-width: 0 0 1px 0 !important;
	border-style: solid !important;
	/* 他の罫線（0.2）より薄く、0.1に調整 */
	border-color: rgba(0, 0, 0, 0.1) !important;
	vertical-align: top;
}
/* 最終行（現在）の下線は出さない */
.nd-about-history.wp-block-table tr:last-child td {
	border-bottom: none !important;
}
.nd-about-history.wp-block-table td:first-child {
	width: 72px;
	color: var(--nd-about-gray);
	white-space: nowrap;
	/* 年の行の高さを右の欄（1.75）とそろえる。1.4 のままだと年の文字が約2px上に浮いていた */
	line-height: 1.75;
}
.nd-about-history.wp-block-table td:last-child {
	color: var(--nd-about-sumi);
	line-height: 1.75;
}

/* 資格・専門 */
.nd-about-pillar {
	margin-bottom: 16px !important;
}

/*
 * もん（スタッフ紹介）。PROFILE（代表）と同じ組み方にする。
 * 上の段は写真＋役職・名前・ローマ字の横並び（.nd-about-profile-name-block を使う）、説明文はその下に全幅で置く。
 * 写真の横の狭い列に説明文まで詰めると、スマホで極端に細く折り返す。
 */
.nd-about-monchi {
	margin-bottom: 18px !important;
}
/* もんの写真も同様に、幅・高さをCSSで固定せず自由に調整できるようにする。 */
.nd-about-photo-md {
	flex-shrink: 0;
	margin: 0 !important;
}
.nd-about-photo-md img {
	display: block;
	border-radius: 4px;
}
.nd-about-monchi-text {
	margin-top: 0 !important; /* 仕事の進め方と同じ原因のWP自動余白を念のため打ち消す */
}
.nd-about-monchi-text p {
	font-size: 13.5px;
	line-height: 2;
}

/**
 * よくある質問（押すと開くアコーディオン）。
 */
/*
 * FAQ・設計料：v4 と同じ「罫線で囲んだ箱＋＋/×のアイコン」。
 * 中身はただの div（core/group）で、クリックで開閉する（about-accordion.js）。
 * details / summary は使わない。スマホでタップのハイライトが残るなどの癖が取れなかった。
 */
/*
 * 箱どうしはすき間なくつなぐ。
 * 2つ目からの項目のタイトルには上の罫線を付けず（border-top: none）、一つ前の項目の下の罫線だけで境にする。
 * margin-top:-1px で線を重ねる方式は、実機でわずかなすき間が残った。
 */
.nd-about-qa,
.nd-about-fee-block,
.nd-about-step {
	margin: 0 !important;
}

.nd-about-qa-title,
.nd-about-fee-title,
.nd-about-step-title {
	position: relative;
	cursor: pointer;
	background-color: var(--nd-about-box-bg);
	border: 1px solid var(--nd-about-box-border);
	font-weight: 600;
	-webkit-tap-highlight-color: transparent;
}
/*
 * 「.nd-about-section p { margin: 0 0 14px !important; }」のほうが詳細度が高く、margin-bottom だけが負けて 14px 残る（タイトルと箱のあいだのすき間の原因）。
 * 親のクラスも含めて詳細度を上げ、こちらを勝たせる。
 */
.nd-about-qa > .nd-about-qa-title,
.nd-about-fee-block > .nd-about-fee-title,
.nd-about-step > .nd-about-step-title {
	margin-bottom: 0 !important;
}
/*
 * 2つ目以降の項目（直前にも同種のBoxがある場合）だけ上罫線を外し、
 * 直前の項目の下罫線1本だけで境界を表現する。：first-childだと見出しが
 * 直前にある場合に正しく判定できないため、隣接セレクタ（+）で
 * 「同じ種類が直前にあるか」で判定する。
 */
.nd-about-qa + .nd-about-qa > .nd-about-qa-title,
.nd-about-fee-block + .nd-about-fee-block > .nd-about-fee-title,
.nd-about-step + .nd-about-step > .nd-about-step-title {
	border-top: none;
}
.nd-about-qa-title,
.nd-about-step-title {
	padding: 14px 40px 14px 16px !important;
}
.nd-about-fee-title {
	padding: 14px 40px 14px 16px !important;
}
/* v4と同じ、横棒2本を重ねた＋アイコン（開くと回転して×になる） */
.nd-about-qa-title::before,
.nd-about-qa-title::after,
.nd-about-fee-title::before,
.nd-about-fee-title::after,
.nd-about-step-title::before,
.nd-about-step-title::after {
	content: "";
	position: absolute;
	top: 50%;
	right: 16px;
	width: 12px;
	height: 1px;
	margin-top: -0.5px;
	background-color: var(--nd-about-box-mono-icon);
	transition: transform 0.3s ease;
}
.nd-about-qa-title::after,
.nd-about-fee-title::after,
.nd-about-step-title::after {
	transform: rotate(90deg);
}
.nd-about-qa.is-open > .nd-about-qa-title::before,
.nd-about-fee-block.is-open > .nd-about-fee-title::before,
.nd-about-step.is-open > .nd-about-step-title::before {
	transform: rotate(45deg);
}
.nd-about-qa.is-open > .nd-about-qa-title::after,
.nd-about-fee-block.is-open > .nd-about-fee-title::after,
.nd-about-step.is-open > .nd-about-step-title::after {
	transform: rotate(-45deg);
}

/*
 * 開閉の動きは max-height のトランジション。
 * 行き先の高さは about-accordion.js が箱の実際の高さ（scrollHeight）を測ってインライン style に入れる。.is-open 側には max-height を書かない。
 * ほかの方法をやめた理由：
 * ・jQuery の slideUp / slideDown は、実機で 0.4 秒のはずが2コマほどで開いた。
 * ・grid-template-rows（0fr→1fr）は、表（table）を含む設計料の箱だけ、閉じても約34px残った（table の最小の大きさが 0fr の計算に効く）。
 * ・max-height を大きな固定値（1200px）にすると、中身の高さに届いたところで止まって見え、動きが均一にならない。
 */
.nd-about-qa-box,
.nd-about-fee-box,
.nd-about-step-box {
	overflow: hidden;
	max-height: 0;
	border: 1px solid transparent;
	border-top: none;
	/*
	 * 閉じている間は border-bottom の太さも 0 にする。
	 * 色を transparent にするだけだと、1px の白いすき間が前の項目の下線と次のタイトルのあいだに見える。
	 */
	border-bottom-width: 0;
	/* WordPressのブロック間隔（core/groupの2番目の子要素への自動margin-top）
	   により、タイトルとBoxの間に19.2pxの隙間ができてしまうため明示的に0にする */
	margin-top: 0 !important;
	padding-top: 0 !important;
	padding-bottom: 0 !important;
	padding-left: 16px !important;
	padding-right: 16px !important;
	/*
	 * border-bottom-width は動かさずに瞬時に切り替え、border-color だけをフェードさせる。
	 * 0↔1px を動かすと、開き始めに一瞬詰まって見える。
	 */
	transition:
		max-height 0.35s ease,
		padding-top 0.35s ease,
		padding-bottom 0.35s ease,
		border-color 0.35s ease;
}
.nd-about-qa.is-open > .nd-about-qa-box,
.nd-about-fee-block.is-open > .nd-about-fee-box,
.nd-about-step.is-open > .nd-about-step-box {
	/* max-height自体はJS側でBoxの実際の高さぶんだけインラインstyleとして
	   設定する（about-accordion.js参照）。ここではpadding・border-colorの
	   開いた状態の見た目だけを指定する。 */
	padding-top: 16px !important;
	padding-bottom: 16px !important;
	border-color: var(--nd-about-box-border);
	border-bottom-width: 1px;
}
.nd-about-qa-box > *:first-child,
.nd-about-fee-box > *:first-child,
.nd-about-step-box > *:first-child {
	margin-top: 0 !important;
}

/* 設計料について：リード文 */
.nd-about-fee-lead strong {
	color: var(--nd-about-sumi);
	font-weight: 700;
}
.nd-about-fee-sub {
	/* 表内の50㎡・100㎡等と同じ大きさに統一
	 * （.nd-about-section p の詳細度がこのクラス単体より高いため !important で明示的に上書き） */
	font-size: 13px !important;
	/* ボックス内の文字色をFAQボックスと同じ濃さ（--nd-about-sumi）に統一 */
	color: var(--nd-about-sumi) !important;
	/*
	 * 耐震診断ボックスのみ、同じ行の右側に年度表記
	 * （[nd_fiscal_year]版・4月で自動繰り上げ）を追加。左右に振り分ける。
	 */
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 8px;
}
.nd-about-fee-sub-year {
	flex-shrink: 0;
	white-space: nowrap;
}
.nd-about-fee-table.wp-block-table table {
	width: 100%;
	border-collapse: collapse;
	margin: 0 !important;
	font-size: 13px;
	border: none;
}
/*
 * WordPress core（block-library）が table ブロックの thead に
 * デフォルトで border-bottom: 3px solid を当てており、border-collapse時に
 * th 側の1px指定より太い方が優先されて見出し行の下線だけ太く見えていた
 * （濃さの問題ではなく、実際に3pxで描画されていたのが原因）。
 * thead 自体を明示的に上書きして th 側の1px指定に揃える。
 */
.nd-about-fee-table.wp-block-table thead {
	border-bottom-width: 1px !important;
	border-bottom-style: solid !important;
	border-bottom-color: rgba(0, 0, 0, 0.25) !important;
}
.nd-about-fee-table.wp-block-table th {
	text-align: right;
	font-weight: 500;
	font-size: 11px;
	/* 見出し行（参考面積／㎡単価／参考価格）の文字色は、FAQ の箱と同じ（--nd-about-sumi）。
 */
	color: var(--nd-about-sumi);
	padding: 6px 8px;
	border-width: 0 0 1px 0 !important;
	border-style: solid !important;
	border-color: rgba(0, 0, 0, 0.25) !important; /* 見出しの下線の濃さ */
}
.nd-about-fee-table.wp-block-table th:first-child {
	text-align: left;
	/* 見出し「参考面積」の「積」の右端を、下の「300㎡」の㎡の右端にそろえる。
	 見出し11px・数字13px（スマホ13px・15px）で幅が違うので、実測の差から 3px 戻した分だけ左へ出す。 */
	text-indent: -3.7px;
}
@media (max-width: 665px) {
	.nd-about-fee-table.wp-block-table th:first-child {
		text-indent: -6.4px;
	}
}
.nd-about-fee-table.wp-block-table td {
	text-align: right;
	padding: 8px;
	border-width: 0 0 1px 0 !important;
	border-style: solid !important;
	/* 中間の行区切り線は0.1に。最下部（最終行）だけ見出し線と同じ0.2に揃える（下のtr:last-childルール参照） */
	border-color: rgba(0, 0, 0, 0.1) !important;
}
.nd-about-fee-table.wp-block-table tr:last-child td {
	border-color: rgba(0, 0, 0, 0.25) !important;
}
.nd-about-fee-table.wp-block-table td:first-child {
	text-align: left;
	/* 数字を等幅にし、2桁の面積（10㎡・30㎡・50㎡）は本文の頭に数字幅の空白（U+2007）を入れて、
	 * 3桁は列の左端、2桁は1桁分下がる形に（右寄せは右に寄りすぎ）。㎡の位置が揃う */
	font-variant-numeric: tabular-nums;
	/* 行見出し（50㎡／100㎡など）も同じ濃さ（--nd-about-sumi）。
 */
	color: var(--nd-about-sumi);
}
.nd-about-fee-table.wp-block-table td:last-child {
	color: var(--nd-about-sumi);
	/* 金額（40万円等）のBoldをやめ、通常の太さにする。 */
	font-weight: 400;
}
.nd-about-fee-note {
	/* 表から 20px 下げる。左は表の見出し（参考面積）の文字頭にそろえて 8px 下げる。
	 クラス一つのセレクタだと、margin-left だけが 0px に上書きされる（原因は見つかっていない）。
	 親のクラス（.nd-about-fee-box）込みのセレクタで書く。margin-top もそろえて同じ書き方にしている。 */
	font-size: 13px !important;
	/* ボックス内の文字色をFAQボックスと同じ濃さ（--nd-about-sumi）に統一 */
	color: var(--nd-about-sumi) !important;
	/* .nd-about-section p の line-height:2.05 を引き継ぐと行間が広すぎるため上書き */
	line-height: 1.6 !important;
}
.nd-about-fee-note a {
	color: var(--nd-about-sumi);
	text-decoration: underline;
	text-decoration-color: rgba(0, 0, 0, 0.35);
}
.nd-about-fee-box .nd-about-fee-note {
	margin: 15px 0 0 8px !important;
}
/*
 * 注記が2つ続くときは間を詰めて、一つの補足に見せる。
 * margin-top だけでなく line-height（2.05）も詰める。
 * 直前の注記の margin-bottom は「.nd-about-section p { margin:0 0 14px !important }」に負けて 14px 残るので、親のクラス込みで 0 にする。
 */
.nd-about-fee-box .nd-about-fee-note:has(+ .nd-about-fee-note) {
	margin-bottom: 0 !important;
}
.nd-about-fee-box .nd-about-fee-note + .nd-about-fee-note {
	margin-top: 2px !important;
}
/* 最後の注記（京都市耐震診断事業の一文）の下だけ5px分の余白を追加 */
.nd-about-fee-box .nd-about-fee-note:last-child {
	margin-bottom: 5px !important;
}
/*
 * ページ末尾の CONTACT への入り口。「こちら」の文字にリンクの下線を付ける。
 */
.nd-about-contact-lead a {
	color: var(--nd-about-sumi);
	text-decoration: underline;
	text-decoration-color: rgba(0, 0, 0, 0.35);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}
.nd-about-contact-lead a:hover {
	text-decoration-color: var(--nd-about-sumi);
}
/* 「内容を拝見のうえ…」は別の段落にせず、<br> で改行して .nd-about-contact-lead の一段落にまとめてある（HTML 側）。
   段落を分けると margin のぶん、ほかの本文より行のあいだが広く見える。 */


/*
 * スマホ（665px 以下。ハンバーガーの切り替えと同じ）だけ、事務所案内の本文と注記を 2px 大きくする。
 * PC の 13〜14px は、狭い画面では小さく感じる。
 */
@media (max-width: 665px) {
	.nd-about-section p {
		font-size: 16px;
	}
	.nd-sp-br {
		display: inline;
	}
	.nd-about-section ul,
	.nd-about-section ol,
	.nd-about-section li {
		font-size: 16px;
	}
	.nd-about-fee-sub {
		font-size: 15px !important;
	}
	.nd-about-history.wp-block-table table {
		font-size: 15px;
	}
	.nd-about-fee-table.wp-block-table table {
		font-size: 15px;
	}
	.nd-about-fee-table.wp-block-table th {
		font-size: 13px;
	}
	.nd-about-fee-note {
		font-size: 15px !important;
	}
}

/**
 * 事務所案内 FAQ の答え（48字）
 * PC：答えを1行に収める。箱の右の内余白を0、答えの字間を -0.15px（問いは -0.1px のまま）。
 *     判定は既存のスマホ切り替え（max-width:665px）の外側＝666px以上。
 * スマホ：「Q．」「A．」を除いた本文の頭を揃える（2行目以降を字下げ）。
 *     幅は実測（Q．太字 1.75em／A． 1.642em）。
 */
@media (min-width: 666px) {
	.nd-about-qa-box {
		padding-right: 0 !important;
	}
	.nd-about-a {
		letter-spacing: -0.15px;
	}
	/* 仕事の進め方の説明も48字（4字×中央12スパン）。同じ扱いで1行に。
	   こちらは -0.15 だと余裕0〜1.5pxしかないので -0.25（余裕4.8〜6.3px） */
	.nd-about-step-box {
		padding-right: 0 !important;
	}
	.nd-about-step-text {
		letter-spacing: -0.25px;
	}
}
@media (max-width: 665px) {
	.nd-about-qa-title {
		padding-left: calc(16px + 1.75em) !important;
		text-indent: -1.75em;
	}
	.nd-about-a {
		padding-left: 1.642em;
		text-indent: -1.642em;
	}
}

/**
 * ダークモード。
 * ・効かせる端末：スマホ・タブレットだけにするなら (hover: none) and (pointer: coarse)。画面幅（665px）で分けると、横向きにしたときに外れて白に戻る。
 * ・配色：背景は真っ黒ではなく #191919、文字は rgba(255,255,255,0.85)（真っ白はまぶしい）。線は暗い地では強く見えるので 0.18 前後。ベンガラ（#9C4A34）は沈むので #C97C5D に起こす。
 * ・ここで扱うのはヘッダー・トップへ戻るボタン・事務所案内。仕事実績集と探究ノートは、それぞれの CSS 変数（--sumi など）で持つ。
 */
/* いまは端末の条件を付けず、OS のダークモードの設定だけで効く（PC でも）。
 スマホ・タブレットだけに戻すなら (hover: none) and (pointer: coarse) を足す。 */
/* プライバシーポリシーページ（page-id-3）。About/Contact と同じ nd-about クラスを流用している。About と同じく、目印は本文ブロック（タイトルブロックは出力されない） */
body.page-id-3 main > .wp-block-group:has(> .wp-block-post-content) {
	border-top: none !important;
	padding-top: 0 !important;
}
body.page-id-3 main {
	margin-top: 0 !important;
}
body.page-id-3 .entry-content {
	margin-top: 14px !important;
}


/**
 * プライバシーポリシーページ（page-id-3）だけの微調整。
 * ・各章末尾の段落と次の見出しのあいだを 24px。
 * ・見出し（nd-about-sec-title。共通のクラスなので詳細度を上げてこのページだけ上書き）の太さは 600（800 では重い）。
 */
body.page-id-3 .nd-about-section p {
	margin-bottom: 24px !important;
}
body.page-id-3 .nd-about-sec-title {
	margin-bottom: 11px !important;
}
body.page-id-3 .nd-about-section {
	padding-top: 17.8px !important;
}
body.page-id-3 .nd-about-section a {
	text-decoration-color: rgba(0, 0, 0, 0.35);
}
@media (prefers-color-scheme: dark) {
	body.page-id-3 .nd-about-section a {
		text-decoration-color: rgba(255, 255, 255, 0.35);
	}
}
body.page-id-20362 a[href*="privacy-policy"] {
	text-decoration-color: rgba(0, 0, 0, 0.35);
}
@media (prefers-color-scheme: dark) {
	body.page-id-20362 a[href*="privacy-policy"] {
		text-decoration-color: rgba(255, 255, 255, 0.35);
	}
}

@media (prefers-color-scheme: dark) {
	body {
		background-color: rgba(25, 25, 25, 1);
		color: rgba(255, 255, 255, 0.85);
	}
	/* ヘッダー（スティッキー背景）とモバイルメニューの区切り線・separator */
	.wp-block-group.alignfull.is-layout-flow:has(.nd-header-row) {
		background: rgba(25, 25, 25, 1);
		border-bottom-color: rgba(255, 255, 255, 0.35);
	}
	/* About ページは body.page-id-19902 でこの線を消している（ライト・ダーク共通）。
	 そちらのほうが詳細度が高く、上のダーク用の色だけでは線が戻らないので、ダークモードだけ About にも線を出す。ライトモードでは消したまま。 */
	body.page-id-19902 .wp-block-group.alignfull.is-layout-flow:has(.nd-header-row) {
		border-bottom-width: 1px !important;
		border-bottom-style: solid !important;
		border-bottom-color: rgba(255, 255, 255, 0.35) !important;
	}

	.wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__container > .wp-block-navigation-item + .wp-block-navigation-item > .wp-block-navigation-item__content::before {
		color: rgba(255, 255, 255, 0.35);
	}
	/* ハンバーガーを開いた全画面メニュー本体の背景。
	   WordPress標準の.has-base-background-colorが
	   background-color:var(--wp--preset--color--base) !important; という
	   形で白を強制しているため、こちらも!importantで、かつより詳細度の
	   高いセレクタ（.is-menu-open付き）で上書きする。子メニューや各項目は
	   背景を持たずこの親要素の色をそのまま透過して見せているだけなので、
	   ここ1箇所を直せばメニュー全体が反転する。 */
	.wp-block-navigation__responsive-container.is-menu-open {
		background-color: rgba(25, 25, 25, 1) !important;
		/* この要素自体が .has-contrast-color（color:…!important; 黒固定）を持ち、閉じるボタン（×）など色を個別に持たない子はここから受け継ぐだけ。
		   color は受け継がれるので、ここを上書きすれば閉じるボタンなども明るくなる。 */
		color: rgba(255, 255, 255, 0.85) !important;
	}
	/* メニュー項目（リンク）自体は.wp-block-navigation-item__content
	   に直接.has-contrast-colorが付いており、そちらの!importantが親からの
	   継承より優先されてしまうため、別途明示的に上書きが必要。開いた
	   全画面メニュー内の全項目（親項目・子メニュー項目の両方）に一括で効く。 */
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
		color: rgba(255, 255, 255, 0.85) !important;
	}
	/* モバイルメニュー内の横区切り線（L06相当） */
	.wp-block-navigation__responsive-container.is-menu-open
		.wp-block-navigation__container
		> .wp-block-navigation-item:nth-child(2)::before,
	.wp-block-navigation__responsive-container.is-menu-open
		.wp-block-navigation__container
		> .wp-block-navigation-item:nth-child(3)::before {
		background: rgba(255, 255, 255, 0.35);
	}
	/* トップへ戻るボタン */
	#nd-back-to-top {
		background: rgba(35, 35, 35, 1);
		border-color: rgba(255, 255, 255, 0.35);
		color: rgba(255, 255, 255, 0.85);
	}
	#nd-back-to-top:hover {
		border-color: rgba(255, 255, 255, 0.35);
	}

	/* 事務所案内ページ：配色トークンをまとめて反転 */
	.nd-about {
		--nd-about-kinari: rgba(25, 25, 25, 1);
		--nd-about-sumi: rgba(255, 255, 255, 0.85);
		--nd-about-gray: rgba(255, 255, 255, 0.6);
		--nd-about-hairline: rgba(255, 255, 255, 0.3);
		--nd-about-bengara: rgba(201, 124, 93, 1);
		--nd-about-box-border: rgba(255, 255, 255, 0.3);
		--nd-about-box-bg: rgba(255, 255, 255, 0.05);
		--nd-about-box-mono-icon: rgba(255, 255, 255, 0.4);
	}

	.nd-about-fee-note a {
		text-decoration-color: rgba(255, 255, 255, 0.6);
	}
	.nd-about-fee-note a:hover {
		text-decoration: none;
	}
	/* ダークモードでは白抜き太字のかすれ（滲み）で漢字がつぶれて見えるため、
	   ダークモードのみフォントウェイトを800→700に落とす（ライトモードは変更なし） */
	.nd-about-sec-title {
		font-weight: 700;
	}
	.nd-about-contact-lead a {
		text-decoration-color: rgba(255, 255, 255, 0.6);
	}
	.nd-about-contact-lead a:hover {
		text-decoration: none;
	}
	/* 料金表の罫線は変数化されておらず直接rgba指定のため、個別に反転する */
	.nd-about-fee-table.wp-block-table thead {
		border-bottom-color: rgba(255, 255, 255, 0.3) !important;
	}
	.nd-about-fee-table.wp-block-table th {
		border-color: rgba(255, 255, 255, 0.3) !important;
	}
	.nd-about-fee-table.wp-block-table td {
		border-color: rgba(255, 255, 255, 0.2) !important;
	}
	.nd-about-fee-table.wp-block-table tr:last-child td {
		border-color: rgba(255, 255, 255, 0.3) !important;
	}

	/* --nd-about-hairline変数を使わず直接rgba指定していた2箇所が
	 * 反転漏れになっていたための追加。料金表の中間行線（0.1→0.08）と同じ
	 * 考え方で、同じく薄い罫線（元0.1）を0.08に反転する。
	 */
	.nd-about-history.wp-block-table td {
		border-color: rgba(255, 255, 255, 0.2) !important;
	}

	/* フッター上部の区切り線も反転する */
	.wp-block-group.alignfull.has-global-padding.is-layout-constrained {
		border-top-color: rgba(255, 255, 255, 0.4);
	}

	/* DL06 ヘッダー：事務所名・ナビ項目のホバー時の下線 */
	.wp-block-site-title a:hover {
		border-bottom-color: rgba(255, 255, 255, 0.4);
	}
	.wp-block-navigation .wp-block-navigation-item__content:hover {
		text-decoration-color: rgba(255, 255, 255, 0.4) !important;
	}

	/* PC 幅でホバーしたときの子メニューの背景。
	 WordPress のナビゲーションブロックが .wp-block-navigation__submenu-container に白（base 色）を当てているので、全画面パネルと同じく !important で上書きする。 */
	.wp-block-navigation__submenu-container {
		background-color: rgba(25, 25, 25, 1) !important;
	}
	/* サブメニュー項目本体も.has-contrast-color（黒固定・!important）を
	 * 持っているため、背景だけでなく文字色も明示的に上書きする。 */
	.wp-block-navigation__submenu-container .wp-block-navigation-item__content {
		color: rgba(255, 255, 255, 0.55) !important;
	}
	/* 上の.is-menu-open用ルール（詳細度3クラス）が、子メニューの色指定
	   （詳細度2クラス）より詳細度が高く上書きしてしまっていたため、
	   ハンバーガーメニューを開いた状態専用にさらに詳細度の高いルールを追加 */
	.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
		color: rgba(255, 255, 255, 0.55) !important;
	}
	/* WordPressコアがサブメニューの枠線に既定でrgba(0,0,0,0.15)を当てており、
	 * 暗い背景では見えなくなるため上書きする（DL相当・標準の線=0.35と統一）。 */
	.wp-block-navigation__submenu-container {
		border-color: rgba(255, 255, 255, 0.35) !important;
	}



	/* CONTACTページ送信ボタンのホバー色（ダークモード限定） */
	.nd-contact-page .wpcf7-submit:hover {
		background: #999;
	}
}


/* FAQ (core/details) summary sizing fix */
.wp-block-details summary {
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.6;
	padding: 8px 0;
}
.wp-block-details {
	margin-bottom: 8px;
}


/* 404 page */
/* 404の見出しは色指定がなく #111 を継承していた。
   他ページの「主となる文字」0.8 に揃える。ダークは 0.85。 */
.text-404 { width: 100%; color: rgba(0, 0, 0, 0.8); }
@media (prefers-color-scheme: dark) {
	.text-404 { color: rgba(255, 255, 255, 0.85); }
}
.e404-search {
	position: relative;
	height: 64px;
}

.e404-search-no-result {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	bottom: 34px;
	font-size: 15px;
	white-space: nowrap;
	color: rgba(0, 0, 0, 0.5);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.15s;
}
.e404-search-no-result.is-visible {
	opacity: 1;
	visibility: visible;
}
@media (prefers-color-scheme: dark) {
	.e404-search-no-result {
		color: rgba(255, 255, 255, 0.55);
	}
}
.e404-search-icon {
	position: absolute;
	left: calc(50% - 17px);
	top: 40px;
	transform: translateX(-50%);
	width: 22px;
	height: 22px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: rgba(0, 0, 0, 0.5);
	cursor: pointer;
	transition: color 0.15s;
}
.e404-search-icon svg {
	display: block;
	width: 100%;
	height: 100%;
}
.e404-search:hover .e404-search-icon,
.e404-search:focus-within .e404-search-icon {
	color: rgba(0, 0, 0, 0.8);
}
.e404-search input {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	top: 40px;
	height: 22px;
	line-height: 22px;
	width: calc(50.67% - 1px);
	min-width: 0;
	padding: 0;
	margin: 0;
	border: none;
	outline: none;
	background: transparent;
	font-family: "Noto Sans JP", sans-serif;
	font-size: 20px;
	color: rgba(0, 0, 0, 0.8);
	text-align: center;}
.e404-search-caret {
	display: none;
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	top: 40px;
	width: 1px;
	height: 22px;
	background: rgba(0, 0, 0, 0.8);
	animation: e404-caret-blink 1s steps(1) infinite;
	pointer-events: none;
}
.e404-search input:focus ~ .e404-search-caret {
	display: none;
}
@keyframes e404-caret-blink {
	50% { opacity: 0; }
}

/* 404 search widget - dark mode (線と文字一覧（ダークモード）: 本文=0.85 / 補足=0.55) */
@media (prefers-color-scheme: dark) {
	.e404-search-icon {
		color: rgba(255, 255, 255, 0.55);
	}
	.e404-search:hover .e404-search-icon,
	.e404-search:focus-within .e404-search-icon {
		color: rgba(255, 255, 255, 0.85);
	}
	.e404-search input {
		color: rgba(255, 255, 255, 0.85);
	}
	.e404-search-caret {
		background: rgba(255, 255, 255, 0.85);
	}
}

/* 404 image: 雛形1ライトボックス (ws-lightbox), per デザイン/ライトボックス_雛形1_基本形.md */
.ws-lightbox-trigger {
	/* 拡大できる写真のカーソルは「＋」にそろえる（指の形 pointer ではなく） */
	cursor: zoom-in;
}
.ws-lightbox { position: fixed; inset: 0; z-index: 2147483647; visibility: hidden; isolation: isolate; }
.ws-lightbox.is-open { visibility: visible; }
.ws-lightbox__scrim { position:absolute; inset:0; background: rgba(255,255,255,0.9); opacity:0; transition: opacity .5s ease; }
.ws-lightbox.is-visible .ws-lightbox__scrim { opacity: 1; }
.ws-lightbox__img { position: fixed; object-fit:contain; display:block; box-shadow: 0 10px 40px rgba(0,0,0,0.15); opacity: 0; transition: top .3s cubic-bezier(.2,.8,.2,1), left .3s cubic-bezier(.2,.8,.2,1), width .3s cubic-bezier(.2,.8,.2,1), height .3s cubic-bezier(.2,.8,.2,1), opacity .3s ease; cursor: zoom-in; }
.ws-lightbox__img.ws-zoomed { cursor: zoom-out; }
.ws-lightbox__caption { position:fixed; left:0; right:0; bottom:24px; text-align:center; min-height: 1.6em; opacity:0; transition: opacity .3s ease; pointer-events:none; }
.ws-lightbox.is-visible .ws-lightbox__caption { opacity:1; }
.ws-lightbox__caption span { font-size:14px; line-height:1.6; color:#222; background:rgba(255,255,255,.35); padding:8px 16px; border-radius:2px; display:inline-block; max-width:80vw; }
.ws-lightbox__close { position:absolute; top:-19px; right:-29px; width:120px; height:120px; background:none; border:none; cursor:pointer; color:#222; z-index:2; display:flex; align-items:center; justify-content:center; padding:0; }
.ws-lightbox__arrow { position:absolute; top:50%; transform:translateY(-50%); background:none; border:none; border-radius:50%; width:120px; height:120px; display:flex; align-items:center; justify-content:center; font-size:14px; cursor:pointer; color:#eee; z-index:2; }
.ws-lightbox__arrow::before { content:''; position:absolute; width:34px; height:34px; border-radius:50%; background:rgba(0,0,0,.15); z-index:-1; pointer-events:none; }
.ws-lightbox__arrow--prev { left:-32px; }
.ws-lightbox__arrow--next { right:-32px; }
.ws-lightbox__arrow-icon { position:relative; z-index:1; color:#fff; }
@media (prefers-color-scheme: dark) {
  .ws-lightbox__scrim { background: rgba(25,25,25,0.9); }
  .ws-lightbox__img { box-shadow: 0 10px 40px rgba(0,0,0,0.6); }
  .ws-lightbox__caption span { color:#eee; background: rgba(30,30,30,.35); }
  .ws-lightbox__close, .ws-lightbox__arrow { color:#eee; }
  .ws-lightbox__arrow::before { background: rgba(40,40,40,.15); }
  .ws-lightbox__img.ws-diagram-image { filter: invert(1) hue-rotate(180deg) contrast(0.805); box-shadow: none; }
}
.ws-lightbox.is-open, .ws-lightbox__img { touch-action: none; }
.ws-lightbox__img.ws-transparent-image { box-shadow: none; }

/* 404 lightbox solo mode */
.ws-lightbox-solo-mode .ws-lightbox__close { display: none; }
.ws-lightbox-solo-mode .ws-lightbox__arrow { display: none; }
.ws-lightbox-solo-mode .ws-lightbox__scrim { background: rgba(255, 255, 255, 1); }
@media (prefers-color-scheme: dark) {
  .ws-lightbox-solo-mode .ws-lightbox__scrim { background: rgba(25, 25, 25, 1); }
}
/* お問い合わせページ（page-id-20362）。About と同じく、目印は本文ブロック（タイトルブロックは出力されない） */
body.page-id-20362 main > .wp-block-group:has(> .wp-block-post-content) {
	border-top: none !important;
	padding-top: 0 !important;
}
body.page-id-20362 .entry-content {
	margin-top: 14px !important;   /* 17→14。About・プライバシーポリシーと同じ（Works/Note の見出し位置に揃う） */
}
body.page-id-20362 main {
	margin-top: 0 !important;
}

/*
 * お問い合わせページのContact Form 7フォームの見た目。
 * v4サイト（旧nest-design.net/contact/）の「見出しラベル＋下線のみの入力欄」という
 * 構成を踏襲しつつ、v5の配色（.nd-aboutで定義したCSS変数）に合わせる。
 * .nd-contact-page配下にのみ適用し、他ページのCF7フォームには影響しない。
 */
.nd-contact-page .wpcf7-form p {
	margin: 0 0 47.5px !important;
}
.nd-contact-page .wpcf7-form .wpcf7-form-control-wrap {
	display: block;
}


.nd-contact-page .nd-about-section {
	padding-top: 47.5px;
	margin-top: 0 !important;
}

/* Contact：送信ボタンの下の余白を 15px 詰める（34→19）。
   送信の下からフッターまで 203.9→188.9。 */
body.page-id-20362 .nd-about-section {
	padding-bottom: 19px !important;
}
.nd-contact-page .wpcf7-form p:has(+ p textarea) {
	margin-bottom: 49px !important;
}
.nd-contact-page .wpcf7-form p:has(textarea) .nd-contact-label-text {
	margin-bottom: 32px !important;
}
.nd-contact-page .wpcf7-form p:has(textarea) {
	margin-bottom: 5.8px !important;
}


.nd-contact-page .wpcf7-form p:not(:has(textarea)) .nd-contact-label-text {
	margin-bottom: 2px !important;
}




.nd-contact-page .wpcf7-form label {
	display: block;
}
.nd-contact-page .wpcf7-form .nd-contact-label-text {
	display: block;
	/* 項目名はスマホ幅でも14pxのまま（.nd-about-section p の
	   max-width:665px で16pxに上がる指定を項目名には適用しない） */
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
	margin: 0 0 12px !important;
	color: var(--nd-about-sumi);
}
.nd-contact-page .wpcf7-form input[type="text"],
.nd-contact-page .wpcf7-form input[type="email"],
.nd-contact-page .wpcf7-form input[type="tel"] {
	box-sizing: border-box;
	width: 100%;
	border: none;
	border-bottom: 1px solid var(--nd-about-hairline);
	padding: 6px 0;
	background: transparent;
	font-size: 16px;
	color: var(--nd-about-sumi);
	vertical-align: top;
	display: block;
}
.nd-contact-page .wpcf7-form textarea {
	box-sizing: border-box;
	width: 100%;
	/* オートグロー化。固定の150pxを下限に変え、実高さはfunctions.phpのJSが
	   入力量に応じて150〜400pxの間で自動調整する。ブラウザ既定の斜線のリサイズ
	   つまみはresize:noneで消す */
	min-height: 150px;
	resize: none;
	overflow-y: hidden;
	border: 1px solid var(--nd-about-hairline);
	padding: 10px;
	background: transparent;
	font-size: 16px;
	color: var(--nd-about-sumi);
}
.nd-contact-page .wpcf7-form input:focus,
.nd-contact-page .wpcf7-form textarea:focus {
	outline: none;
	border-color: var(--nd-about-sumi);
}
.wpcf7-form input[type="checkbox"] {
	appearance: none;
	width: 13px;
	height: 13px;
	border: 1px solid var(--nd-about-hairline);
	border-radius: 2px;
	background: transparent;
	position: relative;
	cursor: pointer;
	vertical-align: middle;
	flex-shrink: 0;
	margin-left: 0;
}
.wpcf7-form input[type="checkbox"]:checked {
	background: var(--nd-about-sumi);
	border-color: var(--nd-about-sumi);
}
.wpcf7-form input[type="checkbox"]:checked::after {
	content: "";
	position: absolute;
	left: 3px;
	top: 0px;
	width: 3px;
	height: 7px;
	border: solid var(--nd-about-kinari);
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}
.nd-contact-page .wpcf7-form .wpcf7-acceptance {
	display: block;
}
.nd-contact-page .wpcf7-form .wpcf7-list-item {
	margin: 0;
}
.nd-contact-page .wpcf7-form .wpcf7-list-item label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 400;
}
.nd-contact-page .wpcf7-form p:has([data-name="check-privacy"]) {
	text-align: center;
	margin-bottom: 40px !important;
	font-size: 13px !important;
}
.nd-contact-page .wpcf7-form p:has(input[name="your-hp"]) {
	margin: 0 !important;
}
.wpcf7-submit {
	appearance: none;
	display: block;
	width: 100%;
	margin: 8px auto 0;
	/* 少し大きく（文字15→16px、上下余白14→16px）。
	   横幅は同意行と揃えてあるので変えない。 */
	padding: 16px 0;
	border: 1px solid var(--nd-about-sumi);
	border-radius: 0;
	background: transparent;
	color: var(--nd-about-sumi);
	font-size: 16px;
	cursor: pointer;
}
.nd-contact-page .wpcf7-submit:hover {
	background: #666;
	color: #FFFFFF;
}
.nd-contact-page .wpcf7-not-valid-tip {
	color: var(--nd-about-bengara);
	font-size: 12px;
}
/* 入力の誤りの一言（ベンガラ）は、差し込むと下の項目が押し下げられて場所が変わるので、浮かせて置く。
   名前・メールなどは項目名の行の右端に、同意のチェックはその下とボタンの間の空きに。 */
.nd-contact-page .wpcf7-form label { position: relative; }
.nd-contact-page .wpcf7-form label .wpcf7-form-control-wrap { position: static; }
.nd-contact-page .wpcf7-form label .wpcf7-not-valid-tip { position: absolute; top: 0; right: 0; line-height: 14px; }
.nd-contact-page .wpcf7-form [data-name="check-privacy"] { position: relative; display: block; }
.nd-contact-page .wpcf7-form [data-name="check-privacy"] .wpcf7-not-valid-tip { position: absolute; top: 100%; left: 0; right: 0; margin-top: 11px; text-align: center; line-height: 18px; }
.nd-contact-page .nd-contact-file-row .wpcf7-not-valid-tip { display: block; margin-top: 4px; }
/* 送信ボタンの下のお知らせ（「入力内容をご確認ください。」など）。
   ボタンからの空きを、上の「同意」の行とボタンの間（約 42px）とそろえる。
   出たときに下のフッターが上がらないよう、浮かせて置く（置く場所と幅は浮かせる前と同じ） */
.nd-contact-page .wpcf7-form { position: relative; }
.nd-contact-page .wpcf7-response-output {
	position: absolute;
	left: 0;
	right: 0;
	margin-top: -43.2px !important;
	font-size: 14px;
	color: var(--nd-about-sumi);
}
@media (max-width: 640px) {
	.nd-contact-page .wpcf7-response-output {
		margin-top: -44.3px !important;
	}
}
.nd-contact-page .wpcf7-form.invalid .wpcf7-response-output,
.nd-contact-page .wpcf7-form.unaccepted .wpcf7-response-output,
.nd-contact-page .wpcf7-form.spam .wpcf7-response-output,
.nd-contact-page .wpcf7-form.failed .wpcf7-response-output,
.nd-contact-page .wpcf7-form.sent .wpcf7-response-output {
	border: none !important;
	text-align: center;
	font-weight: 700;
	color: var(--nd-about-sumi) !important;
}



/* お問い合わせページ、プライバシーポリシー同意チェックのリンクに下線 */
.nd-contact-page .wpcf7-acceptance a {
	text-decoration: none;
	font-weight: 700;
}


/* Contact フォームのファイル添付フィールド（ミニマル案・複数対応）
   「ファイル添付」のテキストリンクを1つだけ表示し、クリックのたびに次の空き枠
   （最大5枚）にネイティブのファイル選択ダイアログを開く。選択済みファイルは
   リンクの上に名前＋クリア（×）の一覧として積み上がる。標準のinput[type=file]
   は視覚的に隠し、本文枠への直接ドロップは作り込まない（JS側の対応方針）。 */
.nd-contact-page .wpcf7-form p.nd-contact-file-row {
	text-align: right;
	margin-bottom: 30px !important;
}
.nd-contact-page .nd-contact-file-row input[type="file"] {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
.nd-contact-page .nd-contact-file-list {
	display: block;
}
.nd-contact-page .nd-contact-file-item {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	font-size: 13px;
	color: var(--nd-about-sumi);
	margin-bottom: 6px;
}
.nd-contact-page .nd-contact-file-item-name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.nd-contact-page .nd-contact-file-item-clear {
	flex-shrink: 0;
	font-size: 14px;
	line-height: 1;
	color: var(--nd-about-sumi);
	opacity: 0.5;
	cursor: pointer;
}
.nd-contact-page .nd-contact-file-trigger {
	display: inline-flex;
	align-items: center;
	cursor: pointer;
	font-size: 13px;
	color: var(--nd-about-sumi);
	transition: opacity 0.2s ease;
}
.nd-contact-page .nd-contact-file-trigger.is-hidden {
	display: none;
}
.nd-contact-page .nd-contact-file-text {
	/* 下線は付けない（クリップのアイコンで押せると分かる） */
	text-decoration: none;
}
/* 「ファイル添付」にマウスを重ねると薄くする。指の端末は押したあとも薄いまま残るので、PC だけ */
@media (hover: hover) and (pointer: fine) {
	.nd-contact-page .nd-contact-file-trigger:hover {
		opacity: 0.6;
	}
}
.nd-contact-page .nd-contact-file-icon svg {
	display: inline-block;
	vertical-align: -2px;
	width: auto;
	height: 14px;
	margin-right: 5px;
	stroke: var(--nd-about-sumi);
}


/* ------------------------------------------------------------
   仕様・規約の書面　nd-doc

   読み物ではないものを、大きさで区別する。
   見出しは本文と同じ大きさにして色だけ薄くし、
   区切りの札として置く。太い見出しが並ぶと記事に見える。

   使い方：body に nd-doc を付けるか、
   固定ページの本文を <div class="nd-doc"> で囲む。
   ------------------------------------------------------------ */

body.privacy-policy .entry-content,
.nd-doc {
	font-size: var(--nd-doc-size, 12px);
	line-height: var(--nd-doc-line, 2.1);
}

body.privacy-policy .entry-content p,
body.privacy-policy .entry-content li,
.nd-doc p,
.nd-doc li {
	font-size: inherit;
	line-height: inherit;
	margin-top: 0;
	margin-bottom: .85em;
}

body.privacy-policy .entry-content h2,
body.privacy-policy .entry-content h3,
.nd-doc h2,
.nd-doc h3 {
	font-size: inherit;
	font-weight: 500;
	color: inherit;
	letter-spacing: .06em;
	margin-top: 3em;
	margin-bottom: 1.15em;
}

/* nest composition の規則ページ。
   タイトルも本文に寄せる。
   大きな見出しが乗ると、仕様書ではなく記事に見える */
body.page-id-20389 .wp-block-post-title {
	font-size: 17px;
	font-weight: 600;
	letter-spacing: .04em;
	margin-bottom: var(--nd-doc-gap, 40px);
}

/* タイトルを包む組だけを直す。
   .wp-block-group 全部にかけると、ヘッダーの余白まで変わる */
body.page-id-20389 .wp-block-group:has(> .wp-block-post-title) {
	border-top: 0 !important;
	/* ヘッダー側に 67px の余白があるので、
	   ヘッダー下端からタイトルまで 111px になる */
	padding-top: 44px !important;
}

/* サインはリンクだが、リンクに見えない。
   気づいた人だけが押す */
a.nd-sign,
a.nd-sign:hover,
a.nd-sign:visited,
a.nd-sign:focus {
	border: 0;
}
a.nd-sign:focus-visible {
	outline: 1px dotted currentColor;
	outline-offset: 3px;
}

/* 規則ページのタイトル上の罫線は不要。
   仕様書に見出しを飾る線はいらない */


/* 書面の一行目は、上の余白を持たない。
   タイトルの上下を同じだけ空けるため */
.nd-doc > *:first-child {
	margin-top: 0 !important;
}
body.page-id-20389 .wp-block-post-content,
body.page-id-20389 .entry-content {
	margin-top: 0 !important;
}

/* ヘッダーとタイトルのあいだも、同じ幅に揃える */
body.page-id-20389 main {
	margin-top: 0 !important;
}

/* 狭い画面ではひとまわり大きくする。
   12px だと実機では事務所名より小さく見える */
/* 幅の区切り（@media 720px）を使わず同じ結果に: 720px以下は13px、それより広ければ12px。
   区切りをまたぐ瞬間のページ全体の照合し直し（狭めるときの引っかかり）をなくすため */
.nd-doc, body.privacy-policy .entry-content { --nd-doc-size: calc(12px + clamp(0px, (720.5px - 100vw) * 1000, 1px)); }

/* nd-sp-line
   フッター上の線は枠（scale-frame）の外にあるので、
   スマホでも縮小されず 1px のまま出る。
   帯の線は 0.54px 相当になるため、同じ 0.4 でもこちらが濃く見える。 */
@media (hover: none) and (pointer: coarse) {
}
@media (hover: none) and (pointer: coarse) and (prefers-color-scheme: dark) {
}

/* 欄外の節だけ、上を広く空ける。
   前の節の最後が 210⁵ で締めているので、
   すぐ次が始まると締まらない。罫線は引かず、空白で区切る。 */
.nd-doc h2.nd-doc-far{ margin-top: 8em; }

/* 欄外の節も、どの画面でも全文を出す（スマホでも English 版でも）。
   説明ページは決まりの正本なので、見える・見えないに関わらず同じ文を読めるようにする。 */

/* nd-header-align
   ヘッダーの位置を全ページで揃える。
   ずれ幅は nd_header_align()（functions.php）が入れる。
   トップは fitScale() が同じ値を入れるので衝突しない。
   transform は使わない（中の position:fixed の基準を奪うため）。 */
.nd-brand{ position: relative; left: var(--nd-brand-dx, 0px); }
/* 位置が決まるまで隠す。nd-hdr-wait は nd_header_wait() が付け、
   nd_header_align() が外す。600ms の保険も入っている。 */
.nd-hdr-wait .nd-brand,
.nd-hdr-wait .nd-header-row > :nth-child(2){ visibility: hidden; }
.nd-header-row > :nth-child(2){ position: relative; left: var(--nd-nav-dx, 0px); }

/* PCのヘッダー微調整（nd-pc-nudge）。目で見て決めた値。全ページ共通 */
@media (hover: hover) and (pointer: fine) {
	.nd-brand .wp-block-site-title{ position: relative; left: 4px; }   /* 6→4。「ネ」の中心を 9–10 通り間の芯（枠+210）に。実測 212.4→210.4 */
	/* ロゴを 30→34px 高（幅 52.8→59.8）。中心を 7通り芯（60）に置いたまま、家の左壁面を Works・Note の写真の左線（枠+38）に乗せる。
	   ロゴは左右対称で、中心→左壁が SVG 単位で 170。170 × (34/261.12) ≒ 22 → 60−22＝38。インラインの height:30px を上書きするため !important */
	.nd-brand svg{ height: 34px !important; }

	/* ナビを 120px（2スパン）のマス×3 に。区切り「|」はマスの境界（480・600）＝60の格子線＝ダブルフィルターの列境界。
	   functions.php の PC_NAV_INSET を 0（ナビの右端＝枠の右線 720）。戻すとき：このブロックを消し、PC_NAV_INSET を 36 に */
	.wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__container{ gap: 0 !important; }
	.wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__container > .wp-block-navigation-item{ justify-content: center; }
	/* 区切りは文字の「|」ではなく 1px の線。マスの左端（格子線）に立て、高さは文字の天地に近い 1.1em */
	.wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__container > .wp-block-navigation-item + .wp-block-navigation-item > .wp-block-navigation-item__content::before{ content: none; }
	.wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__container > .wp-block-navigation-item + .wp-block-navigation-item::before{
		content: ""; position: absolute; left: 0; top: 50%; transform: translate(-50%, -50%); width: 1px; height: 1.1em; background: currentColor; opacity: .3;
	}
	/* サブメニュー（探究ノートのカテゴリ）の枠を、上のマスと同じ 120 幅に。左右の縦線が区切り線（480・600）と同じ位置に立つ */
	.wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation__submenu-container{
		box-sizing: border-box; width: calc(var(--nd-li-w, 120px) + 1px) !important; min-width: 0 !important; left: -0.5px !important; right: auto !important;
		/* 箱の上辺をヘッダーの下線（項目の下端から 17.5px 下）に重ね、高さ 120（2スパン）。中の 3 項目は等間隔 */
		top: calc(100% + 17.5px) !important; height: 117.5px !important; padding: 0 !important;   /* 120→117→117.5 */
		display: flex !important; flex-direction: column; justify-content: center; gap: 1px;   /* 等間隔（間 ≈10px）→ 中央寄せ。上下の項目を真ん中へ 10px 寄せる */   /* 区切り線のピクセル（479・599）に枠線を重ねる：左 -1、幅 121 */   /* 既存の left:1.5px !important（文字の「|」時代の合わせ）より後で勝たせる */
	}
	/* 項目と箱のあいだ（17.5px）をマウスが通っても閉じないよう、透明の橋を項目（li）の側に掛ける（高さはあいだの分、z-index で手前）。
	   箱（submenu）の ::before に掛けると、本文の wp-block-group が重なってマウスが届かない。 */
	.wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__container > .wp-block-navigation-item.has-child::after{
		content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 20px; z-index: 100;
	}
	.wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__container > .wp-block-navigation-item.has-child{ position: relative; z-index: 100; }
}

/* スマホのヘッダー微調整（nd-sp-nudge）。目で見て決めた値。
   トップもほかのページも、ここだけで決める。
   位置の計算は functions.php の nd_header_align()（スマホは dx 0）。その上での微調整 */
@media (hover: none) and (pointer: coarse) {
	.nd-brand > a{ position: relative; left: -4px; }
	.nd-brand .wp-block-site-title{ position: relative; left: 0px; }
	.nd-header-row > :nth-child(2){ left: calc(var(--nd-nav-dx, 0px) - 1px); }  /* -2→-4→-1（ハンバーガー。全ページ共通） */
}

/* nd-close-gap
   閉じ際、is-menu-open が外れてから JS が付け直すまでの隙間の1フレームで、
   PC用ドロップダウンの素の姿（カテゴリだけ別の場所に出る）が描かれうる。
   その瞬間だけ何も描かせない。速度・アニメは変えない。 */
.wp-block-navigation__responsive-container.is-menu-closing:not(.is-menu-open){ visibility: hidden; }

.nd-contact-page .wpcf7-form .wpcf7-submit {
	max-width: 188.7px !important;
	/* 「送 信」の字間。半角スペースではなくletter-spacingで空け、
	   末尾に付く余白をpadding-leftで相殺して中央を保つ */
	letter-spacing: 0.5em;
	padding-left: 0.5em;
}

/* スマホだけ送信箱を左右 6px ずつ内側に（188.7→176.7）。
   同意の行と幅は元々一致しているが、枠で囲った箱は大きく見えるための目の補正。 */
@media (max-width: 640px) {
	.nd-contact-page .wpcf7-form .wpcf7-submit {
		max-width: 176.7px !important;
	}
}

/* ブロックエディター内は常に白地なのに、Mac がダークモードだと About の配色トークンが夜の値（白文字）になり、本文が真っ白で見えなかった。
   エディター内（.editor-styles-wrapper）だけ昼の値に固定。あわせて、非表示にしている h1（ネストデザインについて）もエディターでは見せて編集できるように */
.editor-styles-wrapper .nd-about {
	--nd-about-kinari: #FFFFFF;
	--nd-about-sumi: rgba(0, 0, 0, 0.8);
	--nd-about-gray: rgba(0, 0, 0, 0.5);
	--nd-about-hairline: rgba(0, 0, 0, 0.25);
	--nd-about-bengara: #9C4A34;
	--nd-about-box-border: rgba(0, 0, 0, 0.25);
	--nd-about-box-bg: rgba(0, 0, 0, 0.03);
	--nd-about-box-mono-icon: rgba(0, 0, 0, 0.35);
}
/* アコーディオン（Q&A・費用・進め方）の中身は、表示側では閉じて（高さ 0）いる。編集画面では常に開いて見せ、文章を直接触れるように */
.editor-styles-wrapper .nd-about-qa-box,
.editor-styles-wrapper .nd-about-fee-box,
.editor-styles-wrapper .nd-about-step-box {
	height: auto !important;
	max-height: none !important;
	overflow: visible !important;
	padding-top: 8px;
	padding-bottom: 8px;
}

/* PC: 屋号とナビの間が30pxを切るかナビが折れたら、functions.php が html に nd-burger を付ける。そのときハンバーガーにする。 */
html.nd-burger .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex !important; }
html.nd-burger .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none !important; }

/* nd-nav-nowrap PC: ヘッダーのナビは二段に折り返さない（詰まったら functions.php がハンバーガーにする）。 */
@media (hover: hover) and (pointer: fine) {
  .nd-header-row .wp-block-navigation__container { flex-wrap: nowrap !important; }
  .nd-header-row .wp-block-navigation__container > li > a { white-space: nowrap; }
}

/* nd-665 PC: 上の「665px以下はハンバーガー」はスマホ向け。PCでは functions.php の判定（632pxでハンバーガー、637pxでナビ）に一本化。
   判定がナビと決めたとき（nd-burger がないとき）は 633〜665px でもナビを出す。 */
@media (hover: hover) and (pointer: fine) and (min-width: 600.02px) and (max-width: 665px) {
  html:not(.nd-burger) .wp-block-navigation__responsive-container-open:not(.always-shown) { display: none !important; }
  html:not(.nd-burger) .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: block !important; }
  /* ナビとして出すときは、メニュー用の縦並び・高さいっぱいを打ち消して666pxと同じ組み方に（浮き上がり防止） */
  html:not(.nd-burger) .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__responsive-close,
  html:not(.nd-burger) .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__responsive-dialog { display: block !important; height: auto !important; flex: none !important; }
  html:not(.nd-burger) .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__responsive-container-content { padding: 0 !important; height: auto !important; }
}

/* PC: ナビの箱の幅は functions.php が入れる --nd-li-w（721px未満で120px×縮尺）。縦棒がコンポジションの14・16通りに乗り続ける */
@media (hover: hover) and (pointer: fine) {
  .nd-header-row .wp-block-navigation__responsive-container:not(.is-menu-open) .wp-block-navigation__container > .wp-block-navigation-item { width: var(--nd-li-w, 120px); }
}

/* ひとかたまりで改行（納まれば同じ行、納まらなければかたまりごと次の行へ。事務所案内の資格の括弧書きなど） */
.nd-nobr { display: inline-block; }
.nd-awards { word-spacing: 1.5em; }
.nd-awards .nd-sp1 { word-spacing: 0.72em; } /* 「ほか」の前の一字空き。行の頭に来たら消える（スマホで送られても下がらない） */ /* 賞と賞の間の広い空き（行の頭・終わりでは消える）。「／」の代わり */ /* 前に一字空き。次の行へ送られたときは一字下がり（続きの合図） */

/* nd-assoc-tight 活動・所属: 小見出しがないので、見出し→一覧を資格欄の「小見出し→一覧」（約26px）に揃える（40.6→26.6px） */
.nd-about-section p.nd-about-assoc { margin-top: -14px !important; }

/* 資格欄の小見出し（建築設計・耐震診断・改修・京都の建築文化）を p → h3 に（SEO）。見た目は p のときと同じにする */
.nd-about-section h3.nd-about-pillar-name { font-family: inherit; font-size: 14px; font-weight: 700; line-height: 2.05; letter-spacing: inherit; color: var(--nd-about-sumi); text-transform: none; padding: 0; margin: 0 0 14px !important; }
@media (max-width: 665px) {
  .nd-about-section h3.nd-about-pillar-name { font-size: 16px; }
}

/* nd-tight: 段落の字間をほんの少し詰める（-0.1px→-0.3px）。行末の一文字が落ちるのを防ぐ（事務所案内「…住み続けてきました。」） */
.nd-about-section p.nd-tight { letter-spacing: -0.3px; }
.nd-about-section p.nd-tight2 { letter-spacing: -0.5px; } /* 「…実験を行い、」を一行に収める */

/* 資格・専門で、資格名のあとの（かっこ）の行を、上の資格名へ 6px 寄せる。
 本文側でかっこを <span class="nd-about-sub"> で包み、前の <br> を外している。資格どうしの行間はそのまま。
 0.429em＝PC（14px）で 6px、スマホ（16px）で約 6.9px。行の高さに対して同じ割合で詰まる */
.nd-about-pillar-list .nd-about-sub {
	display: block;
	margin-top: -0.429em;
}
/* 資格・専門 › 建築設計は、2行目（登録番号・専門分野）を1字下げる。
 * 本文で全角スペースを打たず、ここで下げる。かっこで始まる行（耐震の欄）は「（」に空きがあるので下げない */
.nd-about-pillar-list .nd-about-sub--indent {
	padding-left: 1em;
}

/* 冒頭文（仕事の進め方・設計料の方針・お問い合わせ）の18字改行 .nd-sp-br は、幅619px以下だけで出す。
 665px以下はスマホ用の表示に切り替わるが、窓を狭めたPC（481〜665px）は字の置ける幅に余裕があるので、
 改行は入れず1文を1行で見せる。
 36字が1行に入るのは幅614px以上（実測）。それより狭いところで改行を外すと「す。」だけの行ができる */
@media (min-width: 620px) {
	.nd-sp-br {
		display: none;
	}
}

/* 事務所案内の本文は、行末の「、」「。」を右の余白へぶら下げる。
 効くのは Safari（iPhone のすべてのブラウザ・Mac の Safari）だけ。Chrome・Android ではこれまでどおり前の字ごと次の行へ送る。
 はみ出すときだけ効くので、きっちり収まっている冒頭文（18字）や FAQ（48字）は変わらない。
 （これが無いと、390〜402px で「つくります。」の「す。」が次の行の頭に落ちる） */
.nd-about-section p {
	hanging-punctuation: allow-end;
}

/* プライバシーポリシーの末尾の「< back」。作品個票の .ws-back と同じ見た目。
 お問い合わせからは同じタブで開く。押したとき、サイト内から来ていれば一つ前のページ（入力途中のお問い合わせ）へ戻り、外から直接来た人はトップへ（functions.php） */
/* 上下の空きを作品個票の back とそろえる。上の線→back 約55px（スマホ）・57px（PC）、back→フッターの線 約58px。
 * 固定ページの下の余白は画面幅で伸びる（58→70px）ので、プライバシーポリシーだけ 58px に固定し、back の下を -19px で詰めた（実測で作品個票と±2px） */
.nd-privacy-page .nd-back {
	margin: 53px 0 -19px !important;
}
@media (min-width: 666px) {
	.nd-privacy-page .nd-back {
		margin-top: 57px !important;
	}
}
body.privacy-policy main > .wp-block-group.alignfull {
	padding-bottom: 58px !important;
}
.nd-back a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-family: inherit;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.12em;
	color: var(--nd-about-sumi);
	text-decoration: none;
}
.nd-back-arrow {
	font-weight: 400;
	color: var(--nd-about-gray);
}

/* 建築概要の「計画」：PC は「2023年（創建 大正期）」、スマホは「2023年（大正期）」 */
.nd-ov-sp { display: none; }
@media (max-width: 640px) { .nd-ov-pc { display: none; } .nd-ov-sp { display: inline; } }

/* 問い合わせの一言（本人の文「お問い合わせの内容を確認のうえ、／対応可能な場合ご連絡いたします。」16字ずつ）。プライバシーポリシーの同意の上に真ん中揃え。幅は「□プライバシーポリシーに同意」に合わせる */
.nd-contact-page .wpcf7-form p.nd-contact-note { text-align: center; font-size: 11.8px; line-height: 1.8; opacity: .75; margin: 0 0 73.7px !important; position: relative; top: 5px; left: 3.1px; letter-spacing: .39px; }   /* 字の見える幅（15.5字）を同意の幅 188.7px に。字間 .39px（半角分＝5.9px を 15 の間で割る）、最後の字の後ろにも字間が付く分を left 3.1px で戻す */   /* 下の間＝上の間（メッセージの四角の下端〜この一言の上端 73.7px、実測） */
@media (max-width: 640px) { .nd-contact-page .wpcf7-form p.nd-contact-note { margin-bottom: 79.4px !important; } }   /* スマホは「ファイル添付」の行が高く、上の間が 79.4px（実測）。あと5px下げて top:5px（上の余白は前の行の余白と重なるので効かない。位置だけずらす） */


/* ============================================================
   フッターの右端に「English」（英語のページへの入口）。
   コピーライトは真ん中のまま。
   字の大きさ・濃さはコピーライトと同じ（同じ段落の中に置いて受け継ぐ）。
   ============================================================ */
.has-text-align-center:has(> .nd-foot-en){position:relative;}
.nd-foot-en{
  position:absolute;top:1px;right:calc(50% - 340px); /* English の右端は、本文の右端（720-20-20＝680 の端）にそろえる。ヘッダーの「事務所案内」にはそろえない（ヘッダーとフッターは交わらない）。ノートの English も、その下の日付・カテゴリ（暮らしと美）も右いっぱいなので、そろえないと差ができる */
  color:inherit;text-decoration:none;
  /* 大きさはノートの English と同じ 11.5px（大文字の E は © の行より一回り大きく見える）。濃さは © と同じ。行の高さも © の行と同じにしてベースラインをそろえ、字が小さい分 top を 1px に */
  font-size:11.5px;line-height:18.2px;
}
@media (hover:hover){ .nd-foot-en:hover{text-decoration:underline;text-underline-offset:3px;} }
/* スマホではフッターの段落が左右 30px 内側にあり、English の右端が本文の右端（左右 20px）より 10px 内側だった。-10px で本文・ノートの English の右端にそろえる */
@media (max-width:720px){ .nd-foot-en{right:-10px;} }

/* ==========================================================
   英語のページ（Notes from Kyoto、page-id-25304）
   事務所案内（page-id-19902）と同じ組み方にそろえる。
   .nd-en-ps は考え方の最後の追伸（No.8）。前を少しあける
   ========================================================== */
body.page-id-25304 main > .wp-block-group:has(> .wp-block-post-content) {border-top: none !important; padding-top: 0 !important;}
body.page-id-25304 .entry-content {margin-top: 14px !important;}
body.page-id-25304 main {margin-top: 0 !important;}
.page-id-25304 .entry-content.has-global-padding {padding-left: 20px !important; padding-right: 20px !important;}
/* 事務所案内のダークモード用のヘッダー線（白 35%）は、ここに写さない。@media の外に書くと昼の表示でも白くなり、ヘッダーの線が消える */
body.page-id-25304 .nd-about-section {padding-top: 35.4px !important; margin-top: 0 !important; padding-bottom: 36.3px !important;}
/* ページの中のリンク（form below、privacy policy）で飛んだとき、節の頭が上の固定のヘッダー（高さ 71px）に隠れないようにする */
body.page-id-25304 .nd-about-section[id] {scroll-margin-top: 71px;}
body.page-id-25304 .nd-about-section > p:empty {display: none !important;}
body.page-id-25304 .nd-about-section > *:last-child {margin-bottom: 0 !important;}
body.page-id-25304 .nd-about-sec-title {margin-bottom: 35px !important;}
body.page-id-25304 .nd-en-ps {margin-top: 2.6em !important;}


/* __________________________________________________________
   英語のページの Contact と Privacy policy を開け閉めにする
   考え：コンタクトを募集している感じは出さない。来た人みんなに見せるのではなく、物申したい人・興味がある人だけが開く
   仕組みは事務所案内のアコーディオンと同じ about-accordion.js（.nd-en-fold／-title／-box を足した。英語のページのものは、ほかを閉じない）
   見た目は題（Contact／Privacy policy）の後ろに小さな ▶。開くと ▼ に回る（耐震の束と同じ向き）
   __________________________________________________________ */
body.page-id-25304 .nd-en-fold {margin: 0 !important;}
body.page-id-25304 .nd-en-fold-title {cursor: pointer; margin-bottom: 0 !important; -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none;}
body.page-id-25304 .nd-en-fold-title::after {content: "\25B6"; display: inline-block; margin-left: 0.7em; font-size: 0.6em; font-weight: 400; vertical-align: 0.15em; color: var(--nd-about-gray, #888); transition: transform 0.3s ease;}
body.page-id-25304 .nd-en-fold.is-open > .nd-en-fold-title::after {transform: rotate(90deg);}
body.page-id-25304 .nd-en-fold-box {overflow: hidden; max-height: 0; margin-top: 0 !important; padding-top: 0 !important; padding-bottom: 0 !important; transition: max-height 0.35s ease, padding-top 0.35s ease;}
body.page-id-25304 .nd-en-fold.is-open > .nd-en-fold-box {padding-top: 35px !important;}
body.page-id-25304 .nd-en-fold-box > *:first-child {margin-top: 0 !important;}
body.page-id-25304 .nd-en-fold-box > *:last-child {margin-bottom: 0 !important;}
/* リンク（form below・privacy policy）で開いて飛んだとき、小見出し（CONTACT・PRIVACY）まで見えるように。ヘッダー 71px＋節の頭から題まで 78px */
body.page-id-25304 .nd-en-fold[id] {scroll-margin-top: 149px;}
/* 閉じても位置を変えないための見えない余白（.nd-en-spacer、about-accordion.js が最後に足す）が来ると、PRIVACY の節が「最後の子」でなくなり、下の線が出ていた。最後の節なので線は付けない */
body.page-id-25304 #en-haiku {border-bottom: none;}
/* NOTE の節の一覧（英訳のあるノート）も開け閉めに。説明文はそのまま見せ、その下の「See the list ▶」で一覧が開く。題は本文と同じ大きさ（節の題より一段小さい） */
body.page-id-25304 .nd-en-fold--list {margin-top: 26px !important;} /* List を節の題の大きさにしたので、説明文との間を 14→26px に */
/* List は Contact と同じ大きさ・太さに。Privacy policy は小さいまま */
body.page-id-25304 .nd-en-fold--list > .nd-en-fold-title {font-size: 17px; line-height: 19.125px; font-weight: 800; margin-top: 0 !important;}
body.page-id-25304 .nd-en-fold--list.is-open > .nd-en-fold-box {padding-top: 14px !important;}
/* Privacy policy の題も List と同じ大きさ（置いてあって見られればよく、大きく見せるものではない） */
body.page-id-25304 #en-privacy-policy > .nd-en-fold-title {font-size: 14px; line-height: 28.7px; font-weight: 600;}
body.page-id-25304 #en-privacy-policy > .nd-en-fold-title::after {font-size: 0.7em;}
body.page-id-25304 #en-privacy-policy.is-open > .nd-en-fold-box {padding-top: 14px !important;}
/* Privacy policy は Contact を開いた中、フォームの下に置く。h3 にした */
body.page-id-25304 #en-privacy-policy {margin-top: 28px !important; scroll-margin-top: 91px;}


/* __________________________________________________________
   nest composition（page-id-20389）の英訳（English）
   考え：すぐに見られる。品よく。できるだけ文字が少なく、分かりやすい、整列したミニマルな説明
   ノートの English と同じ形：本文の一番下、右端に小さく灰色の English。押すとその場で英訳が開く（details、JS なし）。
   英訳は日本語と同じ組み（div.nd-doc.nc-spec、h2 と p）。
   右端は、本文の列（645）ではなく、フッターの English と同じ 680 の端にそろえる（スマホでは同じになる）
   __________________________________________________________ */
body.page-id-20389 .nc-en {margin-top: 48px !important; margin-bottom: 0 !important;} /* 左右は auto のまま（列の真ん中に置く） */
body.page-id-20389 .nc-en > summary {display: block; list-style: none; cursor: pointer; text-align: right; font-size: 11.5px; line-height: 16.1px; font-weight: 400; letter-spacing: 0; color: rgba(0, 0, 0, 0.5); margin-right: calc((min(680px, 100vw - 40px) - min(645px, 100vw - 60px)) / -2); /* 本文の列は PC 645・スマホは左右 30px 内側、680 の端はスマホで左右 20px 内側 */ -webkit-tap-highlight-color: transparent;}
body.page-id-20389 .nc-en > summary::-webkit-details-marker {display: none;}
body.page-id-20389 .nc-en > summary::marker {content: "";}
@media (hover: hover) { body.page-id-20389 .nc-en > summary:hover {text-decoration: underline; text-underline-offset: 3px;} }
body.page-id-20389 .nc-en[open] > summary {margin-bottom: 36px;}
body.page-id-20389 .nc-en > .nc-spec {padding-top: 36px; border-top: 1px solid rgba(0, 0, 0, 0.25);}
@media (prefers-color-scheme: dark) {
  body.page-id-20389 .nc-en > summary {color: rgba(255, 255, 255, 0.55);}
  body.page-id-20389 .nc-en > .nc-spec {border-top-color: rgba(255, 255, 255, 0.3);}
}


/* __________________________________________________________
   英語のページの一番下に、トップの三本柱の句（#en-haiku）
   決め：トップの表記と同じく、3つのまとまりをブロックごとに、押すと下に英字が出る。三つ同時には開けない。On design の後ろでは中途半端なので一番下に。日本語と英語の空きは縮める（間が抜けて見える）
   トップ（v5-top.css「三本柱は押すと詩が霧から出る」）と同じ組み：右に5字（0.6字上）・見出し5字・左に5字（0.6字下）、右から読む。
   列の中心は区画の 75%・50%・25%（トップの 180・120・60）。明朝、16px、字間 .15em、脇は少し薄く。
   押すと .open（about-accordion.js の末尾）。一つ開くとほかは閉じる。英語は霧から晴れるように（トップと同じ時間）。
   英語の分の高さはいつも取ってある（開け閉めでページの高さが変わらず、一番下でも画面が動かない）
   __________________________________________________________ */
body.page-id-25304 .nd-haiku-row {display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 !important;}
body.page-id-25304 .nd-haiku {cursor: pointer; -webkit-tap-highlight-color: transparent; outline: none; margin: 0 !important;}
body.page-id-25304 .nd-haiku-ja {position: relative; height: 7em; margin: 0 !important; font-family: var(--mincho, "Hiragino Mincho ProN", "Hiragino Mincho Pro", "Yu Mincho", "YuMincho", "Noto Serif JP", serif); font-size: 16px; line-height: 1.85; letter-spacing: .15em;}
body.page-id-25304 .nd-haiku-ja span {position: absolute; writing-mode: vertical-rl; white-space: nowrap;}
body.page-id-25304 .nd-haiku-ja .r {top: 0; left: calc(75% - .925em); opacity: .7;}
body.page-id-25304 .nd-haiku-ja .h {top: .6em; left: calc(50% - .925em); font-weight: 600;}
body.page-id-25304 .nd-haiku-ja .l {top: 1.2em; left: calc(25% - .925em); opacity: .7;}
body.page-id-25304 .nd-haiku-en {margin: 6px 0 0 !important; text-align: center; white-space: nowrap; /* スマホで「Wisdom handed down,」が折り返さないように。一つずつしか開かないので、となりの区画にはみ出してもよい */ font-size: 12.5px; line-height: 1.85; letter-spacing: 0; color: rgba(0, 0, 0, .5); opacity: 0; filter: blur(8px); transform: translateY(6px); transition: opacity 1.1s ease, filter 1.5s ease, transform 1.5s ease;} /* 少し早く（2秒なら1.5秒くらい。トップは 1.6／2.2 秒のまま） */
body.page-id-25304 .nd-haiku.open .nd-haiku-en {opacity: 1; filter: blur(0); transform: none;}
@media (prefers-color-scheme: dark) { body.page-id-25304 .nd-haiku-en {color: rgba(255, 255, 255, .55);} }
@media (max-width: 720px) {
  body.page-id-25304 .nd-haiku-ja {font-size: 13.5px;}
  body.page-id-25304 .nd-haiku-en {font-size: 11.5px;}
}

/* 三本柱の句の上下を 40px にそろえる（PC）。上の線から「新」まで・「たちあがる」から英訳まで・「Rises.」からフッターの線まで、同じ 40px に。字の上端・下端（字の箱）で測って合わせた */
@media (min-width: 721px) {
  body.page-id-25304 #en-haiku {padding-top: 30.4px !important; padding-bottom: 0 !important;}
  body.page-id-25304 .nd-haiku-en {margin-top: 19.6px !important;} /* 英語は真ん中の列の終わり（「め」）から 40px（下の空きが多かった。上も真ん中の列の頭「新」から測っている） */
  body.page-id-25304 main > .wp-block-group:has(> .wp-block-post-content) {padding-bottom: 22.2px !important;}
}

/* スマホも三本柱の句の上下をそろえる。字が小さい分、PC の 40px に対して 30px */
@media (max-width: 720px) {
  body.page-id-25304 #en-haiku {padding-top: 21.9px !important; padding-bottom: 0 !important;}
  body.page-id-25304 .nd-haiku-en {margin-top: 11.7px !important;} /* スマホも「め」から 30px */
  body.page-id-25304 main > .wp-block-group:has(> .wp-block-post-content) {padding-bottom: 12.5px !important;}
}
/* ここまで スマホ 30px */


/* 下線と字のあいだを、サイト全体で 0.2em（字の大きさの 0.2 倍）にそろえる。
   字の大きさが 11〜21px と幅があるので、px ではなく em で決める。
   各所の px の指定は残したまま、ここで上書きする（戻すときはこの塊を消すだけ） */
html a, html .na-item-dept, html .na-group-divider-label{ text-underline-offset: .2em !important; }

/* 事務所名の下線の間を広げる。
   事務所名は「一級建築士事務所」（小）と「ネストデザイン」（大）の2つの大きさなので、ふつうの下線（text-decoration）だと
   字の大きさごとに線の高さがずれる（試して段違いになった）。→ 今までどおり a の下の枠線（1本のまっすぐな線）のまま、
   下に 2px の余白（padding-bottom）を足して、字と線の間を約 3px（大きい字 15px の 0.2em）にする。行の高さは変わらない */
html .wp-block-site-title a{padding-bottom:2px;}


/* サイト全体のページの移り変わりを、白くならずに溶けるようにする。
   ブラウザのページ移りの仕組み（cross-document view transitions）。対応していないブラウザはこれまでどおり */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root){ animation-duration: .25s; }

/* 事務所案内の第2層（考えと経歴・流れと費用）で飛んだとき、節の頭（CONCEPT・PROCESS）が上の固定のヘッダー（高さ 71px）に隠れないようにする。英語のページと同じ値 */
body.page-id-19902 .nd-about-section[id] {scroll-margin-top: 71px;}

/* 相談と連絡の見出しの横に小さく「フォーム・電話で受付」。見出しと同じ行に札のように置く。字はフォームの下の注記と同じ灰色の小さい字 */
.nd-contact-page .nd-about-header .nd-about-h1 {display: inline-block;}
.nd-contact-page .nd-about-header p.nd-contact-sub {display: inline-block; margin: 0 0 0 16px; font-size: 11.8px; line-height: 1.8; opacity: .75; letter-spacing: .39px; color: rgba(0,0,0,.8);}

/* グローバルナビ「仕事実績集」の第2層（耐震・リノベーション・新築）を、ほかの第2層と同じ5文字の幅に割り付ける。
   耐震・新築は2文字を5文字分に広げて両端揃え（耐＿＿＿震）。リノベーションは7文字を5文字分に横だけ縮める（字を細く）。
   ナビの項目に付けたクラス nd-w5・nd-w5-2・nd-w5-7（ナビゲーション 19）。5文字分＝5em−字間0.1px×5。縮める率 .729＝57px÷78.2px（Noto Sans JP 11.5px の実測） */
.nd-w5 .wp-block-navigation-item__label {display: inline-block; white-space: nowrap;}
.nd-w5-2 .wp-block-navigation-item__label {text-align: justify; text-align-last: justify;}
.nd-w5-7 .wp-block-navigation-item__label {transform-origin: left center;}
/* ↑ 幅と縮める率は、functions.php の wp_footer の小さな JS が「耐震と構造」を実測して決める（5em の決め打ちだと iPhone で広く出た） */
.nd-w5 > a {position: relative;}
.nd-w5-ghost {position: absolute; left: 0; top: 0; visibility: hidden; white-space: nowrap; pointer-events: none;}

/* スマホのメニューを開いたとき、iPhone 13 mini で縦のスクロールバーが出ないように、下の余白を詰める（30→16）。上は後ろの行で 15 にしている */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {padding-bottom: 16px !important;}


/* ---- メニューを開いたときの覆い ---- */
/* 覆いはヘッダーの下端（--nd-header-bottom。hamburger-morph.js が固定表示のヘッダーの箱で測る）から始める。
   下限は 40px。測り損ねたとき（0 や負の数）の備え。70px にすると iPhone のヘッダー（67px）より大きく、下線の下に 3px のすき間ができる。
   事務所名（.nd-brand）は覆いより手前に置く */
.wp-block-navigation__responsive-container.is-menu-open{ top: max(var(--nd-header-bottom, 67px), 40px) !important; }
html.has-modal-open .nd-brand{ position: relative; z-index: 100001; }

/* 夜の表示の「相談と連絡」の添え書き（フォーム・電話で受付）の色（黒いままだと見えない） */
@media (prefers-color-scheme: dark){ .nd-contact-page .nd-about-header p.nd-contact-sub{ color: rgba(255,255,255,.85); } }

/* 相談と連絡の電話番号の下線を薄く。字の濃さ（.8）のままだったのを、ナビに重ねたときの下線と同じ .35 に。夜は白の .4 */
.nd-contact-note .nd-contact-tel a{ text-decoration-color: rgba(0,0,0,.35); }
@media (prefers-color-scheme: dark){ .nd-contact-note .nd-contact-tel a{ text-decoration-color: rgba(255,255,255,.4); } }

/* 相談と連絡の電話の行（受話器と番号）。上の2行の文から 25px 離す。
   電話番号の前の受話器の形（「電話」の字の代わり。読み上げでは「電話」と読む）。内側の小さな半月は耳珠で、耳を受話器に当てた姿。
   番号の字は、上の行の漢字と同じ天地に見えるよう 14.4px に（数字は漢字より背が低い書体のため）。
   字を大きくしても下の同意の行・ボタン・フッターが動かないよう、この行の高さは前のまま（21.24px）に留める。
   受話器の大きさ：指の端末では番号の下線の下端から「0」の上端までの高さで、そこから 1px 上げて置く。PC は下線が無いので「0」の上と下に同じだけ出す */
.nd-contact-note .nd-contact-tel { display: inline-block; margin-top: 25px; height: 21.24px; vertical-align: top; }
.nd-contact-note .nd-contact-tel a { font-size: 14.4px; line-height: 21.24px; }
.nd-contact-tel .nd-tel-mark { display: inline-block; vertical-align: -3.47px; margin-right: 5px; }
.nd-contact-tel .nd-tel-mark svg { display: block; height: 15.46px; width: auto; }
/* 電話番号にマウスを重ねると、受話器ごと薄くする（「ファイル添付」と同じ薄さと速さ）。
   受話器も押せるよう、受話器は番号のリンクの中に置く。指の端末は押したあとも薄いまま残るので、PC だけ */
.nd-contact-note .nd-contact-tel a { transition: opacity 0.2s ease; }
/* PC（マウスの端末）では電話番号の下線を外す。押しても電話がかからないことが多いので、押せる印を出さない。指の端末は下線を残す */
@media (hover: hover) and (pointer: fine) {
	.nd-contact-note .nd-contact-tel a { text-decoration: none; }
	.nd-contact-note .nd-contact-tel a:hover { opacity: 0.6; }
	.nd-contact-tel .nd-tel-mark { vertical-align: -2.34px; }
	.nd-contact-tel .nd-tel-mark svg { height: 14.83px; }
}


/* コンタクトの添え書き「フォーム・電話受付」の「・」を、事務所名の「ネ」の縦の線に合わせる（スマホ。見た目で約2.5px 左。元は 16px） */
@media (max-width: 640px) and (hover: none), (max-width: 640px) and (pointer: coarse){
  .nd-contact-page .nd-about-header p.nd-contact-sub{ margin-left: 13.5px; }
}


/* English のページの一番下の CONTACT の区画。上の線〜「CONTACT」の字の頭が約45.5px、「Contact」の字の下〜下の線が約39.5px で、下が約6px 狭かった。下だけ 5px 足す（36.3→41.3。6px だと下が約1px 広かった） */
body.page-id-25304 .nd-about-section.nd-contact-page{ padding-bottom: 41.3px !important; }


/* 事務所案内の #about-concept・#about-process へ飛んだとき、iPhone では区画の上の線がヘッダーの下に約4px 見え、字も4px 下がっていた（画面写真で 13 画素＝約4.3px）。PC はヘッダーの下端と区画の上端が一致しているので触らない。スマホ（指で触る端末）だけ止まる位置を 4.33px 上へ（71→66.67） */
@media (max-width: 640px) and (hover: none), (max-width: 640px) and (pointer: coarse){
  body.page-id-19902 .nd-about-section[id]{ scroll-margin-top: 66.67px; }
}


/* フッターの上の線を、どのページでもヘッダーの下の線と同じ濃さに。
   トップ以外：ヘッダーは 昼 .25／夜 .35 なのに、フッターは 昼 .40（指で触る端末は .35）／夜 .40 だった。
   トップ：ヘッダーと同じ（PC 昼夜 .40、指で触る端末 .35）。トップで濃く見えたのは欄外の線の二重（v5-top.css 末尾で解消） */
body:not(.home) .wp-block-group.alignfull.has-global-padding.is-layout-constrained{ border-top-color: rgba(0,0,0,.25); }
@media (prefers-color-scheme: dark){
  body:not(.home) .wp-block-group.alignfull.has-global-padding.is-layout-constrained{ border-top-color: rgba(255,255,255,.35); }
}
@media (hover: none) and (pointer: coarse){
  body.home .wp-block-group.alignfull.has-global-padding.is-layout-constrained{ border-top-color: rgba(0,0,0,.35); }
}
@media (hover: none) and (pointer: coarse) and (prefers-color-scheme: dark){
  body.home .wp-block-group.alignfull.has-global-padding.is-layout-constrained{ border-top-color: rgba(255,255,255,.35); }
}


/* スマホの三本線メニュー。コンタクトの下（Safari のボタン帯まで）が約36px で窮屈に見えた。すべての字間から 1px ずつ詰める：
   見出し→子（19.2→18.2）、子と子・最後の子→区切り線（li の下 3→2）、区切り線→次の見出し（28→27）をそれぞれ 1px ずつ。合わせて 14px 上がり、コンタクトの下は約50px */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container{ padding-top: 18.2px !important; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container > li{ margin-bottom: 2px !important; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container > li:last-child{ margin-bottom: 0 !important; } /* 最後の子の下は元々 0。上の 2px が付いてしまうので戻す */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container > li.has-child ~ li.has-child{ padding-top: 27px !important; margin-top: 8px !important; } /* 最後の子→区切り線（mt 9→8） */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content{ padding-top: 15px !important; } /* ヘッダーの線→仕事実績集（16→15） */

/* トップだけ事務所名が見出し（h1）になり、行の高さが 1.125 になって並びが他のページとずれていた。他のページ（p）と同じ 1.4 にそろえる */
h1.wp-block-site-title { line-height: 1.4; }

/* 事務所名のリンクに下線を付けない決まりは、WordPress がページの最後のほうで読み込むので、
   Safari・iPhone ではそれが届く前の一瞬だけ普通の下線が見えていた。同じ決まりを先にここで書いておく */
.wp-block-site-title :where(a) { text-decoration: inherit; }

/* フッターの段落の行の高さが 13px×1.4＝18.2px の端数になり、ページの高さに端数が出ていた。
   一番下の近くでリロードすると、戻した位置が半ドットずれて揺れて見えるので、整数にする */
p:has(> a.nd-foot-en) { line-height: 18px; }

/* フッターの上下の余白は「窓の幅の 7%」で、狭い窓では 58.17px のような端数になる。1px 単位に丸める */
.wp-block-group:has(> p > a.nd-foot-en) {
	padding-top: round(clamp(30px, 7vw, 70px), 1px) !important;
	padding-bottom: round(clamp(30px, 7vw, 70px), 1px) !important;
}

/* お問い合わせの本文欄：最初から 150px にしておく（10 行分の高さで一度描かれてから縮んでいた） */
.nd-contact-page .wpcf7-form textarea { height: 150px; }

/* お問い合わせの送信ボタンの下：送信中の印が後から入って 35px 伸びていたので、入る前から同じ場所を取っておく */
.nd-contact-page .wpcf7-form p:has(> .wpcf7-submit):not(:has(.wpcf7-spinner))::after { content: ""; display: inline-block; width: 24px; height: 24px; margin: 0 24px; }
