<style>
/* --- ページ共通（既存維持） --- */
.page .entry-content,
.page .post-content,
.page .mw_wp_form,
.page-content,
#content,
#primary {
  margin-left: auto;
  margin-right: auto;
  max-width: 1080px;
  text-align: center;
}

/* --- 上部（既存維持） --- */
#dl-form-title,
.notice {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
#dl-form-title {
  position: relative;
  font-weight: 800;
  font-size: clamp(26px, 3.2vw, 36px);
  line-height: 1.35;
  margin: 36px 0 8px;
  display: block;
}
#dl-form-title::before {
  content: "CONTACT";
  display: block;
  margin: 0 auto 10px;
  padding: 6px 18px 5px;
  background: #f3981d;
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .08em;
  border-radius: 999px;
  width: fit-content;
}
.notice {
  color: #555;
  line-height: 1.9;
  margin: 14px auto;
  max-width: 880px;
}
.notice + .notice { margin-top: 10px; }
.notice.tel {
  margin: 6px auto;
  text-align: center;
}
.notice.tel .tel-badge {
  display: inline-block;
  background: #f3981d;
  color: #fff;
  font-weight: 800;
  padding: 5px 14px 4px;
  border-radius: 6px;
  letter-spacing: .08em;
  margin-right: 14px;
}

/* 電話番号の見た目＋浮き出し演出 */
.notice.tel .tel-num,
.notice.tel .tel-num a {
  display: inline-block;
  font-weight: 800;
  color: #0fa59b;
  font-size: clamp(30px, 2.4vw, 22px);
  letter-spacing: .03em;
  text-decoration: underline;        /* 下線 */
  text-underline-offset: 4px;        /* 下線の間隔 */
  transition: transform .18s ease,
              text-shadow .18s ease,
              color .18s ease,
              text-decoration-thickness .18s ease;
}

/* ホバー時にふわっと浮き出す */
.notice.tel .tel-num:hover,
.notice.tel .tel-num a:hover {
  transform: translateY(-1px) scale(1.03);
  text-shadow: 0 2px 6px rgba(243, 152, 29, .35);
  color: #61d0c9;
  text-decoration-thickness: 2px;
}

/* キーボード操作でも同様の効果 */
.notice.tel .tel-num:focus-visible,
.notice.tel .tel-num a:focus-visible {
  transform: translateY(-1px) scale(1.03);
  text-shadow: 0 2px 6px rgba(243, 152, 29, .35);
  color: #61d0c9;
  text-decoration-thickness: 2px;
  outline: 2px solid #61d0c9;
  outline-offset: 2px;
}

/* 動きが苦手なユーザー配慮 */
@media (prefers-reduced-motion: reduce) {
  .notice.tel .tel-num,
  .notice.tel .tel-num a {
    transition: none;
  }
  .notice.tel .tel-num:hover,
  .notice.tel .tel-num a:hover,
  .notice.tel .tel-num:focus-visible,
  .notice.tel .tel-num a:focus-visible {
    transform: none;
    text-shadow: none;
  }
}
.notice:last-of-type {
  margin-bottom: 10px;
  text-align: center;
}

/* ===============================
   フォームテーブル
================================ */
.dl-form-table tr { /* ① 項目同士の縦余白 */
  margin: 0;
  padding: 4px 0;
}
.dl-form-table {
  table-layout: auto;
  border-collapse: collapse !important;
  border-spacing: 0 !important;
  background: #fff;
  margin-left: auto;
  margin-right: auto;
  margin-top: 10px;
  max-width: 980px;
  width: 100%;
  border: 1px solid #bfbfbf;
}
.dl-form-table tr,
.dl-form-table th,
.dl-form-table td { margin: 0; }

/* ------- th（中央揃え／バッジ右寄せ） ------- */
.dl-form-table > tbody > tr > th,
.entry-content table.dl-form-table > tbody > tr > th {
  position: relative;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  gap: 8px;
  font-weight: 800;
  font-size: 15px;
  line-height: 1.4;
  white-space: normal !important;
  word-break: normal;
  overflow-wrap: normal;
  padding: 14px 56px 14px 12px;
}
.dl-form-table > tbody > tr > th .badge-required,
.entry-content table.dl-form-table > tbody > tr > th .badge-required {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-block;
  padding: 3px 6px 2px;
  background: #f3981d;
  color: #fff;
  font-weight: 800;
  font-size: 12px;
  line-height: 1;
  border-radius: 4px;
  white-space: nowrap;
}
.dl-form-table > tbody > tr > th > label,
.entry-content table.dl-form-table > tbody > tr > th > label {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  width: 100%;
}
.dl-form-table > tbody > tr > th .th-label,
.entry-content table.dl-form-table > tbody > tr > th .th-label { max-width: 100%; }
@media (min-width: 769px) {
  .dl-form-table > tbody > tr > th,
  .entry-content table.dl-form-table > tbody > tr > th { width: 260px; }
}

/* ------- 右列（入力欄） ------- */
.dl-form-table td,
.entry-content table.dl-form-table td {
  text-align: left;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.dl-form-table input[type="text"],
.dl-form-table input[type="email"],
.dl-form-table textarea,
.entry-content table.dl-form-table input[type="text"],
.entry-content table.dl-form-table input[type="email"],
.entry-content table.dl-form-table textarea {
  display: block;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 9px 12px;
  border: 1px solid #cfcfcf;
  border-radius: 4px;
  background: #fff;
  box-sizing: border-box;
  font-weight: 700;
  line-height: 1.4;
}
.dl-form-table textarea,
.entry-content table.dl-form-table textarea { min-height: 120px; }
.dl-form-table input::placeholder,
.dl-form-table textarea::placeholder,
.entry-content table.dl-form-table input::placeholder,
.entry-content table.dl-form-table textarea::placeholder {
  color: #9aa3ad;
  font-weight: 400;
}

/* ラジオ・チェックボックス */
.dl-form-table td .mwform-radio-field,
.dl-form-table td .mwform-checkbox-field,
.entry-content table.dl-form-table td .mwform-radio-field,
.entry-content table.dl-form-table td .mwform-checkbox-field {
  display: inline-flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
  font-weight: 700;
}
.dl-form-table td .mwform-radio-field label,
.dl-form-table td .mwform-checkbox-field label,
.entry-content table.dl-form-table td .mwform-radio-field label,
.entry-content table.dl-form-table td .mwform-checkbox-field label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* エラー */
.mw_wp_form .error {
  color: #ef4444;
  font-size: 12px;
  margin-top: 6px;
  text-align: left;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* ボタン */
.actions .btn-primary,
.mw_wp_form input[type="submit"].btn-primary {
  display: inline-block;
  width: 240px;
  background: #f3981d;
  color: #fff;
  font-weight: 800;
  border: none;
  border-radius: 6px;
  padding: 12px 0;
  letter-spacing: .05em;
  cursor: pointer;
  transition: all .2s ease;
  text-align: center;
}
.actions .btn-primary:hover,
.mw_wp_form input[type="submit"].btn-primary:hover {
  background: #fff;
  color: #f3981d;
  outline: 2px solid #f3981d;
}

/* スマホ */
@media (max-width: 768px) {
  .dl-form-table th,
  .entry-content table.dl-form-table th { width: 34%; }
  .dl-form-table input[type="text"],
  .dl-form-table input[type="email"],
  .dl-form-table textarea,
  .entry-content table.dl-form-table input[type="text"],
  .entry-content table.dl-form-table input[type="email"],
  .entry-content table.dl-form-table textarea { max-width: 100%; }
}

/* ===== 入力枠の左端をそろえる（最終版） ===== */
.dl-form-table td { text-align: left !important; padding: 14px 20px !important; }
.dl-form-table input[type="text"],
.dl-form-table input[type="email"],
.dl-form-table textarea {
  display: block;
  width: 100%;
  max-width: 560px;
  margin: 0 !important;
  padding: 9px 12px;
  border: 1px solid #cfcfcf;
  border-radius: 4px;
  box-sizing: border-box;
}
.dl-form-table .mwform-email-field,
.dl-form-table .mwform-textarea-field {
  display: block;
  width: 100%;
  max-width: 560px;
  margin: 0 !important;
  box-sizing: border-box;
}
.dl-form-table td[colspan="2"] {
  text-align: center;
  padding-top: 20px;
}

/* プライバシーポリシー文の体裁 */
.policy {
  margin-top: 12px;
  font-size: 14px;
  color: #555;
  line-height: 1.6;
}
.policy a {
  color: #0fa59b; /* コーポレートカラーに合わせる */
  text-decoration: underline;
}
.policy a:hover { opacity: 0.8; }

/* ===============================
   SP ONLY: 必須バッジを項目名の右横・同じ高さで揃える
   ※PC表示へ影響なし
================================ */
@media (max-width: 768px) {
  /* ===== フォーム全体の枠線を削除（入力欄は残す） ===== */
  .dl-form-table,
  .dl-form-table tr,
  .dl-form-table th,
  .dl-form-table td {
    border: none !important;
  }
  /* 1行レイアウトの土台（thをフレックスに） */
  .dl-form-table > tbody > tr > th,
  .entry-content table.dl-form-table > tbody > tr > th {
    display: flex !important;
    align-items: center !important;      /* 垂直中央 */
    justify-content: flex-start !important;
    gap: 8px;
    text-align: left !important;
    padding: 0 0 10px 0;
    line-height: 1.5;
    flex-wrap: nowrap;
  }

  /* ラベルはコンテンツ幅のまま（100%を打ち消す） */
  .dl-form-table > tbody > tr > th > label,
  .entry-content table.dl-form-table > tbody > tr > th > label {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    width: auto !important;             /* 既存の width:100% を上書き */
    flex: 0 0 auto;
  }

  /* ← ココが決め手：絶対配置を確実に無効化 */
  .dl-form-table > tbody > tr > th .badge-required,
  .entry-content table.dl-form-table > tbody > tr > th .badge-required {
    position: static !important;        /* absolute を打ち消し */
    top: auto !important;
    right: auto !important;
    transform: none !important;

    display: inline-flex !important;    /* テキストと高さを合わせる */
    align-items: center;
    justify-content: center;

    margin: 0 0 0 6px !important;       /* 項目名のすぐ右に */
    padding: 3px 6px 2px;
    background: #f3981d;
    color: #fff;
    font-weight: 800;
    font-size: 12px;
    line-height: 1;
    border-radius: 4px;
    white-space: nowrap;
  }

  /* 以下、周辺の必要最低限だけ（任意） */
  .dl-form-table td,
  .entry-content table.dl-form-table td {
    display: block;
    text-align: left !important;
    padding: 0 !important;
  }
  .dl-form-table input[type="text"],
  .dl-form-table input[type="email"],
  .dl-form-table textarea {
    width: 100%;
    max-width: 100%;
    margin: 0 !important;
    font-size: 16px;
    padding: 10px 12px;
  }
  .dl-form-table textarea { min-height: 140px; }
}


/* === スマホのみ：左揃え・<br>無効化・自動折り返しON === */
@media (max-width: 768px) {
  .notice:not(.tel) {
    text-align: left !important;
    white-space: normal !important; /* 折り返しOK */
    word-break: break-word;         /* 長い単語も適宜折り返す */
  }
  .notice:not(.tel) br {
    display: none !important;       /* <br>だけ無効化 */
  }
  .dl-form-table > tbody > tr {
    margin-bottom: 2px !important;
    display: block;
  }
}
/* ===== お問い合わせフォーム全体を中央寄せ＋少し右寄せに ===== */
.page .mw_wp_form {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-direction: column;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  width: 100%;
  position: relative;
  left: 2%; /* ← 右に少し寄せる。1〜3%で微調整可 */
}

.dl-form-table {
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: left;
}

.mw_wp_form {
  float: none !important;
  width: 100% !important;
}

/* === MW WP Form 確認画面を確実に中央寄せ === */
/* 1) フォーム自身に confirm クラスが付くパターン */
.mw_wp_form.mw_wp_form_confirm,
/* 2) 親や body 等に confirm クラスが付くパターン */
body.mw_wp_form_confirm .mw_wp_form,
[class*="mw_wp_form_confirm"] .mw_wp_form,
/* 3) ハイフン表記のテーマ派生 */
.mw-wp-form-confirm .mw_wp_form {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;      /* 中央寄せ */
  justify-content: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
  left: 0 !important;                  /* 既存 left:2% を無効化 */
  text-align: center !important;
  max-width: 1080px !important;
}

/* テーブルも中央に */
.mw_wp_form_confirm .dl-form-table,
[class*="mw_wp_form_confirm"] .dl-form-table,
.mw-wp-form-confirm .dl-form-table {
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: left; /* 中の文字は従来どおり左でOKなら残す */
}

/* ボタン行も中央 */
.mw_wp_form_confirm .actions,
[class*="mw_wp_form_confirm"] .actions,
.mw-wp-form-confirm .actions,
.mw_wp_form_confirm td[colspan="2"],
[class*="mw_wp_form_confirm"] td[colspan="2"],
.mw-wp-form-confirm td[colspan="2"] {
  text-align: center !important;
}

/*  プライバシー同意の行だけ中央寄せ＋色変更 */
.dl-form-table tr.is-privacy-row > td[colspan="2"] {
  text-align: center !important;
}
.dl-form-table tr.is-privacy-row > td .check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.dl-form-table tr.is-privacy-row > td .check a {
  color: #0fa59b !important;
}


</style>
