/* ユタカ防災 メールフォーム（入力・確認・エラー・完了の各画面で共通） */
.mf {
  --mf-navy: #101732;
  --mf-navy-2: #1f2b5c;
  --mf-red: #b81924;
  --mf-red-dark: #961420;
  --mf-text: #1f2433;
  --mf-sub: #5b6275;
  --mf-line: #cdd3e1;
  --mf-bg-soft: #f3f5fa;
  --mf-ok: #1d7a4c;
  box-sizing: border-box;
  max-width: 800px;
  margin: 8px auto 0;
  padding: 40px 48px 44px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
  color: var(--mf-text);
  text-align: left;
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", YuGothic, Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.8;
}
.mf *, .mf *::before, .mf *::after { box-sizing: border-box; }
.mf p { margin: 0; }

/* 入力 → 確認 → 完了 の段階表示 */
.mf-steps {
  display: flex;
  gap: 8px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
  counter-reset: mfstep;
}
.mf-steps li {
  flex: 1;
  position: relative;
  padding: 10px 4px 0;
  border-top: 4px solid var(--mf-line);
  color: var(--mf-sub);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  counter-increment: mfstep;
}
.mf-steps li::before {
  content: counter(mfstep);
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--mf-line);
  color: #fff;
  font-size: 13px;
  vertical-align: 1px;
}
.mf-steps li.is-done { border-color: var(--mf-navy-2); color: var(--mf-navy-2); }
.mf-steps li.is-done::before { content: "✓"; background: var(--mf-navy-2); }
.mf-steps li.is-current { border-color: var(--mf-red); color: var(--mf-red); }
.mf-steps li.is-current::before { background: var(--mf-red); }

.mf-title {
  margin: 0 0 12px;
  color: var(--mf-navy);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.5;
}
.mf-lead { margin-bottom: 20px !important; color: var(--mf-sub); }

/* お電話の案内 */
.mf-tel {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0 0 28px;
  padding: 14px 18px;
  border-radius: 10px;
  background: var(--mf-bg-soft);
  font-size: 14px;
}
.mf-tel a {
  color: var(--mf-navy);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .03em;
  text-decoration: none;
}
.mf-tel a:hover { text-decoration: underline; }

/* 入力欄 */
.mf-field { margin: 0 0 22px; }
.mf-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-weight: 700;
}
.mf-badge {
  display: inline-block;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  line-height: 22px;
}
.mf-badge.req { background: var(--mf-red); color: #fff; }
.mf-badge.opt { background: #e4e7ef; color: var(--mf-sub); }

.mf input[type="text"],
.mf input[type="tel"],
.mf input[type="email"],
.mf textarea {
  display: block;
  width: 100%;
  margin: 0;
  padding: 12px 14px;
  border: 1.5px solid var(--mf-line);
  border-radius: 8px;
  background: #fff;
  color: var(--mf-text);
  font: inherit;
  font-size: 16px; /* iPhone で入力時に拡大されない大きさ */
  line-height: 1.6;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
  appearance: none;
}
.mf textarea { min-height: 180px; resize: vertical; }
.mf input::placeholder, .mf textarea::placeholder { color: #a3a9b8; }
.mf input:hover, .mf textarea:hover { border-color: #aab2c7; }
.mf input:focus, .mf textarea:focus {
  outline: none;
  border-color: var(--mf-navy-2);
  box-shadow: 0 0 0 4px rgba(31, 43, 92, .15);
}
.mf-hint { margin-top: 4px !important; color: var(--mf-sub); font-size: 13px; }
.mf-err { display: none; margin-top: 6px !important; color: var(--mf-red); font-size: 14px; font-weight: 600; }
.mf-err::before { content: "！"; margin-right: 2px; }
.mf-field.is-invalid input,
.mf-field.is-invalid textarea { border-color: var(--mf-red); background: #fff7f7; }
.mf-field.is-invalid input:focus,
.mf-field.is-invalid textarea:focus { box-shadow: 0 0 0 4px rgba(184, 25, 36, .15); }
.mf-field.is-invalid .mf-err { display: block; }
.mf-field.is-valid input,
.mf-field.is-valid textarea { border-color: #8cc5a7; }

.mf-privacy {
  margin: 8px 0 28px !important;
  padding: 14px 18px;
  border-left: 4px solid var(--mf-navy-2);
  background: var(--mf-bg-soft);
  color: var(--mf-sub);
  font-size: 14px;
}

/* ボタン */
.mf-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
}
.mf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 240px;
  min-height: 56px;
  margin: 0;
  padding: 0 32px;
  border: 2px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s, transform .1s, box-shadow .15s;
  -webkit-appearance: none;
  appearance: none;
}
.mf-btn:active { transform: translateY(1px); }
.mf-btn:focus-visible { outline: 3px solid #f5b8bd; outline-offset: 2px; }
.mf-btn.primary { background: var(--mf-red); color: #fff; box-shadow: 0 4px 14px rgba(184, 25, 36, .35); }
.mf-btn.primary:hover { background: var(--mf-red-dark); }
.mf-btn.secondary { border-color: var(--mf-line); background: #fff; color: var(--mf-navy); }
.mf-btn.secondary:hover { border-color: var(--mf-navy-2); }
.mf-btn[disabled] { opacity: .65; cursor: wait; }
.mf-btn .mf-spin {
  display: none;
  width: 18px;
  height: 18px;
  border: 3px solid rgba(255, 255, 255, .45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: mf-spin .8s linear infinite;
}
.mf-btn.is-busy .mf-spin { display: inline-block; }
@keyframes mf-spin { to { transform: rotate(360deg); } }

/* 確認画面の一覧 */
.mf-review { margin: 0 0 28px; border-top: 1px solid #e4e7ef; }
.mf-review > div {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px;
  padding: 14px 4px;
  border-bottom: 1px solid #e4e7ef;
}
.mf-review dt { color: var(--mf-sub); font-size: 14px; font-weight: 700; }
.mf-review dd { margin: 0; word-break: break-word; }
.mf-review dd.empty { color: #a3a9b8; }

/* エラー画面 */
.mf-alert {
  margin: 0 0 28px;
  padding: 16px 20px 16px 24px;
  border: 1.5px solid #f0b6ba;
  border-radius: 10px;
  background: #fff5f5;
  color: var(--mf-red-dark);
}
.mf-alert ul { margin: 6px 0 0; padding-left: 1.2em; }

/* 完了画面 */
.mf-done { padding: 8px 0 4px; text-align: center; }
.mf-done-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #e6f4ec;
  color: var(--mf-ok);
  font-size: 36px;
  font-weight: 700;
}
.mf-done .mf-title { margin-bottom: 8px; }
.mf-done .mf-lead { max-width: 560px; margin: 0 auto 28px !important; }

/* 画面の狭い端末 */
@media (max-width: 1000px) {
  .mf { margin-left: 16px; margin-right: 16px; }
}
@media (max-width: 600px) {
  .mf { padding: 28px 20px 32px; border-radius: 12px; }
  .mf-title { font-size: 21px; }
  .mf-steps li { font-size: 12px; }
  .mf-steps li::before { display: block; margin: 0 auto 2px; }
  .mf-review > div { grid-template-columns: 1fr; gap: 2px; }
  .mf-actions { flex-direction: column-reverse; }
  .mf-btn { width: 100%; min-width: 0; }
}

/* サイトの CSS（お問い合わせ・求人ページの段落と最初の div の幅・余白）を打ち消す */
.contact #contents_01 #w1000 .mf p,
.recruitment #contents_03 #w1000 .mf p { width: auto; margin: 0; }
.contact #contents_01 #w1000 .mf .mf-lead,
.recruitment #contents_03 #w1000 .mf .mf-lead { margin-bottom: 20px; }
.contact #contents_01 #w1000 .mf .mf-tel,
.recruitment #contents_03 #w1000 .mf .mf-tel { margin-bottom: 28px; }
.contact #contents_01 #w1000 .mf .mf-privacy,
.recruitment #contents_03 #w1000 .mf .mf-privacy { margin: 8px 0 28px; }
.contact #contents_01 #w1000 div.mf,
.recruitment #contents_03 #w1000 div.mf { width: auto; max-width: 800px; margin: 8px auto 0; padding: 40px 48px 44px; border: 0; border-radius: 14px; }
@media (max-width: 1000px) {
  .contact #contents_01 #w1000 div.mf,
  .recruitment #contents_03 #w1000 div.mf { margin: 8px 16px 0; }
}
@media (max-width: 600px) {
  .contact #contents_01 #w1000 div.mf,
  .recruitment #contents_03 #w1000 div.mf { margin: 8px 0 0; padding: 28px 20px 32px; }
}
