/* 04 取扱申込フォーム —— このページ専用の差分
   デザイン案どおりの入力欄・チェックボックス・ラジオ・ボタンを本物のフォーム部品で実装する。
   送信先が未定のため <form> に action は付けず、ボタンは type="button"。 */

/* ===== ステップの現在地（見出し帯の下の4マス） ===== */
.step-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--border);
  border: 1px solid var(--border);
}
.step-nav__item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 20px 24px;
  background: var(--surface-alt);
}
.step-nav__num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--text-faint);
}
.step-nav__name { font-size: 14px; line-height: 1.6; color: var(--text-muted); }
/* 現在のステップ。金の下罫で示す */
.step-nav__item--current {
  background: var(--surface);
  border-bottom: 2px solid var(--gold);
}
.step-nav__item--current .step-nav__num { color: var(--gold); }
.step-nav__item--current .step-nav__name { color: var(--text-strong); }

/* ===== フォーム本体の器（デザイン案の中央840pxカラム） ===== */
.apply-form-section { padding-block: 56px 72px; }
.form-body {
  display: flex;
  flex-direction: column;
  gap: 48px;
  max-width: 840px;
  margin-inline: auto;
}

/* ===== 各ステップ ===== */
.form-step {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}
.form-step__head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  min-width: 0;
}
.form-step__num {
  flex: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--gold);
}
.form-step__title { font-size: 22px; }
.form-step__rule {
  flex: 1 1 auto;
  height: 1px;
  background: var(--border);
}
.form-step__note {
  font-size: 12.5px;
  line-height: 1.95;
  color: var(--text-muted);
}

/* ===== 入力欄 =====
   素の見た目は components.css の .field / .field__label / .field__input。
   ここはアートボード04に合わせた差分だけ。 */
.field__input {
  margin: 0;
  padding: 15px 16px;
  appearance: none;
}
.field__input::placeholder {
  color: var(--field-placeholder);
  opacity: 1;
}
textarea.field__input {
  min-height: 160px;
  line-height: 2;
  resize: vertical;
}
.field__input:hover { border-color: var(--gold-light); }

/* 入力欄の並べ方。--zip は郵便番号を短い列に、--half は2等分 */
.field-grid {
  display: grid;
  gap: 20px;
  min-width: 0;
}
.field-grid--zip { grid-template-columns: minmax(0, 220px) minmax(0, 1fr); }
.field-grid--half { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ===== チェックボックスの行 ===== */
.check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  font-size: 13.5px;
  line-height: 1.95;
  color: var(--text-strong);
  cursor: pointer;
}
.check__box {
  flex: none;
  width: 17px;
  height: 17px;
  margin: 4px 0 0;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--gold);
  border-radius: 0;
  appearance: none;
  cursor: pointer;
}
/* チェック時は金で塗り、内側に地色のふちを残して「入っている」ことを示す */
.check__box:checked {
  background: var(--gold);
  box-shadow: inset 0 0 0 3px var(--surface);
}
.check__text { min-width: 0; }
/* 同意行のリンクは前後の文と同じ大きさで、金罫を文字の直下に置く
   （.link-underline の inline-block だと行高のぶん罫が下に離れてしまう） */
.check__text .link-underline {
  display: inline;
  font-size: inherit;
  letter-spacing: normal;
  padding-bottom: 2px;
}

/* ===== 択一の選択肢（複数店舗の一括決済 なし／あり） ===== */
.option-list {
  display: flex;
  gap: 16px;
  min-width: 0;
}
.option-list__item {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 0;
  min-width: 0;
  padding: 18px 20px;
  background: var(--surface-bright);
  border: 1px solid var(--border-cool);
  cursor: pointer;
}
.option-list__radio {
  flex: none;
  width: 15px;
  height: 15px;
  margin: 0;
  padding: 0;
  background: var(--surface-bright);
  border: 1px solid var(--text-faint);
  border-radius: 50%;
  appearance: none;
  cursor: pointer;
}
.option-list__radio:checked {
  background: var(--surface);
  border: 4px solid var(--gold);
}
/* 選ばれている側は枠も金に */
.option-list__item:has(.option-list__radio:checked) { border-color: var(--gold); }
.option-list__label { font-size: 14px; color: var(--text-strong); }
.option-list__desc {
  margin-left: auto;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-muted);
  text-align: right;
}

/* ===== 一括決済の詳細枠（共通の .note-box--alt の中身） ===== */
.note-box__text--top-rule {
  font-size: 13px;
  line-height: 1.95;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

/* ===== 送信ブロック ===== */
.form-foot {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  border-top: 1px solid var(--border);
  padding-top: 36px;
}
.form-foot__actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  min-width: 0;
}
/* .btn を button 要素で使うためのリセット */
.form-foot__actions .btn {
  font-family: inherit;
  border-radius: 0;
  appearance: none;
  cursor: pointer;
}
.form-foot__actions .btn--primary {
  padding: 18px 44px;
  border: none;
}
.form-foot__note {
  min-width: 0;
  max-width: 300px;
  margin-left: 8px;
  font-size: 12.5px;
  line-height: 1.9;
  color: var(--text-muted);
}

/* ===== キーボード操作時のフォーカス表示 ===== */
.field__input:focus-visible,
.check__box:focus-visible,
.option-list__radio:focus-visible,
.form-foot__actions .btn:focus-visible,
.check__text .link-underline:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
/* ラジオは丸いのでアウトラインも丸く */
.option-list__radio:focus-visible { outline-offset: 3px; }

/* ===================== タブレット ===================== */
@media (max-width: 1024px) {
  .apply-form-section { padding-block: 44px 56px; }
  .form-body { gap: 40px; }
  .field-grid { gap: 16px; }
  .field-grid--zip { grid-template-columns: minmax(0, 180px) minmax(0, 1fr); }
  .form-foot__note { max-width: none; margin-left: 0; }
}

/* ===================== スマホ（SPアートボード390px） ===================== */
@media (max-width: 767px) {
  /* ステップの現在地 */
  .step-nav__item { gap: 6px; padding: 12px 10px; }
  .step-nav__num { font-size: 9.5px; letter-spacing: .06em; }
  .step-nav__num-prefix { display: none; }
  .step-nav__name { font-size: 10.5px; line-height: 1.5; }
  .step-nav__name-opt { display: none; }

  /* フォーム本体 */
  .apply-form-section { padding: 28px 20px; }
  .form-body { gap: 32px; }

  .form-step { gap: 16px; }
  .form-step__head { gap: 12px; }
  .form-step__num { font-size: 10px; }
  .form-step__title { font-size: 18px; }
  .form-step__rule { display: none; }
  .form-step__note { font-size: 12px; }

  /* 入力欄は1列に積む */
  .field__input { padding: 14px; }
  .field--zip .field__input { max-width: 180px; }
  .field-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .field-grid--zip,
  .field-grid--half { grid-template-columns: minmax(0, 1fr); }

  .check { gap: 10px; font-size: 13px; line-height: 1.9; }
  .check__box { width: 16px; height: 16px; margin-top: 3px; }

  .option-list { flex-direction: column; gap: 10px; }
  .option-list__item { gap: 10px; padding: 15px; }
  .option-list__radio { width: 14px; height: 14px; }
  .option-list__label { font-size: 13.5px; }
  .option-list__desc { font-size: 11.5px; }

  .note-box__text--top-rule { font-size: 12.5px; padding-top: 12px; }

  .form-foot { gap: 16px; padding-top: 24px; }
  .form-foot__actions { flex-direction: column; align-items: stretch; gap: 16px; }
  .form-foot__actions .btn { width: 100%; text-align: center; }
  .form-foot__actions .btn--primary { padding: 16px; }
  .form-foot__actions .btn--outline { padding: 15px; }
  .form-foot__note { max-width: none; margin-left: 0; font-size: 11.5px; line-height: 1.9; }
}
