/* =======================
   お問い合わせページ
   ======================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Noto Sans JP",
    sans-serif;
  color: #145087;
}

/* 背景より前に出す */
.page-content {
  position: relative;
  z-index: 10;
  min-height: 100vh;
}

/* レイアウト（SP） */
.main {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 16px 40px;
}

.section {
  margin-top: 40px;
}

.section__inner {
  max-width: 480px;
  margin: 0 auto;
}

/* =======================
   タイトルカード
   ======================= */

.section-contact {
  margin-top: 24px;
}

.contact-heading {
  background: #ffffffee;
  border-radius: 18px;
  padding: 12px 8px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(13, 71, 125, 0.08);
  border: 1px solid #e2f1ff;
  margin-bottom: 20px;
}

.contact-heading__title {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0.2em;
  color: #145087;
}

/* =======================
   セクション見出し
   ======================= */

.contact-section {
  margin-top: 28px;
}

.contact-section__title {
  font-size: 14px;
  letter-spacing: 0.18em;
  color: #145087;
  margin: 0 0 8px;
  position: relative;
  padding-bottom: 4px;
}

.contact-section__title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 140px;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    rgba(255, 216, 111, 0.9),
    rgba(255, 216, 111, 0)
  );
}

/* =======================
   カードベース
   ======================= */

.contact-card {
  background: #ffffffee;
  border-radius: 16px;
  padding: 12px 14px 14px;
  border: 1px solid #e2f1ff;
  box-shadow: 0 4px 10px rgba(13, 71, 125, 0.05);
}

.contact-card__text {
  font-size: 12px;
  line-height: 1.8;
  color: #34536f;
  margin: 0 0 8px;
}

/* リスト */

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 12px;
  line-height: 1.8;
  color: #34536f;
}

.contact-list--bullets {
  list-style: disc;
  padding-left: 1.3em;
}

/* LINEボタン */

.contact-intro__buttons {
  margin-top: 10px;
  text-align: center;
}

.btn-line {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 999px;
  background: #00c300;
  color: #ffffff;
  font-size: 12px;
  text-decoration: none;
  letter-spacing: 0.12em;
  font-weight: 500;
}

/* =======================
   フォーム
   ======================= */

.contact-form {
  background: #ffffffee;
  border-radius: 18px;
  padding: 14px 14px 16px;
  border: 1px solid #e2f1ff;
  box-shadow: 0 4px 12px rgba(13, 71, 125, 0.08);
  display: grid;
  gap: 12px;
}

.contact-form__field {
  font-size: 12px;
}

.contact-form__label {
  display: block;
  margin-bottom: 4px;
  color: #145087;
  font-weight: 500;
}

.contact-form__required {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #ffe1e1;
  font-size: 10px;
  color: #c24040;
}

/* テキスト入力 */

.contact-form__input,
.contact-form__textarea,
.contact-form__select {
  width: 100%;
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid #d5e4ff;
  outline: none;
  background-color: #fff;
  color: #145087;
}

.contact-form__input:focus,
.contact-form__textarea:focus,
.contact-form__select:focus {
  border-color: #1c63d2;
}

/* select 用ラッパ */

.contact-form__select-wrap {
  position: relative;
}

.contact-form__select-wrap::after {
  content: "▼";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  color: #6a7c93;
  pointer-events: none;
}

.contact-form__select {
  appearance: none;
  -webkit-appearance: none;
}

/* textarea */

.contact-form__textarea {
  resize: vertical;
  min-height: 140px;
}

/* ヒント */

.contact-form__hint {
  font-size: 11px;
  color: #6a7c93;
  margin: 4px 0 0;
}

/* 同意 */

.contact-form__field--agree {
  margin-top: 4px;
}

.contact-form__agree-label {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 11px;
  color: #34536f;
}

.contact-form__agree-label input {
  margin-top: 2px;
  accent-color: #1c63d2;
}

.contact-form__agree-label a {
  color: #1c63d2;
  text-decoration: none;
}

/* 送信ボタン（確認ボタン） */

.contact-form__actions {
  text-align: center;
  margin-top: 4px;
}

.contact-form__submit {
  display: inline-block;
  padding: 10px 32px;
  border-radius: 999px;
  border: none;
  background: #1c63d2;
  color: #ffffff;
  font-size: 13px;
  letter-spacing: 0.16em;
  cursor: pointer;
}

.contact-form__submit:hover {
  opacity: 0.9;
}

.contact-form__note {
  font-size: 11px;
  color: #6a7c93;
  margin: 8px 0 0;
}

/* =======================
   よくあるお問い合わせ
   ======================= */

.contact-faq-list {
  display: grid;
  gap: 10px;
}

.contact-faq-item {
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 4px 10px rgba(13, 71, 125, 0.08);
  overflow: hidden;
}

.contact-faq-item__summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
}

.contact-faq-item__summary::-webkit-details-marker {
  display: none;
}

.contact-faq-item__qmark {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid #1c63d2;
  color: #1c63d2;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-faq-item__question {
  font-size: 12px;
  color: #145087;
  flex: 1;
}

.contact-faq-item__toggle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid #f5d45d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #f5d45d;
  flex-shrink: 0;
}

.contact-faq-item__toggle::before {
  content: "+";
}

.contact-faq-item[open] .contact-faq-item__toggle::before {
  content: "−";
}

.contact-faq-item__content {
  border-top: 1px solid #f2f3f7;
  padding: 8px 14px 12px;
  background: #fffcf4;
  font-size: 12px;
  color: #555f6d;
  line-height: 1.8;
}

/* =======================
   お問い合わせ メッセージ表示
   ======================= */

.contact-message {
  margin-bottom: 12px;
  font-size: 12px;
  line-height: 1.6;
}

.contact-message--success {
  color: #0a7b3b;
}

.contact-message--error {
  color: #c24040;
}

.contact-message--warn {
  color: #ffa322;
}

.contact-message--info {
  color: #6a7c93;
}

/* =======================
   確認モーダル
   ======================= */

/* モーダル全体（最初は非表示。JSで .is-open を付ける） */
.contact-confirm-wrapper {
  margin-top: 16px;
}

.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: none;                
  justify-content: center;      
  align-items: center;           
  padding: 0 8px;  
}

.contact-modal.is-open {
  display: flex; 
}

/* うすい黒背景 */
.contact-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

/* ダイアログ本体 */
.contact-modal__dialog {
  position: relative;
  max-width: 520px;
  margin: 0;
  background: #fffdf8;
  border-radius: 18px;
  padding: 18px 16px 20px;
  box-shadow: 0 6px 20px rgba(13, 71, 125, 0.2);
  border: 1px solid #e2f1ff;
}

.contact-modal__title {
  margin: 0 0 8px;
  font-size: 16px;
  letter-spacing: 0.16em;
  color: #145087;
  text-align: center;
}

.contact-modal__lead {
  margin: 0 0 12px;
  font-size: 12px;
  color: #44566b;
  line-height: 1.7;
  text-align: center;
}

.contact-modal__content {
  background: #ffffff;
  border-radius: 14px;
  padding: 10px 12px;
  border: 1px solid #f1f4fb;
}

/* 確認用リスト */
.contact-modal__list {
  margin: 0;
  padding: 0;
  font-size: 12px;
  line-height: 1.7;
}

.contact-modal__row {
  display: flex;
  gap: 8px;
  padding: 6px 0;
}

.contact-modal__row + .contact-modal__row {
  border-top: 1px dotted #e2f1ff;
}

.contact-modal__row dt {
  width: 110px;
  flex-shrink: 0;
  font-weight: 600;
  color: #145087;
}

.contact-modal__row dd {
  margin: 0;
  color: #44566b;
  white-space: pre-wrap; /* 改行も再現 */
}

/* ボタンエリア */
.contact-modal__actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  justify-content: center;
}

.contact-modal__button {
  min-width: 120px;
  padding: 8px 14px;
  border-radius: 999px;
  border: none;
  font-size: 13px;
  cursor: pointer;
  letter-spacing: 0.08em;
}

.contact-modal__button--back {
  background: #ffffff;
  color: #145087;
  border: 1px solid #c9d8f0;
}

.contact-modal__button--submit {
  background: #1c63d2;
  color: #ffffff;
}

.contact-modal__button--back:hover,
.contact-modal__button--submit:hover {
  opacity: 0.9;
}

.contact-modal__note {
  margin: 10px 0 0;
  font-size: 11px;
  color: #6a7c93;
  text-align: center;
}

/* =======================
   レスポンシブ（PC）
   ======================= */

@media (min-width: 768px) {
  .main,
  .section__inner {
    max-width: 960px;
  }

  .section {
    margin-top: 56px;
  }

  .section-contact {
    margin-top: 40px;
  }

  .contact-form {
    padding: 18px 20px 20px;
  }

  /* 日付＋エリアを横並びに（今回はそのまま汎用グリッド） */
  .contact-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 16px;
  }

  .contact-form__field {
    grid-column: 1 / -1;
  }

  .contact-form__field--half {
    grid-column: span 1;
  }

  .contact-form__field--agree,
  .contact-form__actions {
    grid-column: 1 / -1;
  }

  /* モーダル位置調整（PCで少し余裕を持たせる） */
  .contact-modal__dialog {
    margin: 0;
    padding: 20px 24px 22px;
    max-width: 540px;
  }
}
