/* ========================================
   入力画面・確認画面 共通
======================================== */
.contact-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  border: 1px solid #3b82f6;
  background: #fff;
}

.contact-table th,
.contact-table td {
  border: 1px dotted #3b82f6;
  padding: 10px;
  vertical-align: top;
}

.contact-table th {
  width: 255px;
  background: #f3f3f3;
  font-weight: 400;
  text-align: left;
  color: #222;
}

.error_messe {
  margin: 6px 0;
  color: #c00;
}

/* ========================================
   入力画面
======================================== */
.contact-form-wrap {
  padding: 20px 0 80px;
}

.contact-note {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.8;
  color: #444;
}

.required {
  color: #c00;
}

.text-input,
.textarea-input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid #ccc;
  font-size: 16px;
  line-height: 1.5;
  background: #fff;
  color: #222;
}

.input-short {
  max-width: 320px;
}

.input-medium {
  max-width: 420px;
}

.textarea-input {
  min-height: 220px;
  resize: vertical;
}

.contact-check-list label {
  display: block;
  margin-bottom: 10px;
  line-height: 1.8;
  color: #222;
}

.contact-check-list label:last-child {
  margin-bottom: 0;
}

.contact-check-list label {
  display: block;
  margin-bottom: 10px;
  line-height: 1.8;
  color: #222;
}

.contact-check-list label:last-child {
  margin-bottom: 0;
}

.contact-check-list input[type="checkbox"] {
  -webkit-appearance: auto;
  appearance: auto;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  vertical-align: middle;
}

.contact-button {
  margin-top: 24px;
}

.contact-button input[type="submit"] {
  min-width: 140px;
  padding: 12px 20px;
  border: 1px solid #cfcfcf;
  background: #f5f5f5;
  color: #222;
  font-size: 16px;
  line-height: 1.2;
  cursor: pointer;
  border-radius: 0;
  appearance: none;
  transition: background-color 0.2s ease;
}

.contact-button input[type="submit"]:hover {
  background: #ececec;
}

/* ========================================
   確認画面
======================================== */
.contact-confirm-wrap {
  padding: 20px 0 80px;
}

.contact-confirm-text {
  margin: 0 0 24px;
  font-size: 15px;
  line-height: 1.8;
  color: #444;
}

.contact-confirm-buttons {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.contact-confirm-buttons input[type="submit"],
.contact-confirm-buttons input[type="button"] {
  min-width: 140px;
  padding: 12px 20px;
  border: 1px solid #cfcfcf;
  background: #f5f5f5;
  color: #222;
  font-size: 16px;
  line-height: 1.2;
  cursor: pointer;
  border-radius: 0;
  appearance: none;
  transition: background-color 0.2s ease;
  box-sizing: border-box;
}

.contact-confirm-buttons input[type="submit"]:hover,
.contact-confirm-buttons input[type="button"]:hover {
  background: #ececec;
}

/* ========================================
   完了画面
======================================== */
.contact-thanks-wrap {
  width: min(960px, calc(100% - 40px));
  margin: 0 auto;
  padding: 20px 0 80px;
  text-align: center;
}

.contact-thanks-title {
  margin: 0 0 24px;
  font-size: 30px;
  line-height: 1.4;
  color: #222;
}

.contact-thanks-text {
  margin: 0 0 32px;
  font-size: 16px;
  line-height: 1.9;
  color: #444;
}

.contact-thanks-button {
  display: inline-block;
  padding: 12px 24px;
  border: 1px solid #cfcfcf;
  background: #f5f5f5;
  color: #222;
  text-decoration: none;
  font-size: 16px;
  line-height: 1.2;
  transition: background-color 0.2s ease;
}

.contact-thanks-button:hover {
  background: #ececec;
}

.contact-error-box {
  color: #c00;
  margin: 16px 0;
}

.contact-error-button {
  margin-top: 24px;
}

.contact-error-button input[type="button"] {
  min-width: 180px;
  padding: 12px 20px;
  border: 1px solid #cfcfcf;
  background: #f5f5f5;
  color: #222;
  font-size: 16px;
  line-height: 1.2;
  cursor: pointer;
  border-radius: 0;
  appearance: none;
  transition: background-color 0.2s ease;
  box-sizing: border-box;
}

.contact-error-button input[type="button"]:hover {
  background: #ececec;
}

/* ========================================
   レスポンシブ 共通
======================================== */
@media screen and (max-width: 900px) {

  .contact-table,
  .contact-table tbody,
  .contact-table tr,
  .contact-table th,
  .contact-table td {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }

  .contact-table th {
    border-bottom: none;
  }

  .contact-table td {
    border-top: none;
  }

  .contact-form-wrap {
    padding: 20px 0 50px;
  }

  .input-short,
  .input-medium {
    max-width: 100%;
  }

  .contact-button input[type="submit"] {
    width: 100%;
    max-width: 320px;
  }

  .contact-confirm-buttons {
    flex-direction: column;
  }

  .contact-confirm-buttons input[type="submit"],
  .contact-confirm-buttons input[type="button"] {
    width: 100%;
  }

  .contact-thanks-wrap {
    width: min(100%, calc(100% - 24px));
    padding: 20px 0 50px;
  }

  .contact-thanks-title {
    font-size: 24px;
  }

  .contact-thanks-text {
    font-size: 15px;
    line-height: 1.8;
  }

  .contact-thanks-button,
  .contact-error-button input[type="button"] {
    width: 100%;
    max-width: 320px;
  }
}