:root {
  --main-bg-color: #f0f0f0;
  --main-text-color: #333;
}

/* -------------------------------
   共通部
-------------------------------- */
.ErrMsg,
.ErrMsgPhp {
  color: #f00;
  width: 90%;
  margin: 10px auto;
}
.ErrMsg { display: none; }

.box_recapcha {
  width: 305px !important;
  margin: 20px auto;
}

.err_recapcha {
  display: none;
  margin: 0 auto;
  height: fit-content;
  width: fit-content;
}

.recapcha_txt {
  display: block !important;
  color: rgb(219,76,38);
}

/* ---- form全体 ---- */
.form_container {
  width: 100%;
  overflow: hidden;
  margin-top: 100px;
}

.form_box {
  width: 1000px;
  overflow: hidden;
  margin: 100px auto;
}

.form_title {
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  color: var(--main-text-color);
}

/* ---- table ---- */
.form_table {
  width: 100%;
  margin: 50px auto 60px;
  border-collapse: collapse;
}

.form_table th {
  width: 300px;
  position: relative;
  vertical-align: top;
  font-size: 18px;
  font-weight: 700;
  color: var(--main-text-color);
  text-align: left;
  padding: 32px 0 25px;
}

.form_table td {
  width: 700px;
  padding: 25px 0;
}

.form_table th span.txt {
  display: block;
  margin-top: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--main-text-color);
}

.form_table th div {
  position: absolute;
  width: 56px;
  height: 21px;
  right: 40px;
  top: 36px;
  background-color: #000;   /* 背景を黒に */
  border-radius: 4px; 
}

.form_table th div span {
  color: #fff;              /* 文字を白に */
  font-weight: 700;
  font-size: 12px;
  display: block;
  text-align: center;
  line-height: 20px;
}

/* ---- input/textarea ---- */
.form_table td input:not([type='checkbox']),
.form_table td textarea {
  width: 100%;
  background-color: var(--main-bg-color);
  border-radius: 4px;
  padding: 10px 20px;
  font-size: 18px;
  font-weight: 500;
  color: #222;
}

.form_table td input:not([type='checkbox']) { height: 40px; }
.form_table td textarea {
  height: 180px;
  min-height: 180px;
  max-height: 300px;
}

.form_table td input::placeholder,
.form_table td textarea::placeholder {
  font-size: 18px;
  color: #ccc;
  line-height: 18px;
  font-weight: 500;
}

/* ---- チェックボックス群 ---- */
.form_table td a {
  display: inline-flex;
  align-items: center;
  height: 22px;
  margin: 0 35px 25px 0;
  width: fit-content;
}
.form_table td a input {
  opacity: 0;
  width: 0;
  height: 0;
}
.form_table td a path {
  width: 20px;
  height: 20px;
  background-color: transparent;
  border: 1px #fff solid;
  border-radius: 4px;
}
.form_table td a path.checked {
  background-image: linear-gradient(-73deg, rgb(255,91,1) 0%, rgb(255,144,0) 56%, rgb(255,132,0) 100%);
}
.form_table td a label {
  margin-left: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--main-text-color);
  font-family: 'noto-sans-cjk-jp' !important;
}

/* ---- reCAPTCHA ---- */
.robotBox { text-align: center; }
.robotBox label { color: #fff !important; }

.robot span {
  display: block;
  margin: 0 auto 35px;
  font-size: 14px;
  font-weight: 700;
  color: var(--main-text-color);
  width: fit-content;
  height: fit-content;
}

/* ---- 送信ボタン ---- */
button.rect_btn {
  border: none !important;
  width: 240px;
  height: 50px;
  border-radius: 25px;
  box-sizing: border-box;
  background: #f00;
  color: #fff;
  cursor: pointer;
  
  /* ボタン自体の中央寄せ */
  display: block;
  margin: 60px auto 40px !important;

  /* ボタン内テキストの上下左右中央寄せ */
  text-align: center;
  line-height: 50px;
  padding: 0;
  vertical-align: middle;
}

button.rect_btn span {
  font-size: 20px !important;
  color: #fff !important;
  line-height: 1;
  display: inline-block;
}




/* ---- 完了画面 ---- */
.complete { text-align: center; margin: 100px auto; }
#thanks span { font-weight: bold; font-size: 26px; color: #fff !important; }

.form_msg {
  width: 100%;
  padding: 36px 0;
  text-align: center;
  font-size: 14px;
  line-height: 24px;
  font-weight: 700;
  color: var(--main-text-color);
  background-color: #000;
}

/* ---- その他 ---- */
#sec_tel_sent { margin-top: 40px; }
.contact_sent {
  margin: 30px;
  font-size: 18px;
  font-weight: 500;
  line-height: 32px;
  text-align: center;
  color: var(--main-text-color);
}
.contact_sent span,
.contact_sent a {
  font-size: 18px;
  font-weight: 500;
  line-height: 32px;
  color: var(--main-text-color);
}
.contact_sent span { color: #D96769; }
.contact_sent a { text-decoration: underline; }

/* -------------------------------
   スマホ調整
-------------------------------- */
@media (max-width: 811px) {
  .form_container { margin-top: 20px; }
  .form_box { width: 92%; margin: 4px auto; }

  .form_title {
    font-size: 20px;
    margin-top: 20px;
  }

  .form_table {
    margin: 20px auto 30px;
  }

  .form_table th {
    width: 30%;
    font-size: 12px;
    padding: 12px 0 2%;
  }

  .form_table td {
    width: 70%;
    padding: 2% 0;
  }

  .form_table th span.txt { font-size: 10px; margin-top: 5px; }
  .form_table th div { width: 40px; height: 18px; margin-top: 5px; }
  .form_table th div span { font-size: 10px; }

  .form_table td input:not([type='checkbox']),
  .form_table td textarea {
    padding: 5px 10px;
    font-size: 12px;
  }
  .form_table td input:not([type='checkbox']) { height: 30px; }
  .form_table td textarea {
    height: 150px;
    min-height: 150px;
    max-height: 150px;
  }
  .form_table td input::placeholder,
  .form_table td textarea::placeholder {
    font-size: 12px;
    line-height: 14px;
  }

  .form_table td a {
    width: 100% !important;
    margin: 0 0 5px 0;
  }
  .form_table td a label { font-size: 12px; }

  .robot span { font-size: 12px; }
  .form_msg { margin: 30px auto; padding: 20px 10px; font-size: 10px; }

  .complete { margin: 50px auto; }
  #thanks span { font-size: 20px; }

  #sec_tel_sent { margin-top: 20px; }
  .contact_sent { margin: 20px 0; font-size: 10px; line-height: 20px; }
  .contact_sent span,
  .contact_sent a {
    font-size: 12px;
    line-height: 24px;
  }

  button.rect_btn {
    width: 180px;
    height: 44px;
    margin: 40px auto 20px !important;
  }
  button.rect_btn span { font-size: 16px !important; }
    
    /* -------- フォームを縦並びに -------- */
  .form_table,
  .form_table tbody,
  .form_table tr,
  .form_table th,
  .form_table td {
    display: block;
    width: 100%;
  }

  /* タイトル部分（th） */
  .form_table th {
    display: flex;
    align-items: center;
    justify-content: space-between; /* タイトル左、必須右 */
    padding: 8px 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--main-text-color);
  }

  /* 必須マークを右端固定に */
  .form_table th div {
    position: static; /* absoluteを解除 */
    margin: 0;        /* 不要な余白をリセット */
    flex-shrink: 0;   /* タイトルが長くても潰れないように */
  }

  /* 必須ラベル（黒背景＋白文字）見た目調整 */
  .form_table th div span {
    display: inline-block;
    background: #000;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    line-height: 15px;
  }
  
}
