@charset "utf-8";
/* SR経営サポート メールフォーム（GitHub の画面に近い、落ち着いた見た目）
   入力ページ（既存の表組みのページの中）と、確認・完了画面（layout.php）の両方で使う */
.mf {
  --mf-fg: #1f2328;
  --mf-muted: #59636e;
  --mf-border: #d1d9e0;
  --mf-border-muted: #d8dee4;
  --mf-bg: #ffffff;
  --mf-bg-subtle: #f6f8fa;
  --mf-accent: #0969da;
  --mf-success: #1f883d;
  --mf-success-hover: #1c8139;
  --mf-danger: #d1242f;
  --mf-danger-bg: #ffebe9;
  --mf-radius: 6px;
  box-sizing: border-box;
  max-width: 640px;
  margin: 0 auto;
  color: var(--mf-fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  text-align: left;
}
.mf *, .mf *::before, .mf *::after { box-sizing: border-box; }

/* 段階表示 */
.mf-steps { display: flex; gap: 8px; list-style: none; margin: 0 0 16px; padding: 0; }
.mf-steps li {
  flex: 1; display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border: 1px solid var(--mf-border); border-radius: var(--mf-radius);
  background: var(--mf-bg-subtle); color: var(--mf-muted); font-size: 13px;
}
.mf-step-no {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid var(--mf-border); background: var(--mf-bg); font-size: 12px; font-weight: 600;
}
.mf-steps li.is-current { border-color: var(--mf-accent); background: #ddf4ff; color: var(--mf-fg); font-weight: 600; }
.mf-steps li.is-current .mf-step-no { border-color: var(--mf-accent); background: var(--mf-accent); color: #fff; }
.mf-steps li.is-done .mf-step-no { border-color: var(--mf-success); background: var(--mf-success); color: #fff; }

/* 枠（GitHub の Box） */
.mf-box { border: 1px solid var(--mf-border); border-radius: var(--mf-radius); background: var(--mf-bg); overflow: hidden; }
.mf-box-header { padding: 16px; border-bottom: 1px solid var(--mf-border); background: var(--mf-bg-subtle); }
.mf-box-body { padding: 16px; }
.mf-title { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.5; color: var(--mf-fg); background: none; border: 0; padding: 0; }
.mf-lead { margin: 4px 0 0; color: var(--mf-muted); }
.mf-tel { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; margin: 8px 0 0; color: var(--mf-muted); }
.mf-tel a { color: var(--mf-accent); font-weight: 600; text-decoration: none; }
.mf-tel a:hover { text-decoration: underline; }

/* 入力欄 */
.mf-field { margin: 0 0 16px; }
.mf-label, .mf-legend { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; padding: 0; font-weight: 600; font-size: 14px; color: var(--mf-fg); }
.mf-badge { display: inline-block; padding: 0 7px; border: 1px solid transparent; border-radius: 2em; font-size: 12px; font-weight: 500; line-height: 18px; }
.mf-badge.req { border-color: rgba(209, 36, 47, .4); color: var(--mf-danger); }
.mf-badge.opt { border-color: var(--mf-border); color: var(--mf-muted); }
.mf input[type="text"], .mf input[type="tel"], .mf input[type="email"], .mf textarea {
  display: block; width: 100%; max-width: 100%; margin: 0;
  padding: 5px 12px; min-height: 32px;
  border: 1px solid var(--mf-border); border-radius: var(--mf-radius);
  background: var(--mf-bg); color: var(--mf-fg);
  font: inherit; font-size: 14px; line-height: 20px;
  box-shadow: inset 0 1px 0 rgba(208, 215, 222, .2);
  transition: border-color .08s, box-shadow .08s;
}
.mf textarea { min-height: 160px; resize: vertical; }
.mf input::placeholder, .mf textarea::placeholder { color: #818b98; }
.mf input:focus, .mf textarea:focus { outline: none; border-color: var(--mf-accent); box-shadow: inset 0 0 0 1px var(--mf-accent); }
.mf-hint { margin: 4px 0 0; color: var(--mf-muted); font-size: 12px; }
.mf-err { margin: 4px 0 0; color: var(--mf-danger); font-size: 12px; min-height: 0; }
.mf-err:empty { display: none; }
.mf-field.is-invalid input, .mf-field.is-invalid textarea { border-color: var(--mf-danger); }
.mf-field.is-invalid input:focus, .mf-field.is-invalid textarea:focus { box-shadow: inset 0 0 0 1px var(--mf-danger); }

/* 選択肢 */
.mf fieldset.mf-field { border: 0; padding: 0; min-width: 0; }
.mf-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mf-choice { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--mf-border); border-radius: var(--mf-radius); background: var(--mf-bg); cursor: pointer; font-size: 14px; }
.mf-choice:hover { background: var(--mf-bg-subtle); }
.mf-choice input { margin: 0; accent-color: var(--mf-accent); width: 16px; height: 16px; flex: none; }
.mf-choice:has(input:checked) { border-color: var(--mf-accent); background: #ddf4ff; }
.mf-choice:has(input:focus-visible) { outline: 2px solid var(--mf-accent); outline-offset: 1px; }
.mf-field.is-invalid .mf-choice { border-color: rgba(209, 36, 47, .5); }

.mf-privacy { margin: 0 0 16px; padding: 8px 12px; border-radius: var(--mf-radius); background: var(--mf-bg-subtle); color: var(--mf-muted); font-size: 12px; }

/* ボタン（GitHub の Button） */
.mf-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; align-items: center; }
.mf-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 32px; padding: 5px 16px;
  border: 1px solid var(--mf-border); border-radius: var(--mf-radius);
  background: var(--mf-bg-subtle); color: var(--mf-fg);
  font: inherit; font-size: 14px; font-weight: 500; line-height: 20px;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  box-shadow: 0 1px 0 rgba(31, 35, 40, .04);
  transition: background-color .08s;
}
.mf-btn:hover { background: #eff2f5; text-decoration: none; color: var(--mf-fg); }
.mf-btn:focus-visible { outline: 2px solid var(--mf-accent); outline-offset: -2px; }
.mf-btn.primary { border-color: rgba(31, 35, 40, .15); background: var(--mf-success); color: #fff; font-weight: 600; }
.mf-btn.primary:hover { background: var(--mf-success-hover); color: #fff; }
.mf-btn:disabled { cursor: default; opacity: .65; }
.mf-spin { display: none; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: mf-spin .7s linear infinite; }
.mf-btn.is-busy .mf-spin { display: inline-block; }
@keyframes mf-spin { to { transform: rotate(360deg); } }

/* 確認画面 */
.mf-review { margin: 0; }
.mf-review > div { display: grid; grid-template-columns: 200px 1fr; border-bottom: 1px solid var(--mf-border-muted); }
.mf-review dt { padding: 12px 16px; background: var(--mf-bg-subtle); color: var(--mf-muted); font-weight: 600; font-size: 13px; }
.mf-review dd { margin: 0; padding: 12px 16px; word-break: break-word; }
.mf-review dd.empty { color: #818b98; }
.mf-send { padding: 16px; }

/* エラーと完了 */
.mf-alert { margin: 0 0 16px; padding: 12px 16px; border: 1px solid rgba(209, 36, 47, .4); border-radius: var(--mf-radius); background: var(--mf-danger-bg); color: var(--mf-fg); }
.mf-alert ul { margin: 8px 0 0; padding-left: 20px; }
.mf-done { text-align: center; padding: 32px 16px; }
.mf-done .mf-actions, .mf-done .mf-tel { justify-content: center; }
.mf-done .mf-lead { margin: 8px 0 0; }
.mf-done-icon { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; margin-bottom: 12px; border-radius: 50%; background: #dafbe1; color: var(--mf-success); font-size: 24px; font-weight: 700; }

/* 確認・完了画面だけで使う外枠 */
body.mf-page { margin: 0; background: #f6f8fa; }
.mf-header { background: #fff; border-bottom: 1px solid #d1d9e0; }
.mf-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 960px; margin: 0 auto; padding: 12px 16px; }
.mf-brand { display: flex; flex-direction: column; gap: 2px; color: #1f2328; text-decoration: none; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", Meiryo, sans-serif; font-size: 13px; font-weight: 600; }
.mf-brand img { display: block; max-width: 100%; height: auto; }
.mf-header-tel { color: #0969da; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 18px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.mf-main { padding: 24px 16px 40px; }
.mf-footer { padding: 16px; border-top: 1px solid #d1d9e0; background: #fff; color: #59636e; text-align: center; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", Meiryo, sans-serif; font-size: 12px; }

@media (max-width: 560px) {
  .mf-choices { grid-template-columns: 1fr; }
  .mf-review > div { grid-template-columns: 1fr; }
  .mf-review dt { padding: 8px 16px 4px; }
  .mf-review dd { padding: 4px 16px 12px; }
  .mf-actions { flex-direction: column-reverse; align-items: stretch; }
  .mf-btn { width: 100%; }
  .mf-steps li { padding: 6px 8px; font-size: 12px; }
  .mf-header-tel { font-size: 15px; }
  .mf-brand img { width: 220px; }
}
