/* 「食の人」フォーム共通スタイル（本体サイト shoku-no-hito.com の白×黒・明朝体のデザインに合わせる） */
:root {
  --ink: #111;
  --sub: #686868;
  --line: #c1c1c1;
  --rule: #e6e6e6;
  --error: #b3261e;
  /* 送信ボタン：押す前は濃い青地に白文字、送信中・送信後は薄い青にする */
  --submit-bg: #5cbae6;
  --submit-bg-hover: #4aa9d6;
  --submit-bg-sending: #bce0f2;
  /* 角の丸み（入力欄・ボタン・枠をすべてこれに揃える） */
  --radius: 4px;
  /* 見出し：さくらぎ蛍雪（モリサワWebフォント。「口福」プロジェクトに form.shoku-no-hito.com を登録済み） */
  --brand-font: 'mfw-psakurakeisetsustdn-medium', 'Noto Serif JP', serif;
  /* 本文・入力欄もさくらぎ蛍雪（ご要望）。読み込み中や万一文字が欠けたときは Noto Serif JP で表示する */
  --body-font: 'mfw-psakurakeisetsustdn-medium', 'Noto Serif JP', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
}

/*
 * LINEから開くページ（/start/ ・ /entry/）は、LINEのトーク画面と同じゴシック体にする。
 * お店向けフォーム（/job/）は、本体サイトに合わせてさくらぎ蛍雪のまま。
 */
body.sans {
  --brand-font: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', 'Yu Gothic', system-ui, sans-serif;
  --body-font: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', 'Yu Gothic', system-ui, sans-serif;
  letter-spacing: .02em;
}
body.sans .page-title h1 { letter-spacing: .12em; }
body.sans section h2 { letter-spacing: .08em; }
body.sans .submit-btn { letter-spacing: .08em; }
body.sans .thanks h2 { letter-spacing: .04em; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--body-font);
  font-size: 15px;
  line-height: 1.9;
  letter-spacing: .04em;
}
a { color: inherit; }
[hidden] { display: none !important; }

/* ---- ヘッダー・フッター ---- */
.site-header { display: flex; justify-content: center; padding: 28px 20px 22px; border-bottom: 1px solid var(--rule); }
.site-header img { display: block; width: 150px; height: auto; }
.site-footer { border-top: 1px solid var(--rule); text-align: center; padding: 28px 20px 44px; font-size: 12px; color: var(--sub); }
.site-footer a { text-decoration: none; }

/* ---- ページ ---- */
.page { max-width: 680px; margin: 0 auto; padding: 44px 20px 72px; }
.page-title { text-align: center; margin-bottom: 36px; }
.page-title h1 { font-family: var(--brand-font); font-weight: 500; font-size: 30px; letter-spacing: .24em; margin: 0 0 14px; }
.lead { color: var(--sub); font-size: 13px; line-height: 2; margin: 0; }

section { padding: 32px 0; border-top: 1px solid var(--rule); }
section:first-of-type { border-top: none; padding-top: 4px; }
section h2 { font-family: var(--brand-font); font-weight: 500; font-size: 20px; letter-spacing: .16em; margin: 0 0 18px; }
section h2 .note { font-family: var(--body-font); letter-spacing: .02em; }

/* ---- 入力欄 ---- */
label, .label { display: block; font-size: 15px; margin: 18px 0 6px; }
section h2 + label, section h2 + .row2 label, section h2 + .row3 label { margin-top: 0; }
input, select, textarea {
  width: 100%;
  font: inherit;
  font-size: 16px; /* 16px未満だとiPhoneで入力時に画面が拡大されるため */
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 12px;
  transition: border-color .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); }
textarea { resize: vertical; line-height: 1.8; }
::placeholder { color: #b5b5b5; }

select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23111' stroke-width='1.1'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 10px;
  padding-right: 32px;
}
/* 生年月日・年表の年月は矢印なし（ご要望） */
select.no-arrow { background-image: none; padding-right: 12px; text-align-last: center; }

.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 10px; }
/* 年・月・日の単位を枠の中の右端に表示する（数字は単位を除いた部分の中央）。
   単位の文字はクリックを邪魔しないようにし、枠を押せば選択肢が開くようにする */
.unit-select { position: relative; }
.unit-select select.no-arrow { padding-right: 32px; }
.unit-select .unit {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  color: var(--sub);
  pointer-events: none;
}

.radio-row, .check-row { display: flex; flex-wrap: wrap; gap: 0 22px; }
.radio-row label, .check-row label, label.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
  font-size: 15px;
  cursor: pointer;
}
.radio-row input, .check-row input, label.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); }
label.check { margin-top: 18px; }

.note { font-size: 13px; color: var(--sub); }
.hint { font-size: 13px; color: var(--sub); margin: 6px 0 0; }
.sub-box { border-left: 2px solid var(--rule); padding-left: 14px; margin-top: 10px; }
.sub-box label:first-child { margin-top: 4px; }

/* ---- 年表（学歴・職歴・免許資格） ---- */
.entries { width: 100%; border-collapse: collapse; }
.entries th { font-weight: 400; font-size: 12px; color: var(--sub); text-align: left; padding: 0 4px 4px; }
.entries td { padding: 4px; vertical-align: middle; }
.entries .col-year { width: 100px; }
.entries .col-month { width: 72px; }
.entries .unit-select .unit { right: 9px; font-size: 14px; }
.entries .col-del { width: 34px; text-align: center; }
.entries select, .entries input { padding: 9px 6px; font-size: 16px; }
.del-btn { background: none; border: none; color: var(--sub); font-size: 20px; line-height: 1; padding: 4px; cursor: pointer; }
.add-btn {
  margin-top: 10px;
  background: #fff;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  letter-spacing: .1em;
  padding: 7px 18px;
  cursor: pointer;
}

.counter { font-size: 12px; color: var(--sub); text-align: right; margin-top: 6px; }
.counter.over { color: var(--error); }

/* ---- 顔写真 ---- */
/* ブラウザ標準の「ファイルを選択」はフォントを変えられないため、見た目だけ隠して自前のボタンを押させる
   （display:none にするとキーボード操作・読み上げで使えなくなるので、画面外に小さく残す） */
.file-picker { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; margin-top: 14px; }
.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.file-btn {
  display: inline-block;
  margin: 0;
  padding: 9px 22px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: #fff;
  font-size: 14px;
  letter-spacing: .1em;
  cursor: pointer;
}
.file-input:focus-visible + .file-btn { outline: 2px solid var(--ink); outline-offset: 2px; }
.file-name { font-size: 13px; color: var(--sub); word-break: break-all; }
#photoPreview { display: block; width: 120px; margin-top: 12px; border: 1px solid var(--rule); border-radius: var(--radius); }

/* ---- 給与の表示例・小さなボタン ---- */
.preview { font-size: 13px; margin-top: 6px; min-height: 1.4em; }
.inline-btn { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); font: inherit; font-size: 12px; padding: 0 10px; margin-left: 10px; cursor: pointer; }

/* ---- 利用規約 ---- */
.terms {
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: #fff;
  padding: 14px 16px;
  font-size: 12px;
  line-height: 1.9;
  -webkit-overflow-scrolling: touch;
}
.terms h3 { font-family: var(--brand-font); font-weight: 500; font-size: 14px; margin: 16px 0 4px; }
.terms h3:first-child { margin-top: 0; }
.terms p { margin: 2px 0; }

/* ---- エラー・送信・完了 ---- */
.msg {
  margin: 0 0 28px;
  padding: 14px 16px;
  border-left: 3px solid var(--error);
  border-radius: var(--radius);
  background: #fdf6f5;
  color: var(--error);
  font-size: 14px;
  white-space: pre-wrap;
}
.submit-btn {
  display: block;
  width: 100%;
  margin-top: 36px;
  background: var(--submit-bg);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: var(--brand-font);
  font-size: 18px;
  letter-spacing: .3em;
  padding: 18px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.submit-btn:hover { background: var(--submit-bg-hover); }
.submit-btn:disabled { background: var(--submit-bg-sending); color: #fff; cursor: default; }
/* 送信中の進み具合バー。実際の進捗は分からないため、通常の所要時間（4〜6秒）で9割まで伸ばし、
   完了した時点で満タンにする（.done）。文字はバーより上に表示する */
.submit-btn .btn-label { position: relative; z-index: 1; }
.submit-btn::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0;
  background: linear-gradient(90deg, #8ecbed, #5cbae6);
}
.submit-btn.sending:disabled { background: var(--submit-bg-sending); color: #fff; }
.submit-btn.sending::before { width: 90%; transition: width 6s cubic-bezier(.2, .7, .3, 1); }
.submit-btn.done::before { width: 100%; transition: width .3s ease-out; }
.sending-note { text-align: center; font-size: 13px; color: var(--sub); margin: 12px 0 0; }
.privacy { text-align: center; margin-top: 14px; }

.thanks { text-align: center; padding: 40px 0 24px; }
/* 完了画面の見出し。画面幅が狭くても1行に収まるよう、文字の大きさと字間を画面幅に合わせる */
.thanks h2 { font-family: var(--brand-font); font-weight: 500; font-size: clamp(18px, 5.2vw, 24px); letter-spacing: .06em; margin: 0 0 18px; white-space: nowrap; }
.thanks p { margin: 0 0 8px; }

/* 迷惑な自動送信よけ（人には見えない欄） */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 480px) {
  .page { padding: 32px 18px 56px; }
  .page-title h1 { font-size: 26px; }
  .row2.stack-sm { grid-template-columns: 1fr; gap: 0; }
}

/* ---- LINEからの最初のご登録フォーム（/start/） ---- */
.center { text-align: center; }
.unit-select.narrow { max-width: 160px; }
.unit-select input.with-unit { padding-right: 36px; }
.thanks .add-btn { margin-top: 20px; }
/* 並べた欄で幅を分け合う（月の欄が隠れているときは年の欄が全幅になる） */
.flex-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 12px; }
.flex-row > [hidden] { display: none; }
