@charset "UTF-8";
/* =========================================================
 * お問い合わせフォーム専用スタイル
 * - すべて #cf 配下に限定し、サイト共通CSS（ヘッダー・フッター側）の影響を受けにくくしている
 * - 色・サイズは下の変数を変えるだけで調整できる
 * - 640px 以下はスマホ用の1カラム表示
 * ======================================================= */
#cf {
  --cf-accent: #1f4e8c;
  --cf-accent-text: #fff;
  --cf-text: #222;
  --cf-muted: #666;
  --cf-border: #c4c9d0;
  --cf-line: #e3e6ea;
  --cf-bg: #fff;
  --cf-soft-bg: #f5f7f9;
  --cf-error: #c62828;
  --cf-error-bg: #fdeeee;
  --cf-required: #c62828;
  --cf-optional: #8a9099;
  --cf-radius: 6px;
  --cf-label-width: 14em;

  max-width: none; /* サイト本文の枠（.w1100）いっぱいに広げ、上の説明文と左端をそろえる */
  margin: 0;
  color: var(--cf-text);
  font-size: 16px;
  line-height: 1.7;
  text-align: left;
  letter-spacing: normal;
}
#cf *,
#cf *::before,
#cf *::after { box-sizing: border-box; }
#cf p,
#cf ul,
#cf dl,
#cf dt,
#cf dd,
#cf h2,
#cf h3 { margin: 0; padding: 0; }
#cf [hidden] { display: none !important; }

/* ---------- 見出し・説明 ---------- */
#cf .cf-title { margin: 0 0 16px; font-size: 1.4em; font-weight: bold; line-height: 1.4; text-align: center; }
#cf .cf-lead { margin: 0 0 24px; }
#cf .cf-message { margin: 0 0 24px; }
#cf .cf-message p + p { margin-top: 1em; }

/* ---------- エラー一覧 ---------- */
#cf .cf-alert {
  margin: 0 0 24px; padding: 16px 20px;
  color: var(--cf-error); background: var(--cf-error-bg);
  border: 1px solid var(--cf-error); border-radius: var(--cf-radius);
}
#cf .cf-alert:focus { outline: none; }
#cf .cf-alert-title { font-weight: bold; margin-bottom: 4px; }
#cf .cf-alert ul { padding-left: 1.4em; list-style: disc; }

/* ---------- 1項目（PC: ラベル左・入力右） ---------- */
#cf .cf-row {
  display: grid;
  grid-template-columns: var(--cf-label-width) minmax(0, 1fr);
  gap: 8px 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--cf-line);
}
#cf .cf-hp + .cf-row,
#cf .cf-confirm > .cf-row:first-child { border-top: 1px solid var(--cf-line); }
#cf .cf-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding-top: 10px; align-self: start; }
#cf .cf-label { font-weight: bold; line-height: 1.5; }
#cf .cf-body { min-width: 0; }
#cf .cf-badge {
  display: inline-block; padding: 1px 8px;
  font-size: 12px; font-weight: bold; line-height: 1.6; color: #fff;
  background: var(--cf-optional); border-radius: 3px; vertical-align: middle;
}
#cf .cf-badge.is-required { background: var(--cf-required); }
#cf .cf-note { margin-top: 6px; font-size: 13px; color: var(--cf-muted); }
#cf .cf-sublabel { display: block; margin: 12px 0 4px; font-size: 13px; color: var(--cf-muted); }
#cf .cf-error { margin-top: 6px; font-size: 14px; font-weight: bold; color: var(--cf-error); }
#cf .cf-error-summary { text-align: center; margin-top: 24px; }

/* ---------- 入力欄（サイト側の input スタイルを打ち消して統一） ---------- */
#cf .cf-input {
  display: block; width: 100%; max-width: 100%; height: auto; min-height: 48px;
  margin: 0; padding: 10px 12px; float: none;
  font: inherit; font-size: 16px; /* 16px 未満だと iOS で入力時に画面が拡大される */
  line-height: 1.5; color: var(--cf-text);
  background: var(--cf-bg); border: 1px solid var(--cf-border); border-radius: var(--cf-radius);
  box-shadow: none; outline: none;
  -webkit-appearance: none; appearance: none;
  transition: border-color .15s, box-shadow .15s;
}
#cf .cf-input::placeholder { color: #9aa0a6; opacity: 1; }
#cf .cf-input:focus { border-color: var(--cf-accent); box-shadow: 0 0 0 3px rgba(31, 78, 140, .2); }
#cf .cf-textarea { min-height: 10em; resize: vertical; }
#cf .cf-select {
  padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23666' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
#cf .is-error .cf-input,
#cf .is-error .cf-file { border-color: var(--cf-error); background-color: var(--cf-error-bg); }

/* ---------- エラー項目の目印（行全体を薄赤＋左に赤線、ラベルを赤字） ---------- */
#cf .cf-row.is-error,
#cf .cf-group:has(.cf-sub.is-error) {
  background: var(--cf-error-bg);
  box-shadow: inset 4px 0 0 var(--cf-error);
  padding-left: 16px; padding-right: 16px;
}
#cf .cf-row.is-error .cf-label,
#cf .cf-group:has(.cf-sub.is-error) > .cf-head .cf-label,
#cf .cf-sub.is-error .cf-sublabel-inline { color: var(--cf-error); }
#cf .cf-row.is-error .cf-label::before,
#cf .cf-group:has(.cf-sub.is-error) > .cf-head .cf-label::before { content: "⚠ "; }
#cf .is-error .cf-choices,
#cf .is-error .cf-turnstile { outline: 2px solid var(--cf-error); outline-offset: 4px; border-radius: 2px; }
#cf .cf-alert a { color: inherit; text-decoration: underline; }

/* ---------- ラジオ・チェックボックス ---------- */
#cf .cf-choices { display: flex; flex-wrap: wrap; gap: 4px 24px; }
#cf .cf-choice {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; margin: 0; padding: 0; cursor: pointer; font-weight: normal;
}
#cf .cf-choice input {
  display: inline-block; position: static; flex: none;
  width: 22px; height: 22px; margin: 0; opacity: 1; visibility: visible;
  -webkit-appearance: auto; appearance: auto; accent-color: var(--cf-accent);
}
#cf .cf-choice span { display: inline; }
#cf .cf-choice-small { min-height: 32px; margin-left: 12px; font-size: 14px; }
#cf .cf-choice-small input { width: 18px; height: 18px; }

/* ---------- 添付ファイル ---------- */
#cf .cf-file {
  display: block; width: 100%; max-width: 100%; padding: 10px;
  font: inherit; font-size: 15px;
  background: var(--cf-soft-bg); border: 1px dashed var(--cf-border); border-radius: var(--cf-radius);
}
#cf .cf-attached { margin-bottom: 8px; font-size: 14px; }

/* ---------- 画像認証 ---------- */
#cf .cf-turnstile { min-height: 65px; max-width: 100%; }
#cf .cf-turnstile iframe { max-width: 100%; }
#cf .cf-btn-small {
  min-height: 40px; padding: 6px 14px; margin: 0;
  font: inherit; font-size: 14px; color: var(--cf-text); cursor: pointer;
  background: var(--cf-soft-bg); border: 1px solid var(--cf-border); border-radius: var(--cf-radius);
}

/* ---------- プライバシーポリシー ---------- */
#cf .cf-policy {
  max-height: 240px; overflow-y: auto; -webkit-overflow-scrolling: touch;
  margin: 32px 0 0; padding: 16px 20px;
  font-size: 14px; line-height: 1.8;
  background: var(--cf-soft-bg); border: 1px solid var(--cf-line); border-radius: var(--cf-radius);
}
#cf .cf-policy-title { margin-bottom: 8px; font-size: 16px; font-weight: bold; }
#cf .cf-policy-list dt { margin-top: 12px; font-weight: bold; }
#cf .cf-policy-list ol { margin: 4px 0 0; padding-left: 1.6em; list-style: decimal; }

/* ---------- 確認画面 ---------- */
#cf .cf-confirm .cf-head { padding-top: 0; }
#cf .cf-value { word-break: break-word; overflow-wrap: anywhere; }
#cf .cf-empty { color: var(--cf-muted); }

/* ---------- ボタン ---------- */
#cf .cf-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-top: 32px; }
#cf .cf-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 14em; min-height: 54px; margin: 0; padding: 12px 32px;
  font: inherit; font-size: 16px; font-weight: bold; line-height: 1.4; text-align: center; text-decoration: none;
  color: var(--cf-accent); background: var(--cf-bg);
  border: 2px solid var(--cf-accent); border-radius: 999px;
  cursor: pointer; transition: opacity .15s, background-color .15s;
  -webkit-appearance: none; appearance: none;
}
#cf .cf-btn-primary { color: var(--cf-accent-text); background: var(--cf-accent); }
#cf .cf-btn:hover { opacity: .85; }
#cf .cf-btn:focus-visible,
#cf .cf-btn-small:focus-visible,
#cf .cf-choice input:focus-visible { outline: 3px solid rgba(31, 78, 140, .4); outline-offset: 2px; }
#cf .cf-btn:disabled { opacity: .6; cursor: wait; }

/* ---------- ボット対策用（画面外に隠す） ---------- */
#cf .cf-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* =========================================================
 * サイト既存のテーブル（.com_table）風の見た目
 * - 罫線 #dfdfdf・余白 30px・項目名列 25%・縦の区切り線・「必須」は項目名の右端
 * ======================================================= */
#cf {
  --cf-accent: #da3915;
  --cf-required: #da3915;
  --cf-line: #dfdfdf;
  --cf-radius: 0;
}
#cf .cf-row {
  grid-template-columns: 25% minmax(0, 1fr);
  gap: 0;
  padding: 0;
  border-bottom: 1px solid var(--cf-line);
}
#cf .cf-head,
#cf .cf-confirm .cf-head {
  flex-wrap: nowrap; justify-content: space-between; align-items: center; align-self: stretch;
  padding: 30px;
}
#cf .cf-body {
  align-self: stretch;
  padding: 30px;
  border-left: 1px solid var(--cf-line);
}
#cf .cf-badge { flex: none; border-radius: 0; padding: 0 10px; font-weight: normal; }
#cf .cf-badge.is-optional { display: none; } /* 旧フォームと同じく任意項目にはラベルを付けない */
#cf .cf-lead .cf-badge { padding: 1px 10px; }

/* まとめた行（fields.php の group）: 住所・最終学歴など */
#cf .cf-group .cf-head { gap: 10px; }
#cf .cf-sub + .cf-sub { margin-top: 10px; }
#cf .cf-sub { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 4px 8px; }
#cf .cf-sub .cf-sub-body { flex: 1 1 260px; min-width: 0; }
#cf .cf-sublabel-inline { flex: none; padding-top: 12px; white-space: nowrap; font-weight: normal; }
#cf .cf-input:focus { box-shadow: 0 0 0 3px rgba(218, 57, 21, .15); }

/* =========================================================
 * スマホ（640px 以下）: 1カラム・ボタン全幅
 * ======================================================= */
@media (max-width: 640px) {
  #cf { font-size: 15px; }
  #cf .cf-title { font-size: 1.25em; }
  #cf .cf-row { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0; }
  #cf .cf-head,
  #cf .cf-confirm .cf-head { justify-content: flex-start; gap: 10px; padding: 16px 0 8px; }
  #cf .cf-body { padding: 0 0 16px; border-left: none; }
  #cf .cf-choices { flex-direction: column; gap: 0; }
  #cf .cf-policy { max-height: 200px; padding: 12px 14px; font-size: 13px; }
  #cf .cf-actions { flex-direction: column-reverse; gap: 12px; }
  #cf .cf-btn { width: 100%; min-width: 0; }
}
