/* ===================================================================
   排水ドレインセンサー LP  —  styles
   Design tokens mapped from Figma (node 1:2)
   =================================================================== */
:root {
  --blue: #2e4b9b;
  --blue-light-bg: #f1f9ff;
  --blue-table: #d4ecff;
  --green: #2e9b32;
  --red: #ee1d20;
  --yellow: #ffc30d;
  --border: #ddd;
  --black: #000;
  --white: #fff;

  --font: "Noto Serif JP", serif;
  --content-max: 1600px;
  --header-h: 118px; /* sticky header height (SP は 60px に上書き) */
}

/* ---------- reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

/* アンカー遷移時に固定ヘッダーへ潜り込まないよう、対象を頭出し */
section[id] { scroll-margin-top: var(--header-h); }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--black);
  background: var(--white);
  line-height: 1.6;
  letter-spacing: 0.1em;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul { margin: 0; }
ul { list-style: none; padding: 0; }

.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 40px;
}

/* ---------- helpers ---------- */
.nw { white-space: nowrap; } /* 中黒・記号などの意図しない改行を止める */
.txt-blue  { color: var(--blue); }
.txt-green { color: var(--green); }
.txt-red   { color: var(--red); }

/* ---------- section title ---------- */
.section-title {
  font-weight: 700;
  font-size: clamp(30px, 3.4vw, 50px);
  text-align: center;
  letter-spacing: 0.1em;
  line-height: 1.4;
}

.section-title--underline {
  position: relative;
  display: block;
  color: var(--blue);
  padding-bottom: 18px;
}
.section-title--underline::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(1178px, 90%);
  height: 10px;
  background: var(--yellow);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 400;
  letter-spacing: 0.1em;
  cursor: pointer;
  border: none;
  transition: opacity 0.2s ease;
}
.btn:hover { opacity: 0.85; }

.btn--pill {
  background: var(--blue);
  color: var(--white);
  font-size: 22px;
  padding: 18px 80px;
  border-radius: 120px;
}
.btn--pill-white {
  background: var(--white);
  color: var(--blue);
  font-weight: 700;
  font-size: 18px;
  padding: 17px 60px;
  border-radius: 120px;
}
.btn--pill-sm {
  background: var(--blue);
  color: var(--white);
  font-size: 15px;
  padding: 8px 30px;
  border-radius: 15px;
}

/* ===================================================================
   Header
   =================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 118px;
  gap: 24px;
}
.header__logo img { width: 197px; }
.header__nav {
  display: flex;
  align-items: center;
  gap: 40px;
  font-size: 15px;
}
.header__nav a:not(.btn):hover { color: var(--blue); }

/* SP hamburger button (hidden on desktop) */
.header__burger { display: none; }

/* ===================================================================
   Hero
   =================================================================== */
.hero { padding: 60px 0 90px; }
.hero__inner {
  display: flex;
  align-items: center;
  gap: 40px;
}
.hero__copy {
  flex: 1 1 45%;
  min-width: 0;
  /* 見出し・本文のフォントを「列幅」に合わせて1行に収めるためコンテナ化 */
  container-type: inline-size;
  /* 文節境界(<wbr>)でのみ改行し、和文が変な位置で折り返さないようにする */
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.hero__media { flex: 1 1 55%; }
.hero__media img { width: 100%; border-radius: 4px; }

.hero__eyebrow {
  font-weight: 700;
  /* 列幅に合わせて1行で収める（cqi = 列幅の1%） */
  font-size: clamp(15px, 4.5cqi, 30px);
  line-height: 1.5;
  white-space: nowrap;
}
.hero__headline {
  /* --- 見出しを「列幅に対する比率」で拡縮するためのツマミ --------------------
     「漏水、させません。」の字幅は
       全角8字 × (1em + letter-spacing 0.1em) + 読点 (1em + --comma-space)
       = 8.8em + 0.65em ≒ 9.45em
     だから 1 行に収まる上限は 100cqi / 9.45 ≒ 10.5cqi。
     --headline-fit を 10cqi（約5%の余白）にしてあるので、
     文言や列幅を変えたときはこの値だけを調整すればよい。 */
  --headline-fit: 10cqi;  /* 列幅に対する文字サイズ比（大きくするほど拡大） */
  --headline-min: 30px;   /* これより小さくはならない */
  --headline-max: 62px;   /* Figma 指定のデザインサイズ */
  --comma-space: -0.35em; /* 読点後のアキを詰める量 */

  font-weight: 700;
  /* vw（ビューポート幅）だと hero__copy の列幅とズレ、
     1250px 付近で見出しが列幅を超えて画像にかぶさっていた。
     eyebrow と同じく cqi（列幅の1%）基準にして常に1行で収める。 */
  font-size: clamp(var(--headline-min), var(--headline-fit), var(--headline-max));
  line-height: 1.1;
  letter-spacing: 0.1em;
  margin: 24px 0;
  white-space: nowrap; /* 「漏水、させません。」は改行させない */
}
.hero__comma { letter-spacing: var(--comma-space); }
.hero__lead {
  font-weight: 700;
  /* 「〜検知し、」で改行する2行構成。2行目が収まる読みやすいサイズ */
  font-size: clamp(16px, 1.55vw, 21px);
  line-height: 1.7;
  letter-spacing: 0.04em;
  margin-bottom: 40px;
  /* 親の keep-all を打ち消し、狭い幅では2行目を折り返して溢れを防ぐ */
  word-break: normal;
}

/* ===================================================================
   Problem intro + reasons
   =================================================================== */
.problem { padding: 60px 0; }

.reason {
  display: flex;
  align-items: center;
  gap: 60px;
  margin-top: 80px;
}
.reason__media { flex: 0 1 660px; }
.reason__body { flex: 1 1 auto; }

.lead-blue {
  font-weight: 700;
  color: var(--blue);
  font-size: clamp(26px, 2.3vw, 32px);
  margin-bottom: 28px;
}
.check-list { display: flex; flex-direction: column; gap: 24px; }
.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  font-weight: 700;
  font-size: clamp(20px, 1.7vw, 28px);
  line-height: 1.5;
}
.check-list__icon { width: 31px; height: 30px; flex-shrink: 0; margin-top: 6px; }

/* ===================================================================
   Pain cards
   =================================================================== */
.pains { padding: 80px 0; }

.card-grid {
  display: grid;
  gap: 30px;
  margin-top: 60px;
}
.card-grid--3 { grid-template-columns: repeat(3, 1fr); }

.pain-card {
  border: 4px solid var(--blue);
  background: var(--white);
  padding: 32px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  /* 本文サイズを「カード幅」に合わせて拡縮するためコンテナ化
     （vw 基準だと 3列/2列/1列で1行の字数が変わり、改行位置が崩れていた） */
  container-type: inline-size;
}
.pain-card__icon { width: 53px; height: 53px; }
.pain-card__title {
  font-weight: 700;
  color: var(--blue);
  /* 本文と同じくカード幅基準。1行に収まる上限で頭打ちにする */
  font-size: clamp(22px, 6.4cqi, 30px);
  line-height: 1.4;
}
.pain-card__text {
  /* --- 本文を「カード幅に対する比率」で拡縮するためのツマミ ------------------
     和文1字の占有幅 = 1em + letter-spacing 0.1em = 1.1em。
     1行に N 字入れたいなら  --pain-fit = 100cqi / (N × 1.1)。
       N = 21字 → 4.3cqi（現在値。3枚とも2行で収まる最小の字数）
       N = 18字 → 5.0cqi（文字は大きくなるが2枚目が3行になる）
     文言を変えたときはこの値だけを調整すればよい。 */
  --pain-fit: 4.3cqi;  /* カード幅に対する文字サイズ比（大きくするほど拡大） */
  --pain-min: 18px;    /* これより小さくはならない（元の指定値） */
  --pain-max: 23px;    /* Figma 指定のデザインサイズ */

  font-weight: 700;
  font-size: clamp(var(--pain-min), var(--pain-fit), var(--pain-max));
  line-height: 1.7;
  /* 文節境界(<wbr>)でのみ改行し、和文が変な位置で折り返さないようにする。
     overflow-wrap は幅が足りないときだけ効く保険（hero__copy と同じ方針）。 */
  word-break: keep-all;
  overflow-wrap: anywhere;
}

/* ===================================================================
   Video block
   =================================================================== */
.video-block { padding: 60px 0; }
.video-block__title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}
.badge {
  background: var(--blue);
  color: var(--white);
  font-size: clamp(24px, 2.4vw, 36px);
  font-weight: 700;
  padding: 8px 24px;
  line-height: 1;
}
/* 2 本並び。1 本しか置かない場合も 806px を上限に中央寄せのまま見える */
.video-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
  max-width: 1100px;
  margin: 50px auto 0;
}
.video-thumb {
  position: relative;
  display: block;
  width: 100%;
  max-width: 806px;
  margin: 0 auto;
  padding: 0;
  border: 1px solid var(--border);
  background: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.video-thumb__poster { width: 100%; }
.video-thumb__play {
  position: absolute;
  /* サムネイル画像は 上:見出し(41-54%) 下:ロゴ(82-92%) のため、
     間の余白帯(54-82%)の中央に置いて文字と重ねない */
  top: 68%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: block;
  height: 18%;   /* サムネの高さ基準。画像が小さくなっても余白帯からはみ出さない */
  width: auto;
  aspect-ratio: 1 / 1;
  pointer-events: none; /* クリックはボタン本体で受ける */
}
.video-thumb__play img { width: 100%; height: 100%; }
.video-thumb:hover .video-thumb__play { opacity: 0.85; }
.video-thumb:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }

/* ---------- video modal ---------- */
body.is-modal-open { overflow: hidden; }

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.video-modal[hidden] { display: none; }
.video-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
}
.video-modal__dialog {
  position: relative;
  width: min(1100px, 100%);
  outline: none;
}
.video-modal__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}
.video-modal__player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.video-modal__player[hidden] { display: none; }
.video-modal__close {
  position: absolute;
  top: -48px;
  right: 0;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: none;
  color: var(--white);
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
}
.video-modal__close:hover { opacity: 0.7; }

/* ===================================================================
   Solution
   =================================================================== */
.solution {
  background: var(--blue-light-bg);
  padding: 100px 0;
}
.solution__top {
  display: flex;
  align-items: center;
  gap: 60px;
  margin-top: 80px;
}
.solution__media { flex: 0 1 660px; }
.solution__body { flex: 1 1 auto; display: flex; flex-direction: column; gap: 40px; }

.labeled-block__label {
  position: relative;
  font-weight: 700;
  color: var(--blue);
  font-size: clamp(26px, 2.3vw, 32px);
  padding-bottom: 16px;
  margin-bottom: 20px;
}
.labeled-block__label::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 80px;
  height: 4px;
  background: var(--blue);
}
.labeled-block__text {
  font-weight: 700;
  font-size: clamp(20px, 1.6vw, 26px);
  line-height: 1.55;
}
.solution__figure {
  max-width: 660px;
  margin: 60px auto 0;
}

/* ===================================================================
   Functions
   =================================================================== */
.functions { padding: 100px 0; }
.functions__desc {
  font-weight: 700;
  font-size: clamp(20px, 1.6vw, 26px);
  line-height: 1.7;
  text-align: center;
  margin: 40px auto 0;
  max-width: 1200px;
}
.functions__images {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 60px;
  flex-wrap: wrap;
  margin: 60px 0;
}
.functions__images img { max-height: 475px; width: auto; }

.spec-card {
  border: 4px solid var(--blue);
  background: var(--white);
  padding: 28px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}
.spec-card__title {
  font-weight: 700;
  font-size: clamp(20px, 1.7vw, 23px);
}
.spec-card__value {
  font-weight: 700;
  color: var(--blue);
  font-size: clamp(24px, 2vw, 30px);
}

/* ===================================================================
   Spec table
   =================================================================== */
.spec {
  background: var(--blue-light-bg);
  padding: 100px 0;
}
.spec__title { margin-bottom: 60px; }
.spec-table {
  width: 100%;
  max-width: 1210px;
  margin: 0 auto;
  border-collapse: collapse;
  background: var(--white);
  font-size: clamp(15px, 1.2vw, 16px);
}
.spec-table th,
.spec-table td {
  border: 1px solid var(--white);
  padding: 16px;
  text-align: left;
  vertical-align: middle;
  line-height: 1.4;
}
.spec-table th {
  background: var(--blue-table);
  font-weight: 400;
  width: 38%;
  white-space: nowrap;
}
.spec-table td {
  border: 1px solid var(--blue-table);
  font-weight: 400;
}

/* ===================================================================
   Drain-up CTA (blue)
   =================================================================== */
.drainup {
  background: var(--blue);
  color: var(--white);
  padding: 100px 0;
}
.drainup__headline {
  font-weight: 700;
  font-size: clamp(26px, 2.6vw, 34px);
  text-align: center;
  line-height: 1.4;
}
.drainup__inner {
  display: flex;
  align-items: center;
  gap: 70px;
  margin-top: 70px;
}
.drainup__media { flex: 0 1 520px; }
.drainup__body { flex: 1 1 auto; }
.drainup__subtitle {
  font-weight: 700;
  font-size: clamp(22px, 2vw, 26px);
  margin-bottom: 24px;
}
.drainup__text {
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 2.1;
  margin-bottom: 36px;
}

/* ===================================================================
   Contact form
   =================================================================== */
.contact { padding: 100px 0; }
.contact__lead {
  text-align: center;
  font-size: clamp(16px, 1.3vw, 20px);
  margin: 30px 0 60px;
}

.form {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
.form__field { display: flex; flex-direction: column; gap: 12px; }
.form__label {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 20px;
}
.req {
  background: var(--blue);
  color: var(--white);
  font-size: 16px;
  letter-spacing: 0.1em;
  padding: 7px 10px;
  line-height: 1;
}
.form input,
.form textarea {
  font-family: var(--font);
  font-size: 16px;
  border: 1px solid var(--border);
  background: var(--white);
  padding: 15px;
  width: 100%;
}
.form input { height: 55px; }
.form textarea { min-height: 153px; resize: vertical; }
.form input:focus,
.form textarea:focus {
  outline: 2px solid var(--blue);
  outline-offset: -1px;
}

.form__consent {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 20px;
  cursor: pointer;
}
.form__consent input {
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  accent-color: var(--blue);
  flex-shrink: 0;
}
.form__privacy {
  text-align: center;
  font-size: 20px;
}
.form__privacy a {
  color: var(--blue);
  text-decoration: underline;
}
.form__submit { text-align: center; margin-top: 12px; }
.form__submit .btn { font-weight: 700; font-size: 18px; padding: 17px 60px; }

/* ===================================================================
   Footer
   =================================================================== */
/* page top bar — spec mirrored from drain-up.com (.pagetop) */
.pagetop {
  position: sticky;
  bottom: 0;
  z-index: 10;
  cursor: pointer;
  font-size: 1rem;
  text-align: center;
  padding: 10px;
  border-top: 1px solid var(--border);
  background-color: var(--white);
  visibility: hidden;
  opacity: 0;
  transition: all 0.5s;
}
.pagetop span {
  background-image: url("../assets/ic_pagetop.png");
  background-repeat: no-repeat;
  background-position: left center;
  background-size: auto 100%;
  padding-left: 35px;
}
.pagetop.is-show {
  visibility: visible;
  opacity: 1;
}

.footer-main { background: var(--white); padding: 40px 0; }
.footer-main__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.footer__logo img { width: 197px; }
.footer__links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
}
.footer__nav {
  display: flex;
  gap: 40px;
  font-size: 15px;
  flex-wrap: wrap;
}
.footer__nav a:hover { color: var(--blue); }
.footer__copy {
  font-size: 10px;
  letter-spacing: 0.1em;
}

/* ===================================================================
   Responsive
   =================================================================== */
@media (max-width: 1024px) {
  .container { padding: 0 24px; }

  /* タブレット帯では hero も縦積みにし、本文は読みやすく折り返す */
  .hero__inner { flex-direction: column; }
  .hero__copy { width: 100%; }
  .hero__eyebrow,
  .hero__lead { white-space: normal; }
  .hero__eyebrow { font-size: 26px; }
  .hero__lead { font-size: 18px; letter-spacing: 0.04em; }

  .reason,
  .solution__top,
  .drainup__inner { flex-direction: column; gap: 40px; }

  .reason__media,
  .solution__media,
  .drainup__media { flex-basis: auto; width: 100%; max-width: 660px; }

  .reason__body,
  .solution__body,
  .drainup__body { width: 100%; }

  .card-grid--3 { grid-template-columns: 1fr 1fr; }
}

/* ヘッダーだけは 820px でバーガーメニューへ切り替える
   （ナビ項目が増えてロゴと詰まるのが 820px 付近のため。
     JS 側の閉じ判定 index.html の window.innerWidth > 820 と対で管理する） */
@media (max-width: 820px) {
  /* --- SP header + hamburger drawer (spec ref: drain-up.com) --- */
  :root { --header-h: 60px; } /* SP はヘッダーが低いのでアンカー頭出しも調整 */
  .header__inner { min-height: 60px; padding-top: 0; padding-bottom: 0; gap: 12px; }
  .header__logo img { width: 150px; }

  .header__burger {
    display: flex;
    position: relative;
    width: 44px;
    height: 44px;
    margin-right: -8px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 60;
  }
  .header__burger span {
    position: absolute;
    left: 9px;
    right: 9px;
    height: 2px;
    background: var(--blue);
    transition: transform 0.35s, opacity 0.35s;
  }
  .header__burger span:nth-child(1) { top: 15px; }
  .header__burger span:nth-child(2) { top: 21px; }
  .header__burger span:nth-child(3) { top: 27px; }
  .header__burger.is-active span:nth-child(1) { transform: translateY(6px) rotate(-45deg); }
  .header__burger.is-active span:nth-child(2) { opacity: 0; }
  .header__burger.is-active span:nth-child(3) { transform: translateY(-6px) rotate(45deg); }

  /* nav becomes a full-screen drawer under the header */
  .header__nav {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    height: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--white);
    overflow-y: auto;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s, height 0.3s;
    font-size: 16px;
  }
  .header__nav.is-active {
    height: calc(100vh - 60px);
    visibility: visible;
    opacity: 1;
  }
  .header__nav a:not(.btn) {
    position: relative;
    display: block;
    padding: 1em 1.5em;
    background: #eaedf5;
    border-bottom: 1px solid var(--white);
  }
  .header__nav a:not(.btn)::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 24px;
    width: 9px;
    height: 9px;
    border-top: 1px solid #333;
    border-right: 1px solid #333;
    transform: translateY(-50%) rotate(45deg);
  }
  .header__nav .btn--pill-sm {
    align-self: center;
    margin: 28px auto;
    font-size: 16px;
    padding: 12px 56px;
    border-radius: 2em;
  }

  /* prevent background scroll while drawer is open */
  body.is-fixed { overflow: hidden; }
}

@media (max-width: 768px) {
  body { letter-spacing: 0.04em; }

  .pagetop { font-size: 0.75rem; }
  .pagetop span { padding-left: 27px; }

  .hero { padding: 32px 0 60px; }
  .hero__inner { flex-direction: column; }
  .hero__copy { min-width: 0; }
  /* 縦積み時は列幅いっぱいで小さくなりすぎるため、固定サイズで文節折り返しに戻す */
  .hero__eyebrow,
  .hero__lead { white-space: normal; }
  .hero__eyebrow { font-size: 22px; }
  .hero__lead { font-size: 17px; letter-spacing: 0.04em; }

  .card-grid--3 { grid-template-columns: 1fr; }

  .video-list { grid-template-columns: 1fr; gap: 30px; margin-top: 30px; }
  .video-modal { padding: 20px 16px; }

  .functions__images { gap: 30px; }

  .form__row { grid-template-columns: 1fr; gap: 24px; }

  .footer-main__inner { flex-direction: column; align-items: center; text-align: center; }
  .footer__links { align-items: center; }
  .footer__nav { justify-content: center; gap: 20px; }

  .pains,
  .solution,
  .functions,
  .spec,
  .drainup,
  .contact { padding: 60px 0; }
}

/* ===================================================================
   MW WP Form 対応（WP 組み込み時のみ効く。静的プレビューでは無害）
   フォーム本体のマークアップは wp/mw-wp-form-body.html を
   MW WP Form の「フォームタグ」欄に貼り付けて使う。
   =================================================================== */

/* MW が出力する送信ボタンは class を付けられないので .btn .btn--pill 相当を再現 */
.form__submit input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s ease;
  font-family: var(--font);
  background: var(--blue);
  color: var(--white);
  border-radius: 120px;
  font-weight: 700;
  font-size: 18px;
  padding: 17px 60px;
  letter-spacing: 0.1em;
}
.form__submit input[type="submit"]:hover { opacity: 0.85; }

/* 同意チェックボックス（MW は label > input + span を吐く） */
.form__consent .mwform-checkbox-field label {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  margin: 0;
}
.form__consent .mwform-checkbox-field-text { font-size: 20px; }

/* バリデーションエラー表示 */
.form .error {
  display: block;
  margin-top: 6px;
  color: var(--red);
  font-size: 14px;
  letter-spacing: 0.05em;
}


/* wpautop が label の直後に入れる <br> を無効化（確認画面で空行になるため） */
.form__field > label + br { display: none; }

/* ボタン：.form input の width:100% / height を打ち消し、戻る・送信を横に並べる */
.form__submit {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}
.form__submit input[type="submit"] {
  width: auto;
  min-width: 260px;
  height: auto;
}
.form__submit input[name="submitBack"] {
  background: var(--white);
  color: var(--blue);
  box-shadow: inset 0 0 0 1px var(--blue);
}
.form__submit .error { flex-basis: 100%; text-align: center; }

/* ===================================================================
   確認画面・完了画面（page-sensor-sub.php）
   =================================================================== */
.contact--sub { min-height: 60vh; }
.contact__body > p {
  text-align: center;
  font-size: clamp(16px, 1.3vw, 20px);
  margin: 30px 0 60px;
}
.contact__body > .contact__back { margin: 60px 0 0; }
.contact__body > p:empty { display: none; } /* wpautop の空段落 */

/* 確認画面：MW は入力欄の代わりに入力値をテキストで出す */
.mw_wp_form_confirm .req,
.mw_wp_form_confirm .form__privacy { display: none; }
.mw_wp_form_confirm .form__field {
  display: block;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  font-size: 18px;
  overflow-wrap: anywhere;
}
.mw_wp_form_confirm .form__label {
  margin-bottom: 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--blue);
}
.mw_wp_form_confirm .form__consent { cursor: default; }
.mw_wp_form_confirm .form__consent::before { content: "個人情報の取り扱い："; }

@media (max-width: 768px) {
  .form__submit input[type="submit"] { width: 100%; min-width: 0; }
  /* SP では「送信する」を上、「戻る」を下に */
  .mw_wp_form_confirm .form__submit { flex-direction: column-reverse; }
}
