/* ===== Contact Form ===== */
.contact-form{
  width: min(92vw, 1120px);
  margin: 20px auto 40px;
  border: 1px solid #e6e6e9;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,.06);
  overflow: hidden;
}

/* 各行を2カラム化 */
.contact-form .form-row{
  display: grid;
  grid-template-columns: clamp(140px, 22vw, 260px) minmax(0,1fr);
  align-items: center;
  min-height: 68px;
  border-bottom: 1px solid #ececf0;
}
.contact-form .form-row:last-of-type{ border-bottom: none; }

/* ラベル列 */
.contact-form .form-row > label{
  background: #f7f7f8;
  color: #444;
  font-weight: 600;
  padding: 18px 22px;
  border-right: 1px solid #ececf0;
}

/* 入力欄 */
.contact-form .form-row > input,
.contact-form .form-row > select,
.contact-form .form-row > textarea{
  width: calc(100% - 40px);
  box-sizing: border-box;
  margin: 12px clamp(12px, 2vw, 18px);
  padding: 13px 14px;
  border: 1px solid #dedee3;
  border-radius: 8px;
  background: #fff;
  font-size: clamp(15px, 1.7vw, 16px);
  color: #111;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.contact-form .form-row > textarea{
  min-height: clamp(180px, 28vh, 260px);
  resize: vertical;
}
.contact-form ::placeholder{ color:#b9b9b9; }
.contact-form .form-row > input:focus,
.contact-form .form-row > select:focus,
.contact-form .form-row > textarea:focus{
  border-color:#c5c7cf;
  box-shadow:0 0 0 3px rgba(17,17,17,.06);
  outline:0;
}

/* 必須マーク */
.contact-form .req{
  margin-left: .4em;
  font-size: 12px;
  color: #c00;
  font-weight: 700;
}

/* テキストエリア系のラベルは上揃え */
.contact-form .form-row:has(textarea) > label{
  align-self: start;
  padding-top: 18px;
}

/* ===== ボタン行 ===== */
.contact-form .form-actions{
  width: min(92vw, 1120px);
  margin: 20px auto 0;
  padding: 20px;
  display:flex;
  justify-content:flex-end;
  box-sizing:border-box;
  border-top: none !important;
}

/* ボタン（固定サイズ） */
.contact-form .btn{
  width: 180px;
  height: 48px;
  line-height: 48px;
  padding: 0;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  border-radius: 6px;
  background: #111;
  color: #fff;
  cursor: pointer;
  transition: background .12s, box-shadow .12s;
}
.contact-form .btn:hover{
  background:#333;
  box-shadow:0 4px 12px rgba(0,0,0,.16);
}

/* ===== SP調整（メニューと被らない／左右余白均等／メニュー最前面） ===== */

/* 確認ボタン全体の配置 */
.contact-form-section .form-actions {
  width: 100%;
  margin: 20px auto 0;
  padding: 20px 0;
  display: flex;
  justify-content: center;   /* ← ボタンを中央に */
  box-sizing: border-box;
  border-top: none;
}

/* ボタン本体 */
.contact-form-section .btn {
  width: 200px;          /* 固定幅（お好みで調整） */
  height: 48px;          /* 固定高さ */
  display: flex;
  align-items: center;   /* 縦方向中央 */
  justify-content: center; /* 横方向中央 */
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  border-radius: 6px;
  background: #111;
  color: #fff;
  cursor: pointer;
  transition: background .12s, box-shadow .12s;
}

.contact-form-section .btn:hover {
  background: #333;
  box-shadow: 0 4px 12px rgba(0,0,0,.16);
}

/* 送信前確認ボタンの配置を中央に */
.form-actions{
  justify-content: center !important; /* ← 右寄せを上書きして中央寄せ */
}

/* ボタン内テキストも縦横センターに */
.contact-form .btn{
  display: inline-flex;              /* ← 中の文字をflexで中央に */
  align-items: center;               /* 縦中央 */
  justify-content: center;           /* 横中央 */
  height: 48px;
  line-height: 1;                    /* flexで中央にするのでリセット */
  padding: 0 20px;
  text-align: center;
  -webkit-appearance: none;          /* iOSの見た目差異対策（任意） */
  appearance: none;
}
  
/* ===========================
   Backdrop + Confirm Modal
   ※ 置き換え用
   =========================== */

/* 画面暗転用のバックドロップ */
/* 暗転 */
#backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 1000;
  display: none;
}

/* モーダルコンテナ */
#confirmModal {
  position: fixed;
  inset: 0;
  display: none;           /* JSで flex 表示 */
  align-items: center;
  justify-content: center;
  z-index: 1001;           /* バックドロップより上 */
  /* ← ここ、pointer-events: none; を削除（または auto に変更） */
}

/* 実体のボックス（ここだけクリック可） */
#confirmModal .box {        /* ← .modal-inner ではなく .box に合わせる */
  width: min(92vw, 920px);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 18px 60px rgba(0,0,0,.25);
  overflow: hidden;
  pointer-events: auto;     /* クリックを有効化する肝 */
}


/* ヘッダ/本文/ボタン（前ターンの体裁を踏襲） */
#confirmModal .modal-header {
  padding: 22px 28px 12px;
  border-bottom: 1px solid #ececf0;
}
#confirmModal .modal-header h3 {
  margin: 0;
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 700;
  color: #6d675f;
}
#confirmModal .modal-body {
  padding: 18px 28px 12px;
  box-sizing: border-box;
}
#confirmModal .modal-body .row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px 18px;
  align-items: start;
  padding: 8px 0;
}
#confirmModal .modal-body .k { color:#555; font-weight:600; line-height:1.7; }
#confirmModal .modal-body .v {
  color:#333; line-height:1.8;
  white-space: pre-wrap; word-break: break-word; overflow-wrap:anywhere;
}

/* ボタン行＆ボタン */
#confirmModal .modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  padding: 16px 24px 24px;
  box-sizing: border-box;
}
#confirmModal button,
#btnCancel, #btnSend {
  min-width: 168px; height: 48px; padding: 0 22px;
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 1; font-size: 18px; font-weight: 600;
  border-radius: 8px; white-space: nowrap; box-sizing: border-box;
  -webkit-appearance: none;
}
#btnSend   { background:#111; color:#fff; border:none; cursor:pointer; transition:background .15s, box-shadow .15s; }
#btnSend:hover { background:#333; box-shadow:0 6px 16px rgba(0,0,0,.18); }
#btnCancel { background:#f6f7f8; color:#333; border:1px solid #dcdfe3; cursor:pointer; transition:background .15s, border-color .15s; }
#btnCancel:hover { background:#eef0f2; border-color:#cfd3d8; }

/* SPでは1カラム＆中央ボタン */
@media (max-width: 640px) {
  #confirmModal .modal-inner { width: min(96vw, 560px); }
  #confirmModal .modal-body .row { grid-template-columns: 1fr; }
  #confirmModal .modal-body .k { margin-bottom: 4px; }
  #confirmModal .modal-actions { justify-content: center; }
}


/* ===========================
   Result Modal（送信結果）
   =========================== */

#resultModal{
  position: fixed;
  inset: 0;
  display: none;            /* JSで .css('display','flex') */
  align-items: center;
  justify-content: center;
  z-index: 1001;            /* #backdrop(1000) より上 */
}

#resultModal .box{
  width: min(92vw, 920px);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 18px 60px rgba(0,0,0,.25);
  overflow: hidden;
  pointer-events: auto;     /* ボックス内はクリック可 */
}

/* 見出し＆本文 */
#resultModal h3{
  margin: 0;
  padding: 22px 28px 0;
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 700;
  color: #6d675f;
}
#resultModal #resultMsg{
  padding: 16px 28px 8px;
  font-size: clamp(16px, 1.8vw, 18px);
  line-height: 1.9;
}

/* ボタン行＆ボタン（潰れ防止・中央寄せもOK） */
#resultModal .btns{
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  padding: 16px 24px 24px;
  box-sizing: border-box;
}
#resultModal .btn,
#btnCloseResult{
  min-width: 168px;         /* ← 幅を確保（潰れ防止） */
  height: 48px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 18px;
  font-weight: 600;
  border-radius: 8px;
  white-space: nowrap;
  box-sizing: border-box;
  -webkit-appearance: none;
}

/* 配色：閉じるを黒ボタンに統一 */
#btnCloseResult{
  background: #111;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background .15s, box-shadow .15s;
}
#btnCloseResult:hover{
  background: #333;
  box-shadow: 0 6px 16px rgba(0,0,0,.18);
}

/* SPでは横幅広め＆中央配置にしてもOK */
@media (max-width: 640px){
  #resultModal .box{ width: min(96vw, 560px); }
  #resultModal .btns{ justify-content: center; }
}