/*
 * 施工会社詳細ページ「レイアウト確認用」新デザイン(SCFの layout_preview トグルがONの投稿でのみ読み込まれる)
 * すべて .tn-layout-preview 配下にスコープしており、他ページ・既存デザインには影響しない。
 * 色トークンは既存の style.css の CSS変数(--color-*)をそのまま参照し、ブランドカラーを統一している。
 * (耐震工事ナビの contractor-layout-preview.css を元に、浸水対策ナビ専用の項目を追加している)
 */
.tn-layout-preview {
  --lp-green: var(--color-primary);
  --lp-green-dark: var(--color-primary-dark);
  --lp-green-soft: var(--color-bg-tint-strong);
  --lp-ink: var(--color-text);
  --lp-muted: var(--color-text-muted);
  --lp-line: var(--color-border);
  --lp-paper: var(--color-bg-tint);
  --lp-white: #fff;
  --lp-accent: var(--color-pr);
  --lp-ok: var(--color-ok);

  background: var(--lp-paper);
  color: var(--lp-ink);
  line-height: 1.7;
}
.tn-layout-preview * { box-sizing: border-box; }
.tn-layout-preview a { color: inherit; text-decoration: none; }
.tn-layout-preview img { display: block; max-width: 100%; }
.tn-layout-preview button,
.tn-layout-preview input,
.tn-layout-preview textarea,
.tn-layout-preview select { font: inherit; }

.tn-layout-preview .lp-container { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }

/* ---------- breadcrumb ---------- */
.tn-layout-preview .lp-breadcrumb { font-size: 12px; color: #8a948f; padding: 22px 0 10px; }
.tn-layout-preview .lp-breadcrumb a:hover { text-decoration: underline; }

/* ---------- hero ---------- */
.tn-layout-preview .lp-hero { padding: 18px 0 22px; }
.tn-layout-preview .lp-hero-grid { display: grid; grid-template-columns: 1.45fr .75fr; gap: 22px; align-items: stretch; }
.tn-layout-preview .lp-hero-main {
  background: var(--lp-white);
  border: 1px solid var(--lp-line);
  border-radius: 20px;
  padding: 40px 42px;
  box-shadow: 0 8px 30px rgba(25,55,42,.05);
  position: relative;
  overflow: hidden;
}
.tn-layout-preview .lp-hero-photo {
  height: 370px;
  margin: -40px -42px 30px;
  position: relative;
  overflow: hidden;
  background: var(--lp-green-soft);
}
.tn-layout-preview .lp-hero-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* アイキャッチがロゴか写真かを判別して余白を付ける — functions.php の post_thumbnail_html
   フィルタが is-photo-thumb / is-light-logo クラスを自動付与する。
   写真は枠いっぱい(cover)、ロゴは切り抜かず余白付き(contain)で表示する。PC/SP共通。 */
.tn-layout-preview .lp-hero-photo img.wp-post-image { object-fit: contain; padding: 10%; background: #fff; }
.tn-layout-preview .lp-hero-photo img.wp-post-image.is-light-logo { background: var(--lp-green-soft); }
.tn-layout-preview .lp-hero-photo img.wp-post-image.is-photo-thumb { object-fit: cover; padding: 0; background: transparent; }
.tn-layout-preview .lp-hero-photo:has(img.is-photo-thumb):after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(24,33,29,.04), rgba(24,33,29,.16)); }
.tn-layout-preview .lp-hero-photo-fallback {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--lp-green);
}
.tn-layout-preview .lp-hero-photo-fallback svg { width: 56px; height: 56px; }
.tn-layout-preview .lp-kicker { color: var(--lp-green); font-size: 12px; font-weight: 800; letter-spacing: .12em; margin-bottom: 13px; }
.tn-layout-preview .lp-hero-main h1 {
  font-size: clamp(27px,3.2vw,43px); line-height: 1.25; letter-spacing: -.045em;
  margin: 0 0 17px; max-width: 780px; position: relative; z-index: 1;
}
.tn-layout-preview .lp-lead { font-size: 16px; color: var(--lp-muted); max-width: 720px; margin: 0 0 25px; position: relative; z-index: 1; }

/* 対応工事種別(kouji_type)タグ・サポート状況バッジ(浸水リスク診断/緊急対応) */
.tn-layout-preview .lp-hero-tags { position: relative; z-index: 1; margin-bottom: 18px; }
.tn-layout-preview .lp-hero-tags .lp-mini { font-size: 12px; color: var(--lp-muted); font-weight: 700; letter-spacing: .04em; margin-bottom: 10px; }
.tn-layout-preview .lp-support-badges { display: flex; flex-wrap: wrap; gap: 8px; position: relative; z-index: 1; margin-bottom: 18px; }
.tn-layout-preview .lp-support-badge {
  border: 1px solid var(--lp-ok); color: var(--lp-ok); background: transparent;
  padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
}

.tn-layout-preview .lp-hero-credentials { position: relative; z-index: 1; }
.tn-layout-preview .lp-hero-credentials .lp-mini { font-size: 12px; color: var(--lp-muted); font-weight: 700; letter-spacing: .04em; margin-bottom: 10px; }
.tn-layout-preview .lp-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.tn-layout-preview .lp-badge {
  border: 1px solid var(--lp-line); color: var(--lp-green-dark); background: var(--lp-green-soft);
  padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
}

.tn-layout-preview .lp-hero-side {
  background: var(--lp-green); color: #fff; border-radius: 20px; padding: 29px 28px;
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: 0 10px 30px rgba(47,127,92,.18);
}
.tn-layout-preview .lp-hero-side .lp-mini { font-size: 12px; opacity: .75; font-weight: 700; letter-spacing: .08em; }
.tn-layout-preview .lp-hero-side .lp-stat strong { display: block; font-size: 38px; line-height: 1.05; letter-spacing: -.05em; margin-top: 8px; }
.tn-layout-preview .lp-hero-side .lp-stat strong span { font-size: 18px; letter-spacing: 0; font-weight: 700; }
.tn-layout-preview .lp-hero-side .lp-stat p { font-size: 13px; opacity: .9; margin: 9px 0 0; }
.tn-layout-preview .lp-side-info { margin-top: 20px; padding-top: 17px; border-top: 1px solid rgba(255,255,255,.2); }
/* 施工実績(lp-stat)が無い会社は、対応エリアがサイドバー内の一番上に来る。
   その場合は上に何も無いのに区切り線だけ浮いてしまうので消す。 */
.tn-layout-preview .lp-side-info:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.tn-layout-preview .lp-side-info .lp-mini { margin-bottom: 8px; }
.tn-layout-preview .lp-side-info p { font-size: 13px; opacity: 1; margin: 0; line-height: 1.65; }
.tn-layout-preview .lp-side-info .lp-side-note { font-size: 11px; opacity: .7; margin: 6px 0 0; line-height: 1.6; }
.tn-layout-preview .lp-side-info .lp-side-tag {
  display: inline-block; font-size: 11px; font-weight: 700; margin-bottom: 6px;
  background: rgba(255,255,255,.16); padding: 3px 9px; border-radius: 999px;
}
.tn-layout-preview .lp-area-group-list { display: flex; flex-direction: column; gap: 10px; }
.tn-layout-preview .lp-area-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.tn-layout-preview .lp-area-group-pref {
  font-size: 12px; font-weight: 800; background: rgba(255,255,255,.16);
  padding: 3px 9px; border-radius: 999px;
}
.tn-layout-preview .lp-area-group-pref[href]:hover { background: rgba(255,255,255,.28); }
.tn-layout-preview .lp-area-badge-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tn-layout-preview .lp-area-badge {
  font-size: 11px; font-weight: 700; color: rgba(255,255,255,.92);
  background: rgba(255,255,255,.1); border: none;
  padding: 4px 8px; border-radius: 7px;
}
.tn-layout-preview .lp-area-badge[href]:hover { background: rgba(255,255,255,.2); }
.tn-layout-preview .lp-hero-side-cta {
  display: block; margin-top: 22px; background: #fff; color: var(--lp-green-dark);
  border-radius: 10px; padding: 13px 16px; text-align: center; font-size: 13px; font-weight: 800;
}
.tn-layout-preview .lp-hero-side-cta:hover { background: var(--lp-paper); }

@media (max-width: 800px) {
  .tn-layout-preview .lp-hero-grid { grid-template-columns: 1fr; }
  .tn-layout-preview .lp-hero-main { padding: 30px 25px; }
}
@media (max-width: 600px) {
  .tn-layout-preview .lp-hero-photo { height: 250px; }
}

/* ---------- section common ---------- */
.tn-layout-preview .lp-section { padding: 20px 0 20px; }
.tn-layout-preview .lp-section-head { margin-bottom: 22px; }
.tn-layout-preview .lp-eyebrow { font-size: 11px; letter-spacing: .15em; color: var(--lp-green); font-weight: 800; text-transform: uppercase; }
.tn-layout-preview .lp-section-head h2 { font-size: 27px; line-height: 1.35; letter-spacing: -.035em; margin: 5px 0 0; }
@media (max-width: 800px) { .tn-layout-preview .lp-section { padding: 22px 0 24px; } }
.tn-layout-preview section#contact-form { padding-bottom: 74px; }

/* ---------- 対応可能な浸水対策(kouji_type一覧) ---------- */
.tn-layout-preview .lp-measure-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.tn-layout-preview .lp-measure-item {
  background: var(--lp-white); border: 1px solid var(--lp-line); border-radius: 16px; padding: 20px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: 0 8px 30px rgba(25,55,42,.05);
}
.tn-layout-preview .lp-measure-icon {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; background: var(--lp-green-soft);
  color: var(--lp-green); display: flex; align-items: center; justify-content: center;
}
.tn-layout-preview .lp-measure-icon svg { width: 22px; height: 22px; }
.tn-layout-preview .lp-measure-name { font-size: 14px; font-weight: 800; margin: 0 0 4px; }
.tn-layout-preview .lp-measure-note { font-size: 12px; color: var(--lp-muted); margin: 0; line-height: 1.6; }
.tn-layout-preview .lp-measure-supplement {
  margin-top: 18px; font-size: 12px; color: var(--lp-muted); white-space: pre-line; line-height: 1.8;
}

/* ---------- 補助金・火災保険サポート ---------- */
.tn-layout-preview .lp-support-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.tn-layout-preview .lp-support-card {
  background: var(--lp-white); border: 1px solid var(--lp-line); border-radius: 16px; padding: 22px 24px;
  box-shadow: 0 8px 30px rgba(25,55,42,.05);
}
.tn-layout-preview .lp-support-card h3 { font-size: 15px; margin: 0 0 10px; }
.tn-layout-preview .lp-support-state {
  display: inline-block; font-size: 11px; font-weight: 800; color: var(--lp-green-dark);
  background: var(--lp-green-soft); padding: 4px 10px; border-radius: 999px; margin-bottom: 10px;
}
.tn-layout-preview .lp-support-card p { font-size: 13px; color: var(--lp-muted); margin: 0; line-height: 1.7; }

/* ---------- ご相談から施工後までの流れ ---------- */
.tn-layout-preview .lp-flow-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.tn-layout-preview .lp-flow-step {
  background: var(--lp-white); border: 1px solid var(--lp-line); border-radius: 16px; padding: 20px 16px;
  position: relative; box-shadow: 0 8px 30px rgba(25,55,42,.05);
}
.tn-layout-preview .lp-flow-step-num {
  display: flex; align-items: center; justify-content: center; width: 26px; height: 26px;
  border-radius: 50%; background: var(--lp-green); color: #fff; font-size: 12px; font-weight: 800; margin-bottom: 12px;
}
.tn-layout-preview .lp-flow-step strong { display: block; font-size: 13px; margin-bottom: 6px; }
.tn-layout-preview .lp-flow-step p { font-size: 12px; color: var(--lp-muted); margin: 0; line-height: 1.7; }
@media (max-width: 900px) { .tn-layout-preview .lp-flow-steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .tn-layout-preview .lp-flow-steps { grid-template-columns: 1fr; } }

/* ---------- 施工事例(ギャラリーあり = 大きいレイアウト) ---------- */
.tn-layout-preview .lp-case-list { display: flex; flex-direction: column; gap: 18px; }
.tn-layout-preview .lp-case {
  background: var(--lp-white); border: 1px solid var(--lp-line); border-radius: 20px;
  overflow: hidden; display: grid; grid-template-columns: 1.08fr 1fr; min-height: 330px;
  box-shadow: 0 8px 30px rgba(25,55,42,.05);
}
.tn-layout-preview .lp-case-visual { position: relative; min-height: 330px; background: var(--lp-green-soft); }
.tn-layout-preview .lp-case-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tn-layout-preview .lp-case-copy { padding: 37px 39px; display: flex; flex-direction: column; justify-content: center; }
.tn-layout-preview .lp-case-label { font-size: 11px; color: var(--lp-green); font-weight: 800; letter-spacing: .12em; }
.tn-layout-preview .lp-case-copy h3 { font-size: 23px; margin: 8px 0 10px; letter-spacing: -.03em; }
.tn-layout-preview .lp-case-copy p { color: var(--lp-muted); font-size: 13px; margin: 0 0 20px; white-space: pre-line; }
.tn-layout-preview .lp-case-thumbs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 22px; }
.tn-layout-preview .lp-thumb-group { border-radius: 11px; padding: 9px; }
.tn-layout-preview .lp-thumb-group b { font-size: 11px; color: #8a948f; font-weight: 700; }
.tn-layout-preview .lp-thumb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 7px; }
.tn-layout-preview .lp-thumb {
  aspect-ratio: 1.25; border-radius: 5px; overflow: hidden; position: relative;
  background: var(--lp-line); cursor: pointer; display: block;
}
.tn-layout-preview .lp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tn-layout-preview .lp-thumb.lp-thumb-more:after {
  content: attr(data-more); position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(24,33,29,.5); color: #fff; font-size: 12px; font-weight: 800;
}
.tn-layout-preview .lp-outline {
  display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--lp-line);
  color: var(--lp-green-dark); border-radius: 9px; padding: 10px 14px; font-size: 12px; font-weight: 800;
  width: max-content;
}
@media (max-width: 800px) {
  .tn-layout-preview .lp-case { grid-template-columns: 1fr; }
  .tn-layout-preview .lp-case-visual { min-height: 220px; }
}
@media (max-width: 480px) {
  .tn-layout-preview .lp-case-thumbs { grid-template-columns: 1fr; }
  .tn-layout-preview .lp-thumb-group { background: var(--lp-paper); }
}

/* ---------- 施工事例(写真1枚) ---------- */
.tn-layout-preview .lp-project-grid { margin-top: 22px; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.tn-layout-preview .lp-project-card {
  background: var(--lp-white); border: 1px solid var(--lp-line); border-radius: 16px; overflow: hidden;
  box-shadow: 0 8px 24px rgba(25,55,42,.04);
}
.tn-layout-preview .lp-project-card img { width: 100%; aspect-ratio: 1.6; object-fit: cover; }
.tn-layout-preview .lp-project-card-body { padding: 17px 19px 19px; }
.tn-layout-preview .lp-project-card-body h3 { font-size: 15px; margin: 0 0 7px; letter-spacing: -.02em; }
.tn-layout-preview .lp-project-card-body p { font-size: 12px; color: var(--lp-muted); margin: 0; line-height: 1.65; white-space: pre-line; }
@media (max-width: 800px) { .tn-layout-preview .lp-project-grid { grid-template-columns: 1fr; } }

/* ---------- 保証・アフター対応 ---------- */
.tn-layout-preview .lp-warranty-box {
  display: flex; gap: 16px; align-items: flex-start; background: var(--lp-white);
  border: 1px solid var(--lp-line); border-radius: 16px; padding: 25px 27px;
  box-shadow: 0 8px 30px rgba(25,55,42,.05);
}
.tn-layout-preview .lp-warranty-icon {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; background: var(--lp-green-soft);
  color: var(--lp-green); display: flex; align-items: center; justify-content: center;
}
.tn-layout-preview .lp-warranty-icon svg { width: 22px; height: 22px; }
.tn-layout-preview .lp-warranty-box p { margin: 0; font-size: 13px; color: var(--lp-ink); white-space: pre-line; line-height: 1.8; }

/* ---------- スタッフ紹介 ---------- */
.tn-layout-preview .lp-staff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.tn-layout-preview .lp-staff-card {
  background: var(--lp-white); border: 1px solid var(--lp-line); border-radius: 16px; padding: 22px 20px; text-align: center;
  box-shadow: 0 8px 30px rgba(25,55,42,.05);
}
.tn-layout-preview .lp-staff-photo {
  width: 76px; height: 76px; margin: 0 auto 14px; border-radius: 50%; overflow: hidden;
  background: var(--lp-green-soft); color: var(--lp-green); display: flex; align-items: center; justify-content: center;
}
.tn-layout-preview .lp-staff-photo img { width: 100%; height: 100%; object-fit: cover; }
.tn-layout-preview .lp-staff-photo svg { width: 34px; height: 34px; }
.tn-layout-preview .lp-staff-name { font-size: 14px; font-weight: 800; margin: 0 0 3px; }
.tn-layout-preview .lp-staff-role { font-size: 11px; color: var(--lp-green); font-weight: 700; margin: 0 0 10px; }
.tn-layout-preview .lp-staff-comment { font-size: 12px; color: var(--lp-muted); margin: 0; line-height: 1.7; }

/* ---------- 代表者紹介 ---------- */
.tn-layout-preview .lp-rep-profile { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.tn-layout-preview .lp-rep-photo {
  width: 64px; height: 64px; border-radius: 50%; overflow: hidden; flex: 0 0 auto;
  background: var(--lp-green-soft); color: var(--lp-green); display: flex; align-items: center; justify-content: center;
}
.tn-layout-preview .lp-rep-photo img { width: 100%; height: 100%; object-fit: cover; }
.tn-layout-preview .lp-rep-photo svg { width: 30px; height: 30px; }
.tn-layout-preview .lp-rep-name { font-size: 16px; font-weight: 800; margin: 0; }
.tn-layout-preview .lp-rep-title { font-size: 12px; color: var(--lp-muted); margin: 2px 0 0; }
.tn-layout-preview .lp-video-embed { position: relative; padding-top: 56.25%; border-radius: 16px; overflow: hidden; background: #000; }
.tn-layout-preview .lp-video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Googleクチコミ ---------- */
.tn-layout-preview .lp-review-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.tn-layout-preview .lp-review-card {
  background: var(--lp-white); border: 1px solid var(--lp-line); border-radius: 16px; padding: 20px 22px;
  box-shadow: 0 8px 30px rgba(25,55,42,.05);
}
.tn-layout-preview .lp-review-stars { margin-bottom: 10px; }
.tn-layout-preview .lp-star { color: var(--lp-line); font-size: 15px; }
.tn-layout-preview .lp-star.is-filled { color: var(--lp-accent); }
.tn-layout-preview .lp-review-comment { font-size: 13px; color: var(--lp-ink); margin: 0 0 12px; line-height: 1.8; }
.tn-layout-preview .lp-review-meta { font-size: 11px; color: var(--lp-muted); margin: 0; }

/* ---------- FAQ ---------- */
.tn-layout-preview .lp-faq { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 12px; }
.tn-layout-preview .lp-faq details {
  background: var(--lp-white); border: 1px solid var(--lp-line); border-radius: 13px; padding: 17px 19px;
  box-shadow: 0 8px 30px rgba(25,55,42,.05);
}
.tn-layout-preview .lp-faq summary {
  cursor: pointer; font-size: 13px; font-weight: 800; list-style: none;
  display: flex; justify-content: space-between; gap: 15px;
}
.tn-layout-preview .lp-faq summary::-webkit-details-marker { display: none; }
.tn-layout-preview .lp-faq summary:after { content: "＋"; color: var(--lp-green); font-size: 17px; line-height: 1; }
.tn-layout-preview .lp-faq details[open] summary:after { content: "－"; }
.tn-layout-preview .lp-faq details p {
  font-size: 12px; color: var(--lp-muted); margin: 12px 0 2px; padding-top: 11px;
  border-top: 1px solid var(--lp-line); white-space: pre-line; line-height: 1.8;
}
@media (max-width: 800px) { .tn-layout-preview .lp-faq { grid-template-columns: 1fr; } }

/* ---------- お問い合わせ(このページ専用。CF7の見た目はここでのみ上書きする) ---------- */
.tn-layout-preview .lp-contact {
  background: var(--lp-green-dark); color: #fff; border-radius: 22px; padding: 42px;
  display: grid; grid-template-columns: .82fr 1.18fr; gap: 38px;
  box-shadow: 0 14px 35px rgba(23,58,43,.18);
}
.tn-layout-preview .lp-contact-intro h2 { color: #fff; margin: 5px 0 0; font-size: 27px; letter-spacing: -.035em; }
.tn-layout-preview .lp-contact-intro p { color: #c4d4cc; font-size: 13px; }
.tn-layout-preview .lp-contact-badge {
  display: flex; align-items: center; gap: 10px; margin: 20px 0; padding: 12px;
  background: rgba(255,255,255,.08); border-radius: 12px;
}
.tn-layout-preview .lp-contact-badge-photo {
  width: 40px; height: 40px; border-radius: 8px; overflow: hidden; flex: 0 0 auto;
  background: rgba(255,255,255,.15); display: flex; align-items: center; justify-content: center;
}
.tn-layout-preview .lp-contact-badge-photo img { width: 100%; height: 100%; object-fit: cover; }
.tn-layout-preview .lp-contact-badge-photo svg { width: 20px; height: 20px; color: #fff; }
.tn-layout-preview .lp-contact-badge-name { font-size: 13px; font-weight: 800; }
.tn-layout-preview .lp-contact-checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tn-layout-preview .lp-contact-checklist li { position: relative; padding-left: 20px; font-size: 12px; color: rgba(255,255,255,.9); }
.tn-layout-preview .lp-contact-checklist li:before { content: "✓"; position: absolute; left: 0; color: #fff; font-weight: 700; }
.tn-layout-preview .lp-contact-note { font-size: 11px; color: #9fb8ab; margin-top: 20px; }

.tn-layout-preview .lp-contact-form { background: #fff; color: var(--lp-ink); border-radius: 15px; padding: 24px; }

/* CF7フォーム自体の見た目は .tn-form-grid 等の既存クラスを使っているため、
   このページに限りここで上書きする。他ページの同フォームには影響しない(祖先を .tn-layout-preview に限定)。*/
.tn-layout-preview .tn-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 0; }
.tn-layout-preview .tn-form-field { margin-bottom: 0; }
.tn-layout-preview .tn-form-field label { font-size: 11px; font-weight: 800; margin-bottom: 5px; }
.tn-layout-preview .tn-required { font-size: 10px; color: var(--lp-green); font-weight: 700; }
.tn-layout-preview .tn-input,
.tn-layout-preview .tn-textarea,
.tn-layout-preview .tn-select {
  width: 100%; border: 1px solid var(--lp-line); border-radius: 8px; padding: 10px 11px;
  background: var(--lp-paper); outline: none; font-size: 13px;
}
.tn-layout-preview .tn-textarea { min-height: 90px; resize: vertical; }
.tn-layout-preview .tn-input:focus,
.tn-layout-preview .tn-textarea:focus,
.tn-layout-preview .tn-select:focus { border-color: var(--lp-green); background: #fff; }
.tn-layout-preview .tn-radio-group { display: flex; flex-wrap: wrap; gap: 8px; }
/* CF7は実際には .tn-radio-group > .wpcf7-form-control-wrap > .wpcf7-radio(.tn-radio) の中に
   .wpcf7-list-item が並ぶ構造になっており、外側の .tn-radio-group に display:flex を付けても
   選択肢そのものには効かない。実際に選択肢が並ぶ .wpcf7-radio 自体をflexコンテナにする。 */
.tn-layout-preview .tn-radio-group .wpcf7-form-control-wrap { display: block; width: 100%; }
.tn-layout-preview .tn-radio-group .wpcf7-radio {
  display: flex; flex-wrap: wrap; gap: 8px; width: 100%;
}
.tn-layout-preview .tn-radio-group .wpcf7-list-item {
  margin: 0; border: 1px solid var(--lp-line); border-radius: 999px; padding: 7px 12px; background: var(--lp-paper);
}
.tn-layout-preview .tn-radio-group .wpcf7-list-item:has(input:checked) { border-color: var(--lp-green); background: var(--lp-green-soft); }
.tn-layout-preview .tn-radio-group label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; margin: 0; }
.tn-layout-preview .tn-radio-group .wpcf7-list-item-label { font-size: 12px; color: var(--lp-muted); }
.tn-layout-preview .tn-radio-group .wpcf7-list-item:has(input:checked) .wpcf7-list-item-label { color: var(--lp-green-dark); font-weight: 700; }
.tn-layout-preview .tn-consent-field { font-size: 11px; color: var(--lp-muted); }
.tn-layout-preview .tn-consent-field label { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; }
.tn-layout-preview .tn-consent-field a { color: var(--lp-green); text-decoration: underline; }
.tn-layout-preview .tn-form-grid input[type="submit"],
.tn-layout-preview .tn-submit-btn {
  width: 100%; border: 0; background: var(--lp-green); color: #fff; border-radius: 9px;
  padding: 13px; font-weight: 800; cursor: pointer; font-size: 14px;
}
.tn-layout-preview .tn-form-grid input[type="submit"]:hover,
.tn-layout-preview .tn-submit-btn:hover { background: var(--lp-green-dark); }
.tn-layout-preview .wpcf7-not-valid-tip { font-size: 11px; margin-top: 4px; }
.tn-layout-preview .wpcf7-response-output { border-radius: 8px; font-size: 12px; margin: 14px 0 0; }

@media (max-width: 800px) {
  .tn-layout-preview .lp-contact { grid-template-columns: 1fr; padding: 28px 22px; }
  .tn-layout-preview .tn-form-grid { grid-template-columns: 1fr; }
}

/* ---------- 施工事例ライトボックス(既存デザインと同じ挙動を再利用) ---------- */
.tn-layout-preview .lp-lightbox {
  position: fixed; inset: 0; z-index: 9999; background: rgba(12,18,15,.92);
  display: flex; align-items: center; justify-content: center; padding: 40px;
}
.tn-layout-preview .lp-lightbox[hidden] { display: none; }
.tn-layout-preview .lp-lightbox-stage { max-width: 90vw; max-height: 80vh; text-align: center; }
.tn-layout-preview .lp-lightbox-img { max-width: 90vw; max-height: 80vh; object-fit: contain; border-radius: 6px; }
.tn-layout-preview .lp-lightbox-cap { color: #fff; font-size: 12px; margin-top: 10px; }
.tn-layout-preview .lp-lightbox-btn {
  position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: 50%;
  width: 44px; height: 44px; font-size: 22px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.tn-layout-preview .lp-lightbox-btn:hover { background: rgba(255,255,255,.24); }
.tn-layout-preview .lp-lightbox-close { top: 20px; right: 20px; }
.tn-layout-preview .lp-lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.tn-layout-preview .lp-lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }
