/* =============================================
   株式会社大伸 案D：和モダン（生成り×藍・縦書き明朝）
   モック mock-d-full.html のスタイルをそのまま移植しています。
   §1〜§27 … モック由来（デザイン確定済み。安易に変更しないこと）
   §28 以降 … WordPress／ブロックエディタ互換レイヤー
   ============================================= */

/* ---------- §1 変数 ---------- */
:root {
	--kinari: #f6f4ee;
	--kinari-2: #edeae1;
	--ai: #1f3a5f;
	--ai-deep: #16293f;
	--sumi: #33342f;
	--sumi-soft: #7a7b74;
	--line: #d9d5c9;
	--shu: #9d3b2f;
	/* やわらかい印象の書体に統一：
	   明朝＝Zen Old Mincho（角が丸く温かみのある和文明朝）
	   ゴシック＝Zen Kaku Gothic New（やわらかい角ゴシック）
	   英字＝Marcellus（クラシックで柔らかいローマン体） */
	--serif: "Zen Old Mincho", "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", "MS PMincho", serif;
	--sans: "Zen Kaku Gothic New", "Yu Gothic UI", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
	--en: "Marcellus", "Jost", "Segoe UI", serif;
	--header-h: 84px;
}

/* ---------- §2 リセット・ベース ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
	font-family: var(--serif);
	color: var(--sumi);
	background: var(--kinari);
	font-size: 16px;
	line-height: 2.1;
	letter-spacing: .08em;
}
a { color: inherit; text-decoration: none; transition: all .35s; cursor: pointer; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--ai); outline-offset: 3px; }

.fadein { opacity: 0; transform: translateY(24px); transition: opacity 1s ease, transform 1s ease; }
.fadein.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .fadein { opacity: 1; transform: none; transition: none; } }

/* スクリーンリーダー専用テキスト（WordPress標準） */
.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; width: 1px; margin: -1px; padding: 0; overflow: hidden;
	position: absolute !important; word-wrap: normal !important;
}

/* ---------- §3 ヘッダー ---------- */
.header {
	position: fixed; inset: 0 0 auto; z-index: 100;
	background: rgba(246,244,238,.95);
	border-bottom: 1px solid var(--line);
}
.header-in {
	display: flex; align-items: center; justify-content: space-between;
	height: var(--header-h); padding: 0 40px;
}
.logo { display: flex; align-items: center; gap: 16px; }
.logo-mon {
	width: 46px; height: 46px;
	display: block;
	flex-shrink: 0;
}
.logo-txt .ja { display: block; font-size: 20px; font-weight: 500; letter-spacing: .2em; line-height: 1.4; }
.logo-txt .en { display: block; font-family: var(--en); font-size: 10px; letter-spacing: .32em; color: var(--sumi-soft); }
.nav { display: flex; align-items: center; gap: 34px; }
.nav a { font-size: 14px; letter-spacing: .18em; position: relative; padding-bottom: 4px; }
.nav a::after {
	content: ""; position: absolute; left: 50%; bottom: 0;
	width: 0; height: 1px; background: var(--ai); transition: all .35s;
	transform: translateX(-50%);
}
.nav a:hover::after, .nav a.on::after { width: 100%; }
.nav .cta {
	border: 1px solid var(--ai); color: var(--ai);
	padding: 10px 30px; letter-spacing: .22em;
}
.nav .cta:hover { background: var(--ai); color: var(--kinari); }
.nav .cta::after { display: none; }

/* カスタムロゴ画像を設定した場合 */
.logo .custom-logo { max-height: 52px; width: auto; }

/* ---------- §4 ハンバーガー＋縦書きドロワー ---------- */
.burger {
	display: none; position: relative; z-index: 110;
	width: 46px; height: 46px; border: 1px solid var(--line);
	background: transparent; cursor: pointer;
}
.burger span {
	position: absolute; left: 13px; width: 18px; height: 1px;
	background: var(--sumi); transition: transform .35s, opacity .25s, top .35s;
}
.burger span:nth-child(1) { top: 16px; }
.burger span:nth-child(2) { top: 22px; }
.burger span:nth-child(3) { top: 28px; }
.burger.open span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { top: 22px; transform: rotate(-45deg); }

.drawer {
	position: fixed; inset: 0; z-index: 105;
	background: var(--kinari);
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	gap: 48px;
	opacity: 0; visibility: hidden; transition: opacity .4s, visibility .4s;
}
.drawer.open { opacity: 1; visibility: visible; }
.drawer::before {
	content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 40%;
	background: conic-gradient(var(--kinari-2) 25%, transparent 25% 50%, var(--kinari-2) 50% 75%, transparent 75%) 0 0 / 56px 56px;
	opacity: .5;
	mask-image: linear-gradient(270deg, #000 0%, transparent 100%);
	-webkit-mask-image: linear-gradient(270deg, #000 0%, transparent 100%);
}
.drawer-nav {
	position: relative; z-index: 1;
	display: flex; flex-direction: row-reverse; gap: 30px;
	height: min(56svh, 440px);
}
.drawer-nav a {
	writing-mode: vertical-rl;
	font-size: 19px; font-weight: 500; letter-spacing: .32em;
}
.drawer-nav a:hover { color: var(--ai); }
.drawer-tel { position: relative; z-index: 1; text-align: center; }
.drawer-tel .v { display: block; font-size: 26px; font-weight: 600; letter-spacing: .1em; color: var(--ai); }
.drawer-tel .k { display: block; font-family: var(--sans); font-size: 11px; letter-spacing: .18em; color: var(--sumi-soft); }
@media (max-width: 900px) {
	.nav { display: none; }
	.burger { display: block; }
	.header-in { padding: 0 20px; }
	.logo-txt .ja { font-size: 17px; }
}

/* ---------- §5 トップ ヒーロー：縦書き ---------- */
.hero {
	min-height: 100svh;
	display: flex; align-items: center; justify-content: center;
	position: relative; overflow: hidden;
	padding: var(--header-h) 6vw 0;
}
/* 市松の気配 */
.hero::before {
	content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 34%;
	background:
		conic-gradient(var(--kinari-2) 25%, transparent 25% 50%, var(--kinari-2) 50% 75%, transparent 75%) 0 0 / 56px 56px;
	opacity: .5;
	mask-image: linear-gradient(90deg, #000 0%, transparent 100%);
	-webkit-mask-image: linear-gradient(90deg, #000 0%, transparent 100%);
}
.hero-in {
	position: relative; z-index: 1;
	display: flex; align-items: center; justify-content: center;
	gap: clamp(32px, 7vw, 110px);
	width: 100%; max-width: 1100px;
}
.hero-catch {
	writing-mode: vertical-rl;
	/* 幅だけでなく高さ（=縦書きの行の長さ）でも上限を掛け、
	   2行目「未来の礎を築く。」が必ず1列に収まるサイズにする */
	font-size: clamp(32px, min(4.8vw, 5.2svh), 60px);
	font-weight: 500; letter-spacing: .3em; line-height: 2;
	/* 高さ固定をやめて内容ぴったりに。nowrap と併せ、<br> 以外では折り返さない */
	height: auto;
	white-space: nowrap;
	color: var(--sumi);
}
.hero-catch .ai { color: var(--ai); }
.hero-side { writing-mode: vertical-rl; height: min(46svh, 420px); display: flex; gap: 28px; }
/* height:auto + nowrap で、サイズが変わっても「株式会社大伸」が2列に割れないようにする */
.hero-side .t1 { font-size: 15px; letter-spacing: .42em; color: var(--sumi-soft); height: auto; white-space: nowrap; }
.hero-side .t2 { font-size: 13px; letter-spacing: .42em; color: var(--sumi-soft); height: auto; white-space: nowrap; }
.hero-mon {
	position: absolute; right: 8vw; bottom: 10vh;
	width: clamp(180px, 24vw, 320px); height: clamp(180px, 24vw, 320px);
	border: 1px solid var(--line); border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	pointer-events: none;
}
.hero-mon::before {
	content: ""; position: absolute; inset: 14px;
	border: 1px solid var(--line); border-radius: 50%;
}
.hero-mon span { font-size: clamp(64px, 9vw, 120px); color: var(--kinari-2); font-weight: 600; }

/* ヒーローに写真を設定した場合（カスタマイザー「トップページ メイン写真」）。
   未設定時はモックと完全に同一の表示になる。
   写真は生成り色の膜（グラデーション）ごしに全面へ敷き、市松模様と紋は隠す。 */
.hero--has-image::before { display: none; }
.hero--has-image .hero-mon { display: none; }
.hero-photo { position: absolute; inset: 0; z-index: 0; }
.hero-photo .img {
	width: 100%; height: 100%;
	background-size: cover; background-position: center 66%;
	filter: saturate(.5) contrast(.96) brightness(1.1);
}
.hero-photo::after {
	content: ""; position: absolute; inset: 0;
	background:
		linear-gradient(180deg, rgba(246,244,238,.92) 0%, rgba(246,244,238,.84) 42%, rgba(246,244,238,.66) 72%, rgba(246,244,238,.54) 100%);
}
@media (max-width: 900px) {
	/* 文字が人物のシルエットに重なるので、膜を少し濃く */
	.hero-photo::after {
		background:
			linear-gradient(180deg, rgba(246,244,238,.95) 0%, rgba(246,244,238,.9) 46%, rgba(246,244,238,.74) 100%);
	}
}

/* ---------- §6 下層ヒーロー（縦書きタイトル） ---------- */
.page-hero {
	position: relative; overflow: hidden;
	background: var(--kinari-2);
	min-height: clamp(260px, 36svh, 360px);
	display: flex; align-items: center; justify-content: center;
	padding: calc(var(--header-h) + 40px) 6vw 40px;
}
.page-hero::before {
	content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 34%;
	background:
		conic-gradient(rgba(255,255,255,.7) 25%, transparent 25% 50%, rgba(255,255,255,.7) 50% 75%, transparent 75%) 0 0 / 48px 48px;
	opacity: .6;
	mask-image: linear-gradient(90deg, #000 0%, transparent 100%);
	-webkit-mask-image: linear-gradient(90deg, #000 0%, transparent 100%);
}
.page-hero-in {
	position: relative; z-index: 1;
	display: flex; flex-direction: row-reverse; align-items: center; gap: 26px;
}
.page-hero-title {
	writing-mode: vertical-rl;
	/* 幅だけでなく高さでも上限を掛け、最長「お問い合わせ」(6文字 ≒ 8.2em) が1列に収まるサイズにする */
	font-size: clamp(22px, min(3.4vw, 4.6svh), 40px); font-weight: 500;
	letter-spacing: .36em; line-height: 1.6;
	/* 高さ固定をやめて内容ぴったりに。nowrap と併せて絶対に折り返さない */
	height: auto;
	white-space: nowrap;
}
.page-hero .en {
	writing-mode: vertical-rl;
	font-family: var(--en); font-size: 11px; letter-spacing: .42em; color: var(--ai);
}
.page-hero-mon {
	position: absolute; right: 6vw; bottom: -60px;
	width: clamp(160px, 20vw, 240px); height: clamp(160px, 20vw, 240px);
	border: 1px solid rgba(255,255,255,.8); border-radius: 50%;
	pointer-events: none;
}
@media (max-width: 800px) {
	.page-hero { min-height: 200px; padding: calc(var(--header-h) + 32px) 6vw 32px; }
	.page-hero-in { flex-direction: column-reverse; gap: 10px; }
	.page-hero-title, .page-hero .en { writing-mode: horizontal-tb; height: auto; }
	/* 横書きに切り替わるSPでは高さ制約が無いので、幅基準のサイズに戻す（nowrapは維持） */
	.page-hero-title { letter-spacing: .24em; font-size: clamp(24px, 5.4vw, 32px); }
}

/* ---------- §7 パンくず ---------- */
.crumb-wrap { padding: 22px 6vw 0; }
.crumb {
	max-width: 1080px; margin: 0 auto;
	font-family: var(--sans); font-size: 11px; letter-spacing: .16em; color: var(--sumi-soft);
}
.crumb a:hover { color: var(--ai); }
.crumb i { font-style: normal; margin: 0 10px; }

/* ---------- §8 セクション共通 ---------- */
.sec { padding: 130px 6vw; position: relative; }
.sec-sm { padding: 92px 6vw; }
.sec-ai { background: var(--ai-deep); color: var(--kinari); }
.sec-k2 { background: var(--kinari-2); }
.max { max-width: 1080px; margin: 0 auto; }
.max-narrow { max-width: 840px; margin: 0 auto; }
.sec-head { display: flex; align-items: center; gap: 24px; margin-bottom: 72px; }
.sec-head .ja { font-size: clamp(26px, 3vw, 36px); font-weight: 500; letter-spacing: .24em; white-space: nowrap; }
.sec-head::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.sec-ai .sec-head::after { background: rgba(246,244,238,.25); }
.sec-head .en { font-family: var(--en); font-size: 11px; letter-spacing: .34em; color: var(--ai); }
.sec-ai .sec-head .en { color: rgba(246,244,238,.6); }
.lead {
	text-align: center; font-size: clamp(16px, 1.8vw, 19px);
	line-height: 2.5; letter-spacing: .14em;
	margin-bottom: clamp(64px, 9vw, 110px);
}
.note { font-family: var(--sans); font-size: 12px; line-height: 2; color: var(--sumi-soft); }
.center { text-align: center; }
.mt56 { margin-top: 56px; }

/* ---------- §9 ボタン ---------- */
.btn {
	display: inline-block;
	border: 1px solid var(--sumi); padding: 14px 52px;
	font-size: 14px; letter-spacing: .3em;
}
.btn:hover { background: var(--sumi); color: var(--kinari); }
.btn-ai { border-color: var(--ai); color: var(--ai); }
.btn-ai:hover { background: var(--ai); color: var(--kinari); }
.btn-white { border-color: var(--kinari); color: var(--kinari); }
.btn-white:hover { background: var(--kinari); color: var(--ai-deep); }

/* ---------- §10 写真プレースホルダ ---------- */
.ph {
	display: flex; align-items: center; justify-content: center; text-align: center;
	border: 1px solid var(--line); padding: 14px;
	font-family: var(--sans); font-size: 10px; letter-spacing: .24em; line-height: 2.2;
	color: rgba(51,52,47,.45);
}
.ph1 { background: linear-gradient(150deg, #cfd6d2 0%, #a8b3ac 100%); }
.ph2 { background: linear-gradient(150deg, #d6d2c6 0%, #b3aa96 100%); }
.ph3 { background: linear-gradient(150deg, #ccd2d8 0%, #9fabb8 100%); }
.ph4 { background: linear-gradient(150deg, #d2cdc2 0%, #aaa392 100%); }
.ph5 { background: linear-gradient(150deg, #c8d0cd 0%, #9daaa5 100%); }
.ph6 { background: linear-gradient(150deg, #d4d0c8 0%, #b0a99b 100%); }

/* 写真を入れたら枠いっぱいに表示する（プレースホルダの差し替え） */
.ph.has-image { padding: 0; border: none; }
.ph > img,
.ph > a > img { width: 100%; height: 100%; object-fit: cover; }

/* 「準備中」SVGを枠いっぱいに表示する（グラデーション地・枠線は不要になるため打ち消す） */
.ph.ph-ready { padding: 0; border: none; background: none; }
.ph.ph-ready svg { width: 100%; height: 100%; display: block; }

/* ---------- §11 大伸について（トップ） ---------- */
.about-grid { display: grid; grid-template-columns: auto 1fr; gap: clamp(40px, 8vw, 120px); align-items: center; }
.about-vertical {
	writing-mode: vertical-rl;
	font-size: clamp(22px, 2.4vw, 30px); font-weight: 500;
	letter-spacing: .3em; line-height: 2.2;
	/* 高さ固定をやめて内容ぴったりに。nowrap と併せ、サイズが変わっても2列に折り返さない */
	height: auto;
	white-space: nowrap;
}
.about-txt { color: var(--sumi-soft); margin-bottom: 44px; max-width: 34em; }
@media (max-width: 800px) {
	.about-grid { grid-template-columns: 1fr; }
	.about-vertical { writing-mode: horizontal-tb; height: auto; }
}

/* ---------- §12 業務内容（トップの4枠） ---------- */
.svc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.svc-card { background: var(--kinari); padding: 52px 30px 56px; text-align: center; transition: background .4s; position: relative; }
.svc-card:hover { background: #fff; }
/* カード内側に一回り小さい枠をもう1本添える（外の区切り線とは別に） */
.svc-card::before {
	content: "";
	position: absolute; inset: 14px;
	border: 1px solid var(--sumi);
	pointer-events: none;
}
.sec-k2 .svc-card { background: var(--kinari-2); }
.sec-k2 .svc-card:hover { background: #fff; }
.svc-kanji {
	display: flex; align-items: center; justify-content: center;
	width: 76px; height: 76px; margin: 0 auto 45.5px;
	border: 1px solid var(--ai); border-radius: 50%;
	font-size: 30px; color: var(--ai); font-weight: 600;
	position: relative;
}
.svc-kanji::after {
	content: "";
	position: absolute; left: 50%; top: 100%; margin-top: 22px; transform: translateX(-50%);
	width: 46px; height: 1.5px;
	background: linear-gradient(90deg, transparent, var(--ai), transparent);
}
.svc-name { font-size: 20px; font-weight: 600; letter-spacing: .2em; margin-bottom: 4px; text-align: center; }
.svc-en {
	font-family: var(--en); font-size: 10px; letter-spacing: .3em; color: var(--sumi-soft);
	display: block; margin-bottom: 0; padding-bottom: 22px; position: relative; text-align: center;
}
.svc-en::after {
	content: "";
	position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
	width: 100px; height: 1.5px;
	background: linear-gradient(90deg, transparent, var(--ai), transparent);
}
.svc-txt { font-family: var(--sans); font-size: 13px; line-height: 2; color: var(--sumi-soft); text-align: center; margin-top: 22px; }
@media (max-width: 1000px) { .svc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .svc-grid { grid-template-columns: 1fr; } }

/* ---------- §13 施工実績カード ---------- */
.works-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 40px; }
.works-ph {
	aspect-ratio: 4/3; margin-bottom: 24px;
	transition: box-shadow .4s;
}
.works-card:hover .works-ph { box-shadow: 8px 8px 0 var(--kinari-2); }
.sec-k2 .works-card:hover .works-ph { box-shadow: 8px 8px 0 #fff; }
.works-name { font-size: 17px; font-weight: 600; letter-spacing: .12em; }
.works-loc { font-family: var(--sans); font-size: 11px; color: var(--sumi-soft); letter-spacing: .16em; display: block; margin-top: 4px; }
.works-ex { font-family: var(--sans); font-size: 13px; line-height: 2; color: var(--sumi-soft); margin-top: 10px; }
@media (max-width: 900px) { .works-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .works-grid { grid-template-columns: 1fr; } }

/* 写真の横並び（採用ページ等） */
.photo-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.photo-row .ph { aspect-ratio: 4/3; }
@media (max-width: 900px) { .photo-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .photo-row { grid-template-columns: 1fr; } }

/* ---------- §14 ページネーション ---------- */
.pager { display: flex; justify-content: center; gap: 10px; margin-top: 72px; }
.pager a, .pager span {
	min-width: 42px; height: 42px;
	display: flex; align-items: center; justify-content: center;
	border: 1px solid var(--line);
	font-family: var(--en); font-size: 13px; letter-spacing: .1em;
	font-variant-numeric: tabular-nums;
}
.pager .on { background: var(--ai); border-color: var(--ai); color: var(--kinari); }
.pager a:hover { border-color: var(--ai); color: var(--ai); }

/* ---------- §15 採用（反転セクション） ---------- */
.recruit-grid { display: grid; grid-template-columns: auto 1fr; gap: clamp(40px, 8vw, 120px); align-items: center; }
.recruit-vertical {
	writing-mode: vertical-rl;
	font-size: clamp(24px, 2.8vw, 36px); font-weight: 500;
	letter-spacing: .3em; line-height: 2.1;
	height: 300px;
}
.recruit-txt { color: rgba(246,244,238,.75); font-family: var(--sans); font-size: 14px; margin-bottom: 40px; max-width: 36em; }
.recruit-list { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 48px; }
.recruit-list span {
	font-family: var(--sans); font-size: 12px; letter-spacing: .12em;
	border: 1px solid rgba(246,244,238,.4); padding: 5px 18px; border-radius: 999px;
	color: rgba(246,244,238,.85);
}
@media (max-width: 800px) {
	.recruit-grid { grid-template-columns: 1fr; }
	.recruit-vertical { writing-mode: horizontal-tb; height: auto; }
}

/* ---------- §16 お知らせ ---------- */
.news-list { border-top: 1px solid var(--line); }
.news-list a {
	display: flex; gap: 36px; align-items: baseline;
	padding: 26px 8px; border-bottom: 1px solid var(--line);
	font-family: var(--sans);
}
.news-list a:hover { background: rgba(255,255,255,.6); }
.news-list .d { font-size: 13px; color: var(--sumi-soft); flex-shrink: 0; letter-spacing: .1em; font-variant-numeric: tabular-nums; }
.news-list .t { font-size: 14px; }
@media (max-width: 700px) { .news-list a { flex-direction: column; gap: 4px; } }

/* ---------- §17 経営理念 ---------- */
.phil { position: relative; display: flex; flex-direction: row-reverse; align-items: center; justify-content: center; gap: clamp(36px, 7vw, 96px); }
.phil-mon {
	position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
	width: clamp(260px, 34vw, 420px); height: clamp(260px, 34vw, 420px);
	border: 1px solid var(--line); border-radius: 50%; pointer-events: none;
}
.phil-mon::before { content: ""; position: absolute; inset: 16px; border: 1px solid var(--line); border-radius: 50%; }
.phil-main {
	position: relative; z-index: 1;
	writing-mode: vertical-rl;
	white-space: nowrap;
	font-size: clamp(22px, 3vw, 38px); font-weight: 500;
	letter-spacing: .3em; line-height: 2.2;
	height: auto;
}
.phil-main .ai { color: var(--ai); }
.phil-txt { position: relative; z-index: 1; max-width: 26em; color: var(--sumi-soft); font-size: 15px; }
@media (max-width: 800px) {
	.phil { flex-direction: column; gap: 36px; }
	.phil-main { writing-mode: horizontal-tb; height: auto; text-align: center; letter-spacing: .2em; }
	.phil-mon { width: 220px; height: 220px; }
}

/* ---------- §18 大伸を数字で紹介 ---------- */
.statline-row { display: flex; }
.statline-item { flex: 1; text-align: center; padding: 0 24px; position: relative; }
.statline-item + .statline-item::before {
	content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 1px; background: var(--line);
}
.statline-num { font-family: var(--en); font-size: clamp(34px, 4.2vw, 50px); font-weight: 600; color: var(--ai); line-height: 1; font-variant-numeric: tabular-nums; }
.statline-num .unit { font-family: var(--sans); font-size: 13px; font-weight: 400; color: var(--sumi-soft); letter-spacing: .05em; margin-left: 3px; }
.statline-label { margin-top: 22px; font-size: 13px; font-weight: 600; letter-spacing: .2em; }
.statline-note { font-family: var(--sans); font-size: 11px; color: var(--sumi-soft); letter-spacing: .06em; margin-top: 8px; line-height: 1.7; }
@media (max-width: 800px) {
	.statline-row { flex-direction: column; gap: 32px; }
	.statline-item { padding: 0; }
	.statline-item + .statline-item::before { left: 50%; top: -16px; bottom: auto; width: 34px; height: 1px; transform: translateX(-50%); }
}

/* ---------- §19 定義表（会社情報・募集要項・実績メタ） ---------- */
.wa-table { width: 100%; border-collapse: collapse; }
.wa-table th, .wa-table td {
	text-align: left; vertical-align: top;
	padding: 22px 10px; border-bottom: 1px solid var(--line);
	line-height: 2.1;
}
.wa-table tr:first-child th, .wa-table tr:first-child td { border-top: 1px solid var(--line); }
.wa-table th { width: 12em; color: var(--ai); font-weight: 600; letter-spacing: .18em; white-space: nowrap; }
.wa-table td { font-family: var(--sans); font-size: 14px; }
.wa-table td a { border-bottom: 1px solid var(--line); }
.wa-table td a:hover { color: var(--ai); border-color: var(--ai); }
@media (max-width: 767px) {
	.wa-table, .wa-table tbody, .wa-table tr, .wa-table th, .wa-table td { display: block; width: auto; }
	.wa-table tr { border-top: 1px solid var(--line); padding: 18px 0; }
	.wa-table tr:first-child th, .wa-table tr:first-child td { border-top: none; }
	.wa-table th { border-bottom: none; padding: 0 0 4px; white-space: normal; }
	.wa-table td { border-bottom: none; padding: 0; }
}

/* ---------- §20 アクセス（地図枠） ---------- */
.map-ph {
	aspect-ratio: 16/9; border: 1px solid var(--line); background: var(--kinari-2);
	display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px;
	font-family: var(--sans); font-size: 11px; letter-spacing: .24em; color: var(--sumi-soft);
}
/* 実際のGoogleマップ iframe を入れた場合 */
.map-ph iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- §21 業務内容 詳細（交互レイアウト＋漢数字の透かし） ---------- */
.wa-detail {
	position: relative;
	display: grid; grid-template-columns: 1fr 1fr;
	gap: clamp(32px, 6vw, 84px); align-items: center;
	margin-bottom: clamp(80px, 11vw, 140px);
	/* トップの業務カードからのアンカー遷移時、固定ヘッダーと透かし数字の分だけ下げて止める */
	scroll-margin-top: calc(var(--header-h) + clamp(56px, 9vw, 110px));
}
.wa-detail:last-of-type { margin-bottom: 0; }
/* ログイン中は管理バー（PC 32px／スマホ 46px）も上に重なるので、その分も下げる */
.admin-bar .wa-detail { scroll-margin-top: calc(var(--header-h) + 32px + clamp(56px, 9vw, 110px)); }
@media (max-width: 782px) { .admin-bar .wa-detail { scroll-margin-top: calc(var(--header-h) + 46px + clamp(56px, 9vw, 110px)); } }
.wa-detail.rev .wa-detail-ph { order: 2; }
.wa-detail-ph { aspect-ratio: 4/3; position: relative; z-index: 1; }
.wa-detail-body { position: relative; z-index: 1; }
.wa-detail-num {
	position: absolute; z-index: 0; top: -.42em; left: -.06em;
	font-size: clamp(96px, 15vw, 200px); line-height: 1; font-weight: 500;
	color: var(--kinari-2); pointer-events: none; user-select: none;
}
.wa-detail.rev .wa-detail-num { left: auto; right: -.06em; }
.wa-detail-head { display: flex; align-items: center; gap: 20px; margin-bottom: 22px; }
.wa-detail-head .svc-kanji { margin: 0; width: 62px; height: 62px; font-size: 25px; flex-shrink: 0; }
.wa-detail-head .svc-kanji::after { content: none; }
.wa-detail-title { font-size: clamp(24px, 2.6vw, 32px); font-weight: 500; letter-spacing: .24em; }
.wa-detail-en { display: block; font-family: var(--en); font-size: 10px; letter-spacing: .34em; color: var(--sumi-soft); }
.wa-detail-txt { color: var(--sumi-soft); }
@media (max-width: 800px) {
	.wa-detail { grid-template-columns: 1fr; }
	.wa-detail.rev .wa-detail-ph { order: 0; }
	.wa-detail.rev .wa-detail-num { right: auto; left: -.06em; }
}

/* ---------- §22 主な施工実績リスト ---------- */
.results { border-top: 1px solid var(--line); }
.results li {
	display: flex; gap: 16px; align-items: baseline;
	padding: 20px 8px; border-bottom: 1px solid var(--line);
	letter-spacing: .12em;
}
.results li::before { content: "―"; color: var(--ai); flex-shrink: 0; }

/* ---------- §23 採用：仕事の一日（横一本の時間軸） ---------- */
/* 右から左へ流れる横一本の時間軸。時刻は横書き、作業内容のみ縦書き */
.day {
	position: relative;
	display: flex; flex-direction: row-reverse; align-items: flex-start;
	width: fit-content; max-width: 100%; margin: 0 auto;
	padding-top: 28px; gap: clamp(18px, 5vw, 74px);
}
.day::before {
	content: ""; position: absolute; top: 28px; left: -9%; right: -9%; height: 1px;
	background: linear-gradient(to right, transparent, var(--line) 10%, var(--line) 90%, transparent);
}
.day-item {
	position: relative; flex: 0 0 auto;
	display: flex; flex-direction: column; align-items: center;
	padding-top: 26px;
}
.day-item::before {
	content: ""; position: absolute; top: -4px; left: 50%; transform: translateX(-50%);
	width: 9px; height: 9px; border-radius: 50%;
	border: 1px solid var(--ai); background: var(--kinari);
}
.day-item .t {
	font-family: var(--en); font-size: 13px; letter-spacing: .12em;
	color: var(--ai); font-variant-numeric: tabular-nums;
	white-space: nowrap; margin-bottom: 20px;
}
.day-item .b {
	writing-mode: vertical-rl; font-size: 16px; letter-spacing: .2em; line-height: 1.5;
}
@media (max-width: 800px) {
	.day {
		flex-direction: column; width: auto; gap: 0;
		padding: 4px 0 4px 30px;
	}
	.day::before {
		top: 12px; bottom: 12px; left: 4px; right: auto; width: 1px; height: auto;
		background: linear-gradient(to bottom, transparent, var(--line) 8%, var(--line) 92%, transparent);
	}
	.day-item {
		flex-direction: row; align-items: baseline; gap: 16px;
		padding: 13px 0; width: 100%;
	}
	.day-item::before { top: .95em; left: -30px; transform: none; }
	.day-item .t { width: 3.8em; flex-shrink: 0; margin-bottom: 0; text-align: right; }
	.day-item .b { writing-mode: horizontal-tb; letter-spacing: .14em; }
}

/* ---------- §24 応募・お問い合わせの連絡先 ---------- */
.info-row { display: flex; justify-content: center; gap: clamp(32px, 6vw, 80px); flex-wrap: wrap; }
.info-item { text-align: center; }
.info-mon {
	width: 58px; height: 58px; margin: 0 auto 20px;
	border: 1.5px solid var(--ai); border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	font-size: 22px; color: var(--ai);
}
.info-item .l { display: block; font-family: var(--sans); font-size: 11px; letter-spacing: .22em; color: var(--sumi-soft); margin-bottom: 8px; }
.info-item .v { display: block; font-size: clamp(24px, 3vw, 32px); font-weight: 600; letter-spacing: .08em; color: var(--ai); line-height: 1.5; }
.info-item .k { display: block; font-family: var(--sans); font-size: 11px; letter-spacing: .16em; color: var(--sumi-soft); }
.info-item .v.mail { font-size: clamp(16px, 2vw, 21px); letter-spacing: .04em; word-break: break-all; }

/* ---------- §25 フォーム ---------- */
.form-grid { display: grid; gap: 34px; max-width: 720px; margin: 0 auto; }
.form-grid label { display: block; font-size: 15px; letter-spacing: .18em; }
.req {
	display: inline-block; margin-left: 12px; vertical-align: 3px;
	font-family: var(--sans); font-size: 10px; letter-spacing: .1em;
	color: #fff; background: var(--shu); padding: 2px 9px;
}
.form-grid input, .form-grid select, .form-grid textarea {
	width: 100%; margin-top: 14px; padding: 12px 4px;
	font-family: var(--sans); font-size: 15px; color: var(--sumi);
	background: transparent; border: none; border-bottom: 1px solid var(--line);
	border-radius: 0; transition: border-color .3s;
}
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus {
	outline: none; border-bottom-color: var(--ai);
}
.form-grid textarea { resize: vertical; line-height: 2; }
.form-submit {
	justify-self: center; margin-top: 20px;
	background: transparent; border: 1px solid var(--ai); color: var(--ai);
	font-family: var(--serif); font-size: 15px; letter-spacing: .3em;
	padding: 16px 72px; cursor: pointer; transition: all .35s;
}
.form-submit:hover { background: var(--ai); color: var(--kinari); }

/* ---------- §26 CTA ---------- */
.cta { text-align: center; padding: 130px 6vw; background: var(--kinari-2); }
.cta-mon {
	width: 60px; height: 60px; margin: 0 auto 28px;
	border: 1.5px solid var(--ai); border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	font-size: 26px; color: var(--ai);
}
.cta-title { font-size: clamp(24px, 3vw, 34px); font-weight: 500; letter-spacing: .2em; margin-bottom: 18px; }
.cta-txt { color: var(--sumi-soft); font-family: var(--sans); font-size: 14px; margin-bottom: 52px; }
.cta-row { display: flex; justify-content: center; align-items: center; gap: 44px; flex-wrap: wrap; }
.cta-tel { line-height: 1.6; }
.cta-tel .v { font-size: 32px; letter-spacing: .1em; font-weight: 600; color: var(--ai); }
.cta-tel .k { display: block; font-family: var(--sans); font-size: 11px; color: var(--sumi-soft); letter-spacing: .2em; }

/* ---------- §27 フッター ---------- */
.footer { background: var(--ai-deep); color: rgba(246,244,238,.85); padding: 72px 6vw 0; }
.footer-in {
	max-width: 1080px; margin: 0 auto;
	display: flex; justify-content: space-between; gap: 44px; flex-wrap: wrap;
	padding-bottom: 56px;
}
.footer .f-logo { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.footer .f-name { font-size: 22px; font-weight: 500; letter-spacing: .2em; }
.footer .addr { font-style: normal; font-family: var(--sans); font-size: 13px; color: rgba(246,244,238,.6); line-height: 2.2; }
.footer .fnav { display: grid; grid-template-columns: repeat(2, auto); gap: 14px 48px; align-content: start; }
.footer .fnav a { font-size: 14px; letter-spacing: .16em; color: rgba(246,244,238,.8); }
.footer .fnav a:hover { color: #fff; }
.copy {
	border-top: 1px solid rgba(246,244,238,.15); padding: 24px 0; text-align: center;
	font-family: var(--sans); font-size: 10px; letter-spacing: .26em; color: rgba(246,244,238,.4);
}

@media (max-width: 700px) {
	.sec { padding: 88px 6vw; }
	.cta { padding: 88px 6vw; }
	.sec-head { margin-bottom: 48px; gap: 16px; }
}

/* =============================================================
   §28 以降：WordPress／ブロックエディタ互換レイヤー
   （モックのデザインを保ったまま、ブロックで組めるようにするための追加分）
   ============================================================= */

/* ---- 管理バー表示時に固定ヘッダーが隠れないようにする ---- */
@media screen and (min-width: 783px) { body.admin-bar .header { top: 32px; } }
@media screen and (max-width: 782px) { body.admin-bar .header { top: 46px; } }

/* ---- 本文ラッパー。.entry-content は使わない（汎用スタイルの干渉を避ける） ---- */
.page-blocks { overflow: clip; }

/* コアのレイアウト用 blockGap に対する保険。
   WordPress 7.0 は flow レイアウトに余白ルールを出力していないため通常は何もしないが、
   将来のバージョンで復活しても崩れないように打ち消しておく。
   ★ 必ず :where() で包んで詳細度を0にすること。
     詳細度を持たせると .sec-head{margin-bottom:72px} のようなモック側の余白指定に
     競り勝ってしまい、全ページの余白が消える（実際に一度これで事故を起こしている）。 */
:where(.page-blocks .is-layout-flow) > *,
:where(.page-blocks .is-layout-constrained) > * { margin-block-start: 0; margin-block-end: 0; }

/* グループブロックが .max / .max-narrow を担う場合、コアの constrained 幅指定を打ち消す */
.page-blocks .wp-block-group.max,
.page-blocks .wp-block-group.max-narrow { padding-left: 0; padding-right: 0; }

/* ---- 見出し：クラス指定の無い見出しを追加したときの既定値。
        こちらも :where() で詳細度0にして、.svc-name{font-weight:600} 等の
        モック側の指定を上書きしないようにする ---- */
:where(.page-blocks) :where(h1, h2, h3, h4, h5, h6) {
	font-weight: 500; line-height: 1.6;
}

/* ---- 定義表：コアのテーブルブロックは本文セルに th を置けないため
        1列目の td を見出し扱いにして .wa-table と同じ見た目にする ---- */
.wp-block-table.wa-table { margin: 0; overflow-x: visible; }
.wp-block-table.wa-table table { width: 100%; border-collapse: collapse; }
.wp-block-table.wa-table td {
	text-align: left; vertical-align: top;
	padding: 22px 10px; border: none; border-bottom: 1px solid var(--line);
	line-height: 2.1;
	font-family: var(--sans); font-size: 14px;
	word-break: normal;
}
.wp-block-table.wa-table tr:first-child td { border-top: 1px solid var(--line); }
.wp-block-table.wa-table td:first-child {
	width: 12em; color: var(--ai); font-weight: 600; letter-spacing: .18em;
	white-space: nowrap; font-family: var(--serif); font-size: 16px;
}
.wp-block-table.wa-table td a { border-bottom: 1px solid var(--line); }
.wp-block-table.wa-table td a:hover { color: var(--ai); border-color: var(--ai); }
@media (max-width: 767px) {
	.wp-block-table.wa-table table,
	.wp-block-table.wa-table tbody,
	.wp-block-table.wa-table tr,
	.wp-block-table.wa-table td { display: block; width: auto; }
	.wp-block-table.wa-table tr { border-top: 1px solid var(--line); padding: 18px 0; }
	.wp-block-table.wa-table tr:first-child td { border-top: none; }
	.wp-block-table.wa-table td { border-bottom: none; padding: 0; }
	.wp-block-table.wa-table td:first-child { padding: 0 0 4px; white-space: normal; width: auto; }
}

/* ---- リストブロック（主な施工実績） ---- */
.wp-block-list.results { padding-left: 0; }

/* ---- ボタンブロックをモックの .btn デザインへマッピング ---- */
.page-blocks .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 20px; }
.page-blocks .wp-block-button__link {
	display: inline-block;
	background: transparent; color: inherit;
	border: 1px solid var(--sumi); border-radius: 0;
	padding: 14px 52px;
	font-family: var(--serif); font-size: 14px; font-weight: 400; letter-spacing: .3em;
	line-height: 2.1;
	transition: all .35s;
}
.page-blocks .wp-block-button__link:hover { background: var(--sumi); color: var(--kinari); }
.page-blocks .btn-ai .wp-block-button__link { border-color: var(--ai); color: var(--ai); }
.page-blocks .btn-ai .wp-block-button__link:hover { background: var(--ai); color: var(--kinari); }
.page-blocks .btn-white .wp-block-button__link { border-color: var(--kinari); color: var(--kinari); }
.page-blocks .btn-white .wp-block-button__link:hover { background: var(--kinari); color: var(--ai-deep); }

/* ---- あとから挿入されるメディア ---- */
.page-blocks .wp-block-image { margin: 0; }
.page-blocks .wp-block-image img { max-width: 100%; height: auto; }
.page-blocks .wp-block-video video { width: 100%; height: auto; }
.page-blocks .wp-block-embed iframe { max-width: 100%; }

/* 装飾枠（.ph 系）の中に画像ブロックを入れたら全面カバーになる */
.ph > .wp-block-image { position: absolute; inset: 0; margin: 0; height: 100%; }
.ph > .wp-block-image img { width: 100%; height: 100%; object-fit: cover; }
.works-ph, .wa-detail-ph, .photo-row .ph { position: relative; }

/* ---- Contact Form 7（.page-blocks にスコープ） ---- */
.page-blocks .wpcf7 { margin: 0; }
.page-blocks .wpcf7 form.form-grid { display: grid; gap: 34px; max-width: 720px; margin: 0 auto; }
.page-blocks .wpcf7 .wpcf7-form-control-wrap { display: block; }
.page-blocks .wpcf7 input[type="text"],
.page-blocks .wpcf7 input[type="tel"],
.page-blocks .wpcf7 input[type="email"],
.page-blocks .wpcf7 select,
.page-blocks .wpcf7 textarea {
	width: 100%; margin-top: 14px; padding: 12px 4px;
	font-family: var(--sans); font-size: 15px; color: var(--sumi);
	background: transparent; border: none; border-bottom: 1px solid var(--line);
	border-radius: 0; transition: border-color .3s;
	-webkit-appearance: none; appearance: none;
}
.page-blocks .wpcf7 select {
	background-image: linear-gradient(45deg, transparent 50%, var(--sumi-soft) 50%),
		linear-gradient(135deg, var(--sumi-soft) 50%, transparent 50%);
	background-position: calc(100% - 14px) calc(50% + 2px), calc(100% - 8px) calc(50% + 2px);
	background-size: 6px 6px, 6px 6px;
	background-repeat: no-repeat;
}
.page-blocks .wpcf7 input:focus,
.page-blocks .wpcf7 select:focus,
.page-blocks .wpcf7 textarea:focus { outline: none; border-bottom-color: var(--ai); }
.page-blocks .wpcf7 textarea { resize: vertical; line-height: 2; }
.page-blocks .wpcf7 input[type="submit"] {
	justify-self: center; margin-top: 20px;
	background: transparent; border: 1px solid var(--ai); color: var(--ai);
	font-family: var(--serif); font-size: 15px; letter-spacing: .3em;
	padding: 16px 72px; cursor: pointer; transition: all .35s;
	-webkit-appearance: none; appearance: none; border-radius: 0;
}
.page-blocks .wpcf7 input[type="submit"]:hover { background: var(--ai); color: var(--kinari); }
/* 送信ボタン行はグリッド幅いっぱいを使って中央寄せ */
.page-blocks .wpcf7 .form-submit-row { display: flex; justify-content: center; }
/* フィールド単位のエラー */
.page-blocks .wpcf7 .wpcf7-not-valid-tip {
	font-family: var(--sans); font-size: 12px; letter-spacing: .08em;
	color: var(--shu); margin-top: 8px; line-height: 1.9;
}
.page-blocks .wpcf7 .wpcf7-not-valid { border-bottom-color: var(--shu); }
/* 送信結果メッセージ */
.page-blocks .wpcf7 .wpcf7-response-output {
	grid-column: 1 / -1;
	margin: 0; padding: 18px 22px;
	font-family: var(--sans); font-size: 13px; line-height: 2;
	border: 1px solid var(--line); background: rgba(255,255,255,.6);
	letter-spacing: .08em;
}
.page-blocks .wpcf7 form.invalid .wpcf7-response-output,
.page-blocks .wpcf7 form.unaccepted .wpcf7-response-output,
.page-blocks .wpcf7 form.failed .wpcf7-response-output { border-color: var(--shu); color: var(--shu); }
.page-blocks .wpcf7 form.sent .wpcf7-response-output { border-color: var(--ai); color: var(--ai); }
.page-blocks .wpcf7 .wpcf7-spinner { margin: 0 auto; }
/* CF7 の hidden フィールド群がグリッドの隙間を作らないように */
.page-blocks .wpcf7 form > .screen-reader-response { position: absolute !important; }

/* ---- ページネーション（the_posts_pagination の構造にモックの .pager を適用） ---- */
.pager .nav-links { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.pager .page-numbers {
	min-width: 42px; height: 42px;
	display: flex; align-items: center; justify-content: center;
	border: 1px solid var(--line);
	font-family: var(--en); font-size: 13px; letter-spacing: .1em;
	font-variant-numeric: tabular-nums;
	padding: 0 12px;
}
.pager .page-numbers.current { background: var(--ai); border-color: var(--ai); color: var(--kinari); }
.pager a.page-numbers:hover { border-color: var(--ai); color: var(--ai); }
.pager .page-numbers.dots { border-color: transparent; }

/* ---- 投稿・実績の詳細ページ（.entry-content は使わず .entry-body にスコープ） ---- */
.entry-head { margin-bottom: 48px; text-align: center; }
.entry-date {
	display: block; font-family: var(--en); font-size: 13px; letter-spacing: .2em;
	color: var(--sumi-soft); margin-bottom: 14px; font-variant-numeric: tabular-nums;
}
.entry-title { font-size: clamp(22px, 2.6vw, 30px); font-weight: 500; letter-spacing: .16em; line-height: 1.9; }
.entry-thumb { margin-bottom: 48px; }
.entry-thumb img { width: 100%; height: auto; }
.entry-body > * + * { margin-top: 28px; }
.entry-body h2 { font-size: 22px; font-weight: 600; letter-spacing: .18em; margin-top: 56px; }
.entry-body h3 { font-size: 18px; font-weight: 600; letter-spacing: .16em; margin-top: 40px; }
.entry-body p { color: var(--sumi-soft); }
.entry-body a { color: var(--ai); border-bottom: 1px solid var(--line); }
.entry-body a:hover { border-color: var(--ai); }
.entry-body ul, .entry-body ol { padding-left: 1.6em; color: var(--sumi-soft); }
.entry-body ul { list-style: disc; }
.entry-body ol { list-style: decimal; }
.entry-body img { max-width: 100%; height: auto; }
.entry-body blockquote {
	border-left: 2px solid var(--line); padding-left: 24px; color: var(--sumi-soft);
}
.entry-body figure { margin: 0; }
.entry-nav {
	display: flex; justify-content: center; align-items: center; gap: 28px; flex-wrap: wrap;
	margin-top: 88px;
}
.entry-nav a { font-family: var(--sans); font-size: 13px; letter-spacing: .12em; color: var(--sumi-soft); }
.entry-nav a:hover { color: var(--ai); }
.entry-nav .btn { font-family: var(--serif); font-size: 14px; }

/* ---- 投稿なし・404 ---- */
.no-posts { text-align: center; color: var(--sumi-soft); font-family: var(--sans); font-size: 14px; padding: 40px 0; }
.nf-code { font-family: var(--en); font-size: clamp(64px, 12vw, 140px); line-height: 1; color: var(--kinari-2); }
.nf-title { font-size: clamp(20px, 2.4vw, 28px); font-weight: 500; letter-spacing: .2em; margin: 24px 0 18px; }
.nf-txt { color: var(--sumi-soft); font-family: var(--sans); font-size: 14px; margin-bottom: 48px; }

/* ---- 余白ユーティリティ
        （モックで style="margin-…" とインライン指定していた箇所を、
        　ブロックの「追加CSSクラス」で再現できるようにクラス化したもの） ---- */
.mt44 { margin-top: 44px; }
.mb64 { margin-bottom: 64px; }
.mb110 { margin-bottom: 110px; }
.access-addr { margin-bottom: 28px; letter-spacing: .12em; }
.link-under { border-bottom: 1px solid var(--line); }
.link-under:hover { color: var(--ai); border-color: var(--ai); }

/* .center の中のボタンブロックは中央寄せにする */
.page-blocks .center .wp-block-buttons { justify-content: center; }

/* ---- WordPress 標準の配置・キャプションクラス ---- */
.alignleft { float: left; margin: 0 24px 24px 0; }
.alignright { float: right; margin: 0 0 24px 24px; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption-text, .wp-element-caption {
	font-family: var(--sans); font-size: 12px; color: var(--sumi-soft);
	text-align: center; margin-top: 10px; line-height: 2;
}
