/* =====================================================================
   エクステリアLABO / 新築外構LP
   思想：外構の値段を、分解して見せる。方眼紙・寸法線・実測値。
   角丸は0。--signal はCTAのみ。数値は必ず Mono。
   ===================================================================== */

/* ---------- トークン ---------- */
:root {
  --paper:    #F7F7F4;  /* トレーシングペーパー。基本背景 */
  --grid:     #222E27;  /* 方眼。濃地に敷く罫 */
  --panel:    #FFFFFF;  /* カード面 */
  --ink:      #16211C;  /* 本文・見出し */
  --ink-mute: #6E736F;  /* 補足・注記・寸法値 */
  --green:    #0E5C3F;  /* 植栽。ブランドアクセント */
  --cta:      #F5801F;  /* CTA/ボタンの行動色（鮮やかなオレンジ・全ボタン統一） */
  --cta-hover:#DD6C0E;
  --terra:    #C46A30;  /* ロゴのテラコッタ。ロゴ＋ごく一部の暖色アクセントのみ */
  --line:     #D4D6D1;  /* 罫線（白パネル上） */

  /* 文脈カラー（既定＝濃地#16211C用。白パネル内では .section--panel 等で反転） */
  --fg:        #E9EBE8;  /* 本文 */
  --fg-mute:   #A9B0AA;  /* 補足・注記 */
  --fg-accent: #7FBFA3;  /* ラベル・アクセント（淡緑） */
  --sep:       #2E3733;  /* 濃地上の罫線 */

  --sans: "IBM Plex Sans JP", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;

  --fs-hero:  clamp(2.0rem, 5.5vw, 3.6rem);
  --fs-price: clamp(3.2rem, 10vw, 6.4rem);  /* Mono。ページ内最大 */
  --fs-h2:    clamp(1.55rem, 4.2vw, 2.75rem);
  --fs-body:  clamp(0.95rem, 2.2vw, 1.05rem);
  --fs-mono:  0.82rem;                        /* ラベル・寸法値 */
  --fs-note:  0.78rem;                        /* CG注記 */

  --wrap: 1080px;
  --pad-block: clamp(64px, 10vw, 120px);
}

/* ---------- リセット ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: 1.9;
  color: var(--fg);
  background-color: var(--ink);   /* 背景＝#16211C ベタ（方眼なし・クライアント指定） */
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
h1, h2, h3, p, dl, dd, figure { margin: 0; }
a { color: inherit; }
button { font-family: inherit; }

/* フォーカス可視化 */
:focus-visible {
  outline: 2px solid var(--terra);
  outline-offset: 3px;
}

/* ---------- レイアウト共通 ---------- */
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(20px, 5vw, 40px); }
section { padding-block: var(--pad-block); position: relative; }

/* 濃い面・白面では方眼を消す */
.section--panel {
  background: var(--panel);
  color: var(--ink);
  --fg: var(--ink); --fg-mute: var(--ink-mute);
  --fg-accent: var(--green); --sep: var(--line);
}
.section--ink   { background: var(--ink); color: #E9EBE8; }
.section--panel::before,
.section--ink::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
}

/* セクションラベル LABO / 0X */
.seclabel {
  font-family: var(--mono);
  font-size: var(--fs-mono);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--fg-accent);
  display: block;
  margin-bottom: 14px;
}
.section--ink .seclabel { color: #7FBFA3; }

.h2 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: var(--fs-h2);
  letter-spacing: -0.02em;
  line-height: 1.4;
  margin-bottom: 24px;
}

.lead { max-width: 46em; color: var(--fg); }
.section--ink .lead { color: #C9CEC9; }

/* ---------- ロゴ ---------- */
.logo { display: inline-flex; align-items: baseline; gap: .1em; text-decoration: none; }
.logo-ja {
  font-family: var(--sans); font-weight: 600;
  font-size: 1.0em; letter-spacing: -0.02em; color: var(--ink);
}
.logo-en {
  font-family: var(--mono); font-weight: 600;
  font-size: 1.15em; letter-spacing: 0.06em; color: var(--green);
}

/* ---------- 寸法線（シグネチャ） ---------- */
.dim {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono);
  font-size: var(--fs-mono);
  color: var(--fg-accent);
  letter-spacing: 0.02em;
}
/* 水平線（.dim-line span）＋ 端点の垂直端末線（疑似要素）で製図の寸法線を組む */
.dim { --tick: 8px; }
.dim-line {
  flex: 1; height: 1px; background: currentColor; position: relative;
}
.dim-line::before, .dim-line::after {
  content: ""; position: absolute; top: 50%; width: 1px; height: var(--tick);
  background: currentColor; transform: translateY(-50%);
}
.dim-line--l::before { left: 0; }
.dim-line--r::after  { right: 0; }
.dim-val { font-weight: 500; white-space: nowrap; color: var(--fg-mute); }
.section--ink .dim { color: #7FBFA3; }
.section--ink .dim-val { color: #C9CEC9; }

/* 寸法線の描画アニメ（画面進入時に左右へ引かれる） */
.dim-line { transform: scaleX(0); transform-origin: center; transition: transform .6s ease; }
.is-inview .dim-line { transform: scaleX(1); }

/* ---------- .tbd 暫定値マーカー ---------- */
.tbd {
  background: linear-gradient(transparent 62%, #FFE58A 62%);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.tbd::after {
  content: "仮";
  font-family: var(--mono);
  font-size: .58em; vertical-align: super;
  color: var(--terra); margin-left: .15em;
}
/* 確定モード：マーカーを消す */
body.is-final .tbd { background: none; }
body.is-final .tbd::after { content: none; }

/* ---------- 画像プレースホルダー ---------- */
.ph { position: relative; overflow: hidden; background: var(--grid); }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph.is-empty img { display: none; }
.ph .ph-prompt { display: none; }
.ph.is-empty .ph-prompt { display: block; }
.ph-prompt {
  background: var(--ink); color: #E9EBE8;
  font-family: ui-monospace, monospace; font-size: .72rem;
  padding: 16px; line-height: 1.7; white-space: pre-wrap;
  aspect-ratio: 16/9; overflow: auto; margin: 0;
}
.ph-label {
  display: inline-block; margin-bottom: 8px;
  color: var(--terra); font-weight: 600; letter-spacing: .04em;
}
.ph-prompt code { color: #C9CEC9; font-family: inherit; white-space: pre-wrap; }
.ph[data-ratio="3-2"] .ph-prompt { aspect-ratio: 3/2; }
.ph[data-ratio="4-3"] .ph-prompt { aspect-ratio: 4/3; }
.ph[data-ratio="3-2"] { aspect-ratio: 3/2; }
.ph[data-ratio="4-3"] { aspect-ratio: 4/3; }
.ph[data-ratio="16-9"] { aspect-ratio: 16/9; }

/* ---------- 図版フレーム（specimen：製図台にマウントした実測対象として扱う） ---------- */
.figure { margin: 0; }
.figure-frame { position: relative; }
/* 1pxの薄縁で「版がマウントされている」定義感を出す（生の矩形にしない） */
.ph { border: 1px solid var(--line); }

/* 端部トンボ（registration / crop marks）：緑のL字を四隅に外接させる */
.reg { position: absolute; width: 15px; height: 15px; z-index: 4; pointer-events: none; }
.reg--tl { top: -6px; left: -6px;  border-top: 1px solid var(--green);    border-left: 1px solid var(--green); }
.reg--tr { top: -6px; right: -6px; border-top: 1px solid var(--green);    border-right: 1px solid var(--green); }
.reg--bl { bottom: -6px; left: -6px;  border-bottom: 1px solid var(--green); border-left: 1px solid var(--green); }
.reg--br { bottom: -6px; right: -6px; border-bottom: 1px solid var(--green); border-right: 1px solid var(--green); }

/* 版番号プレート（catalog plate）— 実画像が入ったときだけ表示 */
.fig-tag {
  position: absolute; top: 0; left: 0; z-index: 3;
  font-family: var(--mono); font-weight: 600; font-size: .66rem;
  letter-spacing: .08em; color: var(--paper); background: var(--green);
  padding: 4px 9px;
}
/* 寸法比の注記（measured）— 実画像が入ったときだけ表示 */
.fig-ratio {
  position: absolute; right: 8px; bottom: 8px; z-index: 3;
  font-family: var(--mono); font-weight: 500; font-size: .62rem;
  letter-spacing: .1em; color: var(--ink);
  background: rgba(247,247,244,.92); padding: 3px 7px;
}
/* プレースホルダー表示中は、プロンプト自身のラベルと衝突するため隠す */
.ph.is-empty .fig-tag,
.ph.is-empty .fig-ratio { display: none; }

/* FVヒーロー版：本文列より広くブレイクアウトさせ、主役として置く */
.figure--hero {
  width: min(1240px, 94vw);
  margin-left: 50%;
  transform: translateX(-50%);
  margin-top: 4px;
}

/* ---------- ボタン / CTA ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-family: var(--sans); font-weight: 600; font-size: 1rem;
  line-height: 1.2; text-decoration: none; text-align: center;
  padding: 16px 26px; border: 1px solid transparent; border-radius: 2px;
  cursor: pointer; transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
/* 主CTA：行動色（緑）。ロゴのオレンジと衝突させない */
.btn--signal { background: var(--cta); color: #fff; border-color: var(--cta); }
.btn--signal:hover { background: var(--cta-hover); border-color: var(--cta-hover); }
/* 副次：電話・LINE。塗りは使わない */
.btn--line-out { background: transparent; color: var(--fg); border-color: var(--fg); }
.btn--line-out:hover { border-color: var(--fg-accent); color: var(--fg-accent); }
.section--ink .btn--line-out { color: #E9EBE8; border-color: #E9EBE8; }
.section--ink .btn--line-out:hover { border-color: #7FBFA3; color: #7FBFA3; }
.btn small { font-family: var(--mono); font-weight: 500; font-size: .78em; letter-spacing: .02em; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* =====================================================================
   S0. 上部バー
   ===================================================================== */
.topbar {
  background: var(--panel); color: var(--ink);   /* ロゴ（白背景向け）を活かすため明るい地に */
  font-size: .82rem; border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; gap: 12px 24px; flex-wrap: wrap; padding-block: 10px; }
/* ロゴ画像（ファイルを入れると表示。無い間は文字ロゴにフォールバック） */
.topbar .logo-img { height: 50px; width: auto; display: block; }
.topbar .logo-img + .logo-fallback { display: none; }
.topbar .logo-fallback { display: inline-flex; align-items: baseline; gap: .1em; }
.topbar .logo-ja { color: var(--ink); }
.topbar .logo-en { color: var(--green); }
/* 中央メッセージ（PCのみ／900px以下は非表示） */
.topbar-area { color: var(--ink); font-size: .92rem; line-height: 1.5; letter-spacing: .01em; }
/* PCではグループを溶かして従来の1行レイアウト（SPで2段バンド化） */
.topbar-brand, .topbar-contact { display: contents; }
/* 電話：緑の受話器アイコン＋太字の番号＋受付時間（右寄せ・枠なし） */
.topbar-tel {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink); margin-left: auto;
}
.tt-ico { width: 20px; height: 20px; stroke: var(--green); fill: none; stroke-width: 2; flex: none; }
.topbar-tel-body { display: flex; flex-direction: column; line-height: 1.2; }
.topbar-tel-num { font-family: var(--mono); font-weight: 700; font-size: 1.25rem; letter-spacing: .01em; color: inherit; }
.topbar-tel-hours { font-size: .68rem; color: var(--ink-mute); letter-spacing: .01em; margin-top: 1px; }
.topbar-tel:hover .topbar-tel-num { color: var(--cta); }
/* 見積もりボタン：オレンジのピル＋シェブロン */
.topbar-cta {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .95rem; font-weight: 700; text-decoration: none;
  background: var(--cta); color: #fff;
  padding: 11px 22px; border-radius: 999px;
  transition: background .2s ease;
}
.topbar-cta:hover { background: var(--cta-hover); }
.topbar-cta-chev { width: 15px; height: 15px; fill: none; stroke: #fff; stroke-width: 2.6; flex: none; }
/* 中央メッセージは狭い画面では隠す（折返し防止） */
@media (max-width: 900px) { .topbar-area { display: none; } }

/* =====================================================================
   S1. ファーストビュー（キービジュアル＝デザイン画像を1枚配置。PC/SP出し分け）
   ===================================================================== */
.hero { position: relative; background: var(--panel); font-size: 0; text-align: center; padding: 0; }
.hero picture { display: block; }
/* PCは画像を原寸(幅941px)近くで中央寄せ＝拡大でぼやけない。SPは全幅 */
.hero-img { display: block; width: 100%; max-width: 960px; height: auto; margin: 0 auto; }

/* スクリーンリーダー用の見出し（画像に文字が焼き込まれているため） */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* 画像未配置時のプレースホルダー（本番で画像を置けば非表示になる） */
.hero--noimg { min-height: clamp(300px, 42vw, 560px); display: flex; align-items: center; justify-content: center; }
.hero--noimg::after {
  content: "FV画像を配置してください（PC: images/fv-pc.png ／ スマホ: images/fv-sp.png）";
  font-family: var(--mono); font-size: .82rem; color: var(--ink-mute); text-align: center; padding: 0 24px;
}

/* =====================================================================
   FV直下CTAバー（濃緑バー＋オレンジ円バッジ＋オレンジボタン）
   ===================================================================== */
.fvcta { background: var(--panel); padding-top: clamp(6px, 1.2vw, 16px); padding-bottom: clamp(18px, 2.4vw, 32px); }
/* CTAバーの幅をFV画像（最大960px・中央寄せ）に一致させる */
.fvcta .wrap { max-width: 960px; padding-inline: 0; }
/* CTAバー直後のセクションは上余白を詰めて近づける */
.fvcta + section { padding-top: clamp(30px, 4vw, 52px); }
.fvcta-bar {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center;
  gap: clamp(18px, 3vw, 40px);
  background: #33422C;                 /* 濃いオリーブグリーン */
  border-radius: 16px;
  padding: clamp(18px, 2.2vw, 26px) clamp(22px, 3vw, 40px);
  color: #fff;
}

/* 左：無料バッジ（オレンジの円） */
.fvcta-badge {
  flex: none; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  width: clamp(84px, 8vw, 104px); aspect-ratio: 1; border-radius: 50%;
  background: var(--cta); color: #fff; line-height: 1.32;
  font-size: clamp(.7rem, 1vw, .82rem); font-weight: 600; letter-spacing: .01em;
}
.fvcta-badge b { font-weight: 700; font-size: 1.12em; }

/* 中央：リード＋電話＋受付 */
.fvcta-mid { min-width: 0; }
.fvcta-lead { font-weight: 700; font-size: clamp(1rem, 1.5vw, 1.3rem); letter-spacing: .01em; }
.fvcta-tel {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: #fff; margin-top: 3px;
}
.fvcta-ico { width: clamp(26px, 2.4vw, 34px); height: auto; color: #fff; flex: none; }
.fvcta-num {
  font-family: var(--sans); font-weight: 700; letter-spacing: .01em; line-height: 1.05;
  font-size: clamp(1.9rem, 3.4vw, 2.9rem);
}
.fvcta-tel:hover .fvcta-num { opacity: .9; }
.fvcta-hours { font-size: clamp(.78rem, 1vw, .92rem); color: #DCE1D6; margin-top: 3px; }

/* 右：オレンジのCTAボタン */
.fvcta-btn {
  flex: none; display: inline-flex; align-items: center; gap: 12px;
  background: var(--cta); color: #fff; text-decoration: none;
  font-weight: 700; font-size: clamp(1rem, 1.4vw, 1.22rem);
  padding: clamp(15px, 1.7vw, 22px) clamp(24px, 2.6vw, 40px);
  border-radius: 999px; transition: background .2s ease, transform .2s ease;
}
.fvcta-btn:hover { background: var(--cta-hover); }
.fvcta-chev { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2.6; flex: none; }

/* タブレット以下：縦積み中央寄せ */
@media (max-width: 640px) {
  .fvcta .wrap { padding-inline: 16px; }
}
@media (max-width: 860px) {
  .fvcta-bar {
    grid-template-columns: 1fr; justify-items: center; text-align: center;
    gap: 14px; border-radius: 14px;
  }
  .fvcta-tel { justify-content: center; }
  .fvcta-btn { width: 100%; justify-content: center; }
}

/* =====================================================================
   S2. お悩み提示（2カラム：左に問い＋チェック、右に「現状＝外構前」の写真）
   ===================================================================== */
.worry-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: stretch;
}
.worry-content { align-self: center; }
.worry-lead { color: var(--ink-mute); margin: -6px 0 22px; }

.worry-media { display: flex; }
.worry-figure { margin: 0; display: flex; flex-direction: column; width: 100%; }
.worry-figure .figure-frame { position: relative; flex: 1; min-height: 380px; }
.worry-figure .ph { height: 100%; aspect-ratio: auto; }
.worry-figure .ph img { height: 100%; object-fit: cover; }
.worry-figure .ph-prompt { aspect-ratio: 3/4; }
.worry-figure .img-note { margin-top: 8px; }
/* 「現況調査」プレートは緑ではなく濃色で、問題＝ネガの記号として差別化 */
.fig-tag--before { background: var(--ink); color: var(--paper); letter-spacing: .06em; }

/* --- 現況調査オーバーレイ：寸法線で「未施工の外構」を実測している体で注釈する --- */
.worry-figure .ph::after {   /* 下部スクリム（注釈の可読性確保） */
  content: ""; position: absolute; inset: auto 0 0 0; height: 52%; z-index: 2;
  background: linear-gradient(0deg, rgba(20,29,25,.72) 4%, rgba(20,29,25,.28) 42%, transparent 100%);
  pointer-events: none;
}
.survey {
  position: absolute; left: 20px; right: 20px; bottom: 22px; z-index: 3;
  font-family: var(--mono); color: #fff; pointer-events: none;
}
.survey-note {
  margin: 0 0 12px; font-size: .8rem; letter-spacing: .04em; color: #E9EBE8;
}
.survey-note b { color: #fff; font-weight: 600; border-bottom: 1px solid rgba(255,255,255,.6); }   /* 強調は白＋下線（signal色はCTA専用のため使わない） */
.survey-dim { display: flex; align-items: center; gap: 10px; font-size: .68rem; letter-spacing: .05em; color: rgba(255,255,255,.9); }
.survey-dim-line { flex: 1; height: 1px; background: rgba(255,255,255,.85); position: relative; }
.survey-dim-line::before, .survey-dim-line::after {
  content: ""; position: absolute; top: 50%; width: 1px; height: 8px; background: rgba(255,255,255,.85); transform: translateY(-50%);
}
.survey-dim-line--l::before { left: 0; }
.survey-dim-line--r::after { right: 0; }
.survey-dim-val { white-space: nowrap; }
/* プレースホルダー表示中はプロンプトと衝突するため隠す */
.ph.is-empty::after { display: none; }
.ph.is-empty .survey { display: none; }

.worry-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.worry-list li {
  display: grid; grid-template-columns: 28px 1fr; align-items: start; gap: 14px;
  padding: 18px 0; border-bottom: 1px solid var(--line);
  font-weight: 500;
}
.worry-list li:first-child { border-top: 1px solid var(--line); }
.worry-check {
  width: 22px; height: 22px; margin-top: 3px;
  border: 1.5px solid var(--green); position: relative; flex: none;
}
.worry-check::after {
  content: ""; position: absolute; left: 6px; top: 2px;
  width: 6px; height: 12px; border: solid var(--green);
  border-width: 0 2px 2px 0; transform: rotate(45deg);
}

/* =====================================================================
   S3. 中間マージン：費用の分解バー
   同じ「工事の費用(64)」を両行の基準にし、HMだけ手数料を上乗せ＝
   バーの長さの差が中間マージンとして一目で分かる（＝値段を分解して見せる）
   ===================================================================== */
.cost { margin-top: clamp(32px, 5vw, 52px); max-width: 900px; }
.cost-lead { color: #C9CEC9; line-height: 1.9; margin-bottom: clamp(24px, 3.4vw, 34px); }

/* 支払い額のルーラー（目盛り）：バーを同じスケールで測っている体にする */
.cost-ruler {
  position: relative; height: 20px; margin-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,.22);
  background-image: repeating-linear-gradient(90deg, rgba(255,255,255,.22) 0 1px, transparent 1px 5%);
  background-repeat: repeat-x; background-size: 100% 7px; background-position: left bottom;
}
.cost-ruler-label, .cost-ruler-more {
  position: absolute; bottom: 6px; font-family: var(--mono); font-size: .72rem;
  letter-spacing: .04em; color: #8A8F8A; background: var(--ink); padding: 0 8px 0 0;
}
.cost-ruler-label { left: 0; }
.cost-ruler-more { right: 0; padding: 0 0 0 8px; }

.cost-row { margin-bottom: clamp(24px, 3.4vw, 38px); }
.cost-rowhead {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px 20px;
  flex-wrap: wrap; margin-bottom: 12px;
}
.cost-who { font-family: var(--mono); font-size: .82rem; letter-spacing: .04em; color: #9AA09B; }
.cost-who--labo { color: #8FE0BB; }
.cost-pay--labo { font-family: var(--mono); color: #8FE0BB; font-size: .95rem; letter-spacing: .03em; }
.cost-pay--labo b { font-weight: 600; font-size: 1.25rem; letter-spacing: .02em; }

/* バー本体（工事費62を両行の基準に。合計100で割合が明快） */
.cost-bar { display: flex; height: clamp(60px, 7vw, 76px); }
.seg {
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 0 8px; min-width: 0; overflow: hidden;
  font-size: clamp(.72rem, 1.4vw, .84rem); line-height: 1.25;
}
.seg--work { flex: 62; background: linear-gradient(180deg, #35996C, #2A7E58); color: #fff; font-weight: 600; }
.seg--margin {
  flex: 16; color: #C9CEC9; border-left: 1px solid rgba(20,29,25,.55);
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.05) 0 7px, rgba(255,255,255,.13) 7px 14px),
    rgba(255,255,255,.02);
}
.seg--margin:last-child { flex: 22; }
.seg--none {
  flex: 38; color: #6E756F; background: transparent;
  border: 1px dashed #3C463F;
}

/* 差分の寸法線ブラケット（HM=中間マージン／LABO=まるごとお客様に を対で見せる） */
.cost-bracket { display: flex; margin-top: 9px; }
.cost-bracket-gap { flex: 62; }
.cbd { flex: 38; display: flex; align-items: center; gap: 8px; }
.cbd-line { flex: 1; height: 1px; background: #7FBFA3; position: relative; }
.cbd-line:first-child::before, .cbd-line:last-child::after {
  content: ""; position: absolute; top: 50%; width: 1px; height: 8px; background: #7FBFA3; transform: translateY(-50%);
}
.cbd-line:first-child::before { left: 0; }
.cbd-line:last-child::after { right: 0; }
.cbd-label { font-family: var(--mono); font-size: .72rem; letter-spacing: .03em; color: #8FE0BB; white-space: nowrap; }
/* LABO側は「まるごとお客様に＝得」を明るい緑で強調 */
.cbd--save .cbd-line { background: #35C489; }
.cbd--save .cbd-line:first-child::before, .cbd--save .cbd-line:last-child::after { background: #35C489; }
.cbd--save .cbd-label { color: #35C489; font-weight: 600; }

.cost-note { margin-top: clamp(18px, 2.6vw, 26px); font-size: .76rem; color: #7A807B; }
.margin-outro { margin-top: clamp(28px, 4vw, 40px); max-width: 46em; }
.margin-section .margin-outro { color: #C9CEC9; }

/* バーをスクロール進入時に左から描画（クリップワイプ＝文字は歪まない） */
html.js-reveal .cost .cost-bar { clip-path: inset(0 100% 0 0); transition: clip-path .85s cubic-bezier(.2,.75,.25,1); }
html.js-reveal .reveal.is-inview .cost .cost-bar { clip-path: inset(0 0 0 0); }
html.js-reveal .cost-row--labo .cost-bar { transition-delay: .22s; }

/* SP：狭い手数料区間の文字は隠し、ブラケットで意味を担保 */
@media (max-width: 620px) {
  .seg--margin .seg-t { display: none; }
  .cost-bar { height: 58px; }
}

/* =====================================================================
   S4. 完全自社施工
   ===================================================================== */
.selfbuild .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px, 5vw, 56px); align-items: center; }
.img-note {
  font-size: var(--fs-note); color: var(--fg-mute); margin-top: 8px;
  font-family: var(--sans);
}

/* =====================================================================
   S5. 完成イメージ
   ===================================================================== */
.plans-head { display: grid; gap: 6px; margin-bottom: 40px; }
.plans-sub { font-family: var(--mono); font-size: var(--fs-mono); color: var(--fg-mute); letter-spacing: .05em; }
.plans-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 32px); }
.plan { display: grid; gap: 0; align-content: start; }
.plan .ph { aspect-ratio: 4/3; }
.cg-note {
  font-size: var(--fs-note); color: var(--fg-mute); font-family: var(--sans);
  margin: 10px 0 14px; line-height: 1.6;
}
.plan h3 { font-family: var(--sans); font-weight: 600; font-size: 1.15rem; letter-spacing: -0.01em; margin-bottom: 6px; }
.plan > p { color: var(--fg-mute); font-size: .95rem; margin-bottom: 16px; }
/* ラベルを上・値を下の積み上げにして、費用の値にカード幅いっぱいを与える（改行崩れ防止） */
.spec { display: block; border-top: 1px solid var(--sep); padding-top: 14px; }
.spec dt {
  font-family: var(--mono); font-size: var(--fs-mono); color: var(--fg-mute);
  letter-spacing: .02em; margin-top: 14px;
}
.spec dt:first-of-type { margin-top: 0; }
.spec dd {
  font-family: var(--mono); font-size: .85rem; font-weight: 500; color: var(--fg);
  letter-spacing: -0.01em; margin: 3px 0 0; text-align: left; line-height: 1.45;
}

/* =====================================================================
   S6. 選ばれる理由
   ===================================================================== */
.reasons-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(20px, 3vw, 36px); margin-top: 40px; }
.reason { border-top: 2px solid var(--green); padding-top: 20px; }
.reason-no { font-family: var(--mono); font-weight: 600; font-size: .82rem; color: var(--green); letter-spacing: .06em; }
.reason h3 { font-family: var(--sans); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em; margin: 6px 0 12px; }
.reason p { color: var(--ink-mute); font-size: .95rem; }
.reason p + p { margin-top: 10px; }

/* =====================================================================
   S6.5 対応エリア
   ===================================================================== */
.area-lead { margin-top: 14px; }

/* 地図パネル（左）＋ 情報（右）の2カラム */
.area-plot {
  margin-top: clamp(28px, 4vw, 40px);
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 52px);
  align-items: start;
}

/* --- 地図パネル（製図テーブルにマウントした版） --- */
.area-map {
  position: relative; margin: 0;
  background: var(--panel); border: 1px solid var(--line);
  padding: clamp(16px, 2.6vw, 26px);
  color: var(--ink);
  --fg: var(--ink); --fg-mute: var(--ink-mute);
  --fg-accent: var(--green); --sep: var(--line);
}
.area-map-svg { width: 100%; height: auto; display: block; }
.area-pref { stroke-linejoin: round; }
.area-pref--off { fill: #E7E8E3; stroke: #D2D4CE; stroke-width: 1; }
.area-pref--on  { fill: var(--green); stroke: #fff; stroke-width: 1.6; }
.area-lbl { font-family: var(--sans); }
.area-lbl--on  { fill: #fff; font-size: 17px; font-weight: 700; }
.area-lbl--off { fill: #9AA09A; font-size: 12.5px; font-weight: 500; }
.area-map-cap {
  display: block; margin-top: 12px;
  font-family: var(--mono); font-size: .66rem; letter-spacing: .12em;
  color: var(--ink-mute);
}

/* --- 情報カラム --- */
/* 「首都圏 1都3県」の見出しストリップ（左に緑のインデックスライン） */
.area-headline {
  display: flex; flex-direction: column; gap: 3px;
  border-left: 3px solid var(--fg-accent);
  padding: 2px 0 2px 16px; margin-bottom: 24px;
}
.area-headline-en {
  font-family: var(--mono); font-weight: 600; font-size: .7rem;
  letter-spacing: .2em; color: var(--fg-accent);
}
.area-headline-main {
  font-family: var(--sans); font-weight: 700;
  font-size: clamp(1.4rem, 3.4vw, 1.95rem); letter-spacing: -0.02em; color: var(--fg);
}
.area-headline-sub { color: var(--fg-accent); }

/* 対応都県の凡例（罫線区切り＋緑スウォッチ） */
.area-legend { list-style: none; margin: 0; padding: 0; }
.area-legend-item {
  display: flex; align-items: center; gap: 13px;
  padding: 12px 2px; border-bottom: 1px solid var(--sep);
}
.area-legend-item:first-child { border-top: 1px solid var(--sep); }
.area-sw {
  flex: none; width: 14px; height: 14px; background: var(--green);
  box-shadow: 0 0 0 1px rgba(233,235,232,.35);   /* 濃地でも輪郭が立つように */
}
.area-legend-ja {
  font-family: var(--sans); font-weight: 700; font-size: 1.05rem;
  letter-spacing: -0.01em; color: var(--fg);
}
.area-legend-en {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .12em;
  color: var(--fg-mute); margin-left: auto;
}

.area-note {
  margin-top: 20px; color: var(--fg-mute);
  font-size: .88rem; line-height: 1.75;
}
.area-note-mark { color: var(--fg-accent); font-weight: 600; margin-right: 2px; }

/* =====================================================================
   S7. フロー
   ===================================================================== */
.flow-steps { display: grid; gap: 0; margin-top: 40px; }
.step {
  display: grid; grid-template-columns: 88px 1fr; gap: clamp(16px, 3vw, 40px);
  padding: 28px 0; border-top: 1px solid var(--sep);
}
.step:last-child { border-bottom: 1px solid var(--sep); }
.step-no { font-family: var(--mono); font-weight: 600; font-size: 2.2rem; color: var(--fg-accent); line-height: 1; letter-spacing: -0.02em; }
.step h3 { font-family: var(--sans); font-weight: 600; font-size: 1.15rem; margin-bottom: 8px; }
.step p { color: var(--fg-mute); font-size: .95rem; }

/* =====================================================================
   S8. FAQ
   ===================================================================== */
.faq-list { margin-top: 32px; border-top: 1px solid var(--line); }
.faq {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 44px 22px 34px;
  position: relative; font-weight: 600; font-size: 1.02rem; line-height: 1.6;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
  content: "Q"; position: absolute; left: 0; top: 22px;
  font-family: var(--mono); font-weight: 600; color: var(--green);
}
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 30px;
  width: 11px; height: 11px; border-right: 1.5px solid var(--ink-mute); border-bottom: 1.5px solid var(--ink-mute);
  transform: rotate(45deg); transition: transform .2s ease;
}
.faq[open] summary::after { transform: rotate(-135deg); }
.faq-body { padding: 0 34px 24px 34px; color: var(--ink-mute); font-size: .95rem; }

/* =====================================================================
   S9. 最終CTA
   ===================================================================== */
.finalcta { text-align: left; }
.finalcta .h2 { font-size: clamp(1.7rem, 4.5vw, 2.6rem); line-height: 1.35; }
.finalcta-note { color: #C9CEC9; margin: 20px 0 32px; }
.finalcta-tel { font-family: var(--mono); font-weight: 600; letter-spacing: .03em; }
.finalcta .reception { font-family: var(--mono); font-size: var(--fs-mono); color: #C9CEC9; margin-top: 14px; }

/* =====================================================================
   S10. フォーム
   ===================================================================== */
.formwrap { max-width: 620px; margin-top: 36px; }
.field { display: grid; gap: 8px; margin-bottom: 24px; }
.field label { font-weight: 600; font-size: .95rem; }
.field .req { font-family: var(--mono); font-size: .68rem; color: var(--fg-accent); margin-left: 8px; letter-spacing: .04em; }
.field .opt { font-family: var(--mono); font-size: .68rem; color: var(--fg-mute); margin-left: 8px; letter-spacing: .04em; }
.field input, .field textarea {
  font-family: var(--sans); font-size: 1rem; color: var(--ink);
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 2px;
  background: var(--panel); width: 100%;
}
.field input:focus, .field textarea:focus { border-color: var(--green); outline: 2px solid transparent; outline-offset: 0; }
.field textarea { min-height: 120px; resize: vertical; line-height: 1.7; }
.field-error { color: #E08A52; font-size: .82rem; font-family: var(--sans); min-height: 1em; }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--terra); }

.agree { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 28px; font-size: .92rem; }
.agree input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--green); flex: none; }
.agree a { color: var(--fg-accent); text-underline-offset: 2px; }
.form-submit { width: 100%; }
.form-submit[disabled] { opacity: .6; cursor: wait; }

/* honeypot：人間には見えない（display:noneはボットに検知されやすいため画面外へ） */
.hp-field {
  position: absolute !important;
  left: -9999px; top: auto;
  width: 1px; height: 1px; overflow: hidden;
}

/* mail.php から ?error=1 で戻された場合のエラーバナー */
.form-error-banner {
  max-width: 620px; margin-top: 24px;
  padding: 14px 18px;
  border: 1px solid var(--terra); border-left-width: 4px;
  background: #FBF1EA; color: var(--ink);
  font-size: .92rem; line-height: 1.8;
}

/* =====================================================================
   プライバシーポリシー（privacy.html）
   ===================================================================== */
.privacy .privacy-body {
  background: var(--panel); border: 1px solid var(--line);
  color: var(--ink);
  --fg: var(--ink); --fg-mute: var(--ink-mute);
  --fg-accent: var(--green); --sep: var(--line);
  max-width: 800px;
  padding: clamp(24px, 5vw, 48px);
  margin-top: 8px;
}
.privacy .privacy-body h2 {
  font-family: var(--sans); font-weight: 700; font-size: 1.08rem;
  letter-spacing: -0.01em; margin: 2.4em 0 .6em;
  padding-left: 12px; border-left: 3px solid var(--green);
}
.privacy .privacy-body p { font-size: .95rem; }
.privacy .privacy-body p + p { margin-top: .6em; }
.privacy .privacy-body ul { margin: .6em 0 0; padding-left: 1.5em; font-size: .95rem; }
.privacy .privacy-body li { margin: .35em 0; }
.privacy .privacy-body a { color: var(--green); text-underline-offset: 2px; }
.privacy-date { color: var(--ink-mute); font-size: .88rem; margin-top: 3em; }
.privacy-back { margin-top: 32px; }

/* =====================================================================
   サンクスページ（thanks.html）
   ===================================================================== */
.thanks { min-height: 58vh; }
.thanks .thanks-body { margin-top: 20px; color: var(--fg); line-height: 2; }
.thanks .thanks-body p + p { margin-top: 10px; color: var(--fg-mute); }
.thanks .hero-tel { margin-top: 28px; }
.thanks .thanks-cta { margin-top: 28px; }

/* =====================================================================
   S11. フッター
   ===================================================================== */
.footer { background: var(--ink); color: #C9CEC9; font-size: .9rem; border-top: 1px solid var(--sep); }
.footer .wrap { padding-block: clamp(48px, 8vw, 72px); }
.footer .logo-ja { color: #E9EBE8; }
.footer .logo-en { color: #9FD3BB; }

/* フッターのロゴ：白地ロゴを角ばった白プレートとして配置（FIGプレートと同じ意匠） */
.logo--footer { display: inline-flex; background: #fff; padding: 13px 18px; line-height: 0; box-shadow: 0 1px 0 rgba(0,0,0,.25); }
.logo--footer .logo-img { height: 38px; width: auto; display: block; }
.logo--footer .logo-img + .logo-fallback { display: none; }
/* 画像が無い場合のみテキスト版にフォールバック（プレートも解除される） */
.footer .logo:not(.logo--footer) .logo-fallback { display: inline-flex; align-items: baseline; gap: .1em; }
.company-table { display: grid; grid-template-columns: auto 1fr; gap: 10px 28px; margin: 28px 0; max-width: 560px; }
.company-table dt { font-family: var(--mono); font-size: var(--fs-mono); color: #8A8F8A; letter-spacing: .03em; }
.company-table dd { margin: 0; color: #E9EBE8; }
.footer-tel { font-family: var(--mono); font-weight: 600; letter-spacing: .03em; color: #E9EBE8; text-decoration: none; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 28px; padding-top: 24px; border-top: 1px solid #2E3733; }
.footer-links a { color: #C9CEC9; font-size: .85rem; text-decoration: none; text-underline-offset: 3px; }
.footer-links a:hover { text-decoration: underline; }
.footer-copy { margin-top: 20px; font-family: var(--mono); font-size: .72rem; color: #6E756F; letter-spacing: .03em; }

/* =====================================================================
   追従CTA（SPのみ）
   ===================================================================== */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 150;
  display: none; grid-template-columns: 1fr 1fr 1.2fr;
  background: var(--panel); border-top: 1px solid var(--line);
  box-shadow: 0 -2px 12px rgba(0,0,0,.08);
  transform: translateY(110%); transition: transform .3s ease;
}
.sticky-cta.is-visible { transform: translateY(0); }
.sticky-cta a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding: 11px 4px; text-decoration: none; font-size: .8rem; font-weight: 600;
  color: var(--ink); border-left: 1px solid var(--line);
}
.sticky-cta a:first-child { border-left: 0; }
.sticky-cta a small { font-family: var(--mono); font-size: .62rem; color: var(--ink-mute); font-weight: 500; }
.sticky-cta a.sc-tel { background: var(--cta); color: #fff; }              /* 電話：オレンジ */
.sticky-cta a.sc-line { background: #06C755; color: #fff; }                /* LINE：公式グリーン */
.sticky-cta a.sc-quote { background: var(--panel); color: var(--ink); }    /* 無料見積もり：白 */
.sticky-cta a.sc-quote small { color: var(--ink-mute); }
.sc-ico { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.6; }

/* =====================================================================
   スクロールフェードイン（フェイルセーフ：既定は可視。
   JSが有効化(html.js-reveal)したときだけ隠し、スクロールで出す。
   → JSが動かない／発火しない場合でもコンテンツは必ず表示される）
   ===================================================================== */
html.js-reveal .reveal { opacity: 0; transform: translateY(12px); transition: opacity .5s ease, transform .5s ease; }
html.js-reveal .reveal.is-inview { opacity: 1; transform: none; }

/* =====================================================================
   レスポンシブ
   ===================================================================== */
@media (max-width: 880px) {
  .selfbuild .wrap { grid-template-columns: 1fr; }
  .plans-grid { grid-template-columns: 1fr; max-width: 460px; }
  .reasons-grid { grid-template-columns: 1fr; }
  /* 対応エリア：地図を上、情報を下に縦積み */
  .area-plot { grid-template-columns: 1fr; gap: clamp(24px, 6vw, 34px); }
  .area-map { max-width: 480px; }
  /* お悩み：縦積み。見出し＋チェック → 画像 の順 */
  .worry-grid { grid-template-columns: 1fr; gap: clamp(28px, 6vw, 40px); }
  .worry-figure .figure-frame { min-height: 0; }
  .worry-figure .ph { aspect-ratio: 4/3; height: auto; }
  .worry-figure .ph img { height: 100%; }
}
@media (max-width: 720px) {
  .sticky-cta { display: grid; }
  body { padding-bottom: 64px; }   /* 追従CTA分の余白 */
  /* ヘッダーを2段に分離：上＝ロゴ帯（白）／下＝電話バンド（#16211Cベース） */
  .topbar { border-bottom: 0; }
  .topbar .wrap { display: block; padding-inline: 0; padding-block: 0; }
  .topbar-brand {
    display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap;
    padding: 9px clamp(20px, 5vw, 40px);
  }
  .topbar-contact {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    background: var(--ink);
    padding: 10px clamp(20px, 5vw, 40px);
  }
  .topbar-tel {
    margin-left: 0;
    background: transparent; border: 0; padding: 4px 0;
    color: #E9EBE8;
  }
  .topbar-tel .tt-ico, .tt-ico { stroke: #7FBFA3; }
  .topbar-tel-hours { display: none; }
  .topbar .logo-img { height: 40px; }
  .topbar-cta { padding: 9px 18px; font-size: .88rem; }
  .step { grid-template-columns: 56px 1fr; }
  .step-no { font-size: 1.6rem; }
  .flow-chain { gap: 8px; }
  .flow-node { font-size: .88rem; padding: 9px 13px; }
}
@media (max-width: 420px) {
  .cta-row .btn { width: 100%; }
  .flow-chain { flex-direction: column; align-items: stretch; }
  .flow-arrow { transform: rotate(90deg); align-self: center; }
}

/* =====================================================================
   モーション低減
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .dim-line { transform: scaleX(1) !important; transition: none !important; }
  .cost .cost-bar { clip-path: none !important; transition: none !important; }
  .btn, .sticky-cta { transition: none !important; }
}
