:root {
  --primary: #004ea1;
  --primary-dark: #003c7c;
  --ink: #111111;
  --muted: #555555;
  --line: #bcbbbc;
  --disabled: #979797;
  --error: #c62828;
  --focus: rgba(0, 78, 161, 0.35);
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", "Meiryo", sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

/* 固定高さ・scrolling=no の iframe の中で完結させるため、body を基準にオーバーレイを重ねる */
body {
  position: relative;
  min-height: 100vh;
  background: #fff;
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.form { max-width: 420px; margin: 0 auto; padding: 22px 20px 26px; }

.field { margin: 0 0 16px; padding: 0; border: 0; min-width: 0; }

label, legend { display: block; font-size: 17px; line-height: 1.5; margin: 0 0 6px; padding: 0; }

input[type="text"], input[type="email"], input[type="tel"], textarea {
  display: block;
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
}
input[type="text"], input[type="email"], input[type="tel"] { height: 45px; }
textarea { padding: 10px; resize: vertical; line-height: 1.5; }

select {
  display: block;
  width: 100%;
  height: 45px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 36px 0 10px;
  appearance: none;
  -webkit-appearance: none;
  background: #fff url("data:image/svg+xml;charset=utf-8,%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='%23555555' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 12px center;
  background-size: 12px 8px;
}
select:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }

/* 各フォームの複数行欄の高さは、埋め込み先 iframe の高さ（fukushoku: 1400 / locomo: 800 / cellsheet: 900）に収まるよう調整 */
.form-fukushoku #workStatus { height: 92px; }
.form-fukushoku #message { height: 176px; }
.form-locomo #message { height: 150px; }
.form-cellsheet #message { height: 100px; }
.form-cellsheet-en #message { height: 170px; }
.form-sekitsui #message { height: 150px; }
.form-ortho #message { height: 150px; }
.form-sporto #message { height: 160px; }

/* 同意欄の下に置く外部ポリシーへのリンク行 */
.policy-link { font-size: 14px; line-height: 1.5; margin: -4px 0 14px; }
.policy-link a { color: var(--primary); font-weight: 700; }

input:focus-visible, textarea:focus-visible, button:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.is-invalid { border-color: var(--error); }

.radio-box { border: 1px solid var(--line); border-radius: 6px; padding: 8px 14px; }
.radio { display: flex; align-items: center; gap: 10px; margin: 0; padding: 4px 0; font-size: 17px; cursor: pointer; }
.radio input { width: 18px; height: 18px; margin: 0; accent-color: var(--primary); }
/* 枠なし・小さめの選択肢リスト（Bubble 版 cellsheet の見た目に合わせる） */
.radio-list { padding: 0 0 0 4px; }
.radio-list .radio { font-size: 14px; color: var(--muted); padding: 2px 0; gap: 8px; }
.radio-list .radio input { width: 16px; height: 16px; }

.help { font-size: 13px; color: var(--muted); line-height: 1.6; margin: 8px 0 0; }

.error { color: var(--error); font-size: 13px; line-height: 1.5; margin: 4px 0 0; }
.error:empty { display: none; }

/* ボットだけが埋める項目。表示上は存在しない扱いにする */
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.consent { margin: 2px 0 14px; }
.check { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 17px; cursor: pointer; }
.check input {
  appearance: none;
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  margin: 0;
  border: 1.5px solid #333;
  border-radius: 50%;
  background: #fff;
  flex: none;
  display: grid;
  place-content: center;
  cursor: pointer;
}
.check input::before {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary);
  transform: scale(0);
  transition: transform 0.12s;
}
.check input:checked::before { transform: scale(1); }
.check input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.check a { color: var(--primary); }

.note { font-size: 13px; line-height: 1.6; margin: 0 0 14px; padding-left: 1em; text-indent: -1em; }

.cf-turnstile { margin: 0 0 14px; min-height: 65px; }

.btn {
  display: block;
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 25px;
  font: inherit;
  font-size: 18px;
  cursor: pointer;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); }
.btn-primary:disabled { background: var(--disabled); color: #222; cursor: not-allowed; }
.btn-outline { background: #fff; color: var(--primary); border: 1.5px solid var(--primary); }
.btn + .btn { margin-top: 12px; }

.overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.45); z-index: 10; }
.dialog {
  margin: 40px auto 0;
  width: calc(100% - 40px);
  max-width: 380px;
  background: #fff;
  border-radius: 6px;
  padding: 24px 22px;
  outline: none;
}
.dialog h2 { font-size: 17px; font-weight: 600; text-align: center; margin: 0 0 18px; }

.summary { margin: 0 0 16px; font-size: 15px; }
.summary dt { margin: 0 0 2px; }
.summary dd { margin: 0 0 12px; word-break: break-all; }
.summary dd.is-multiline {
  white-space: pre-wrap;
  word-break: break-word;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px 10px;
  min-height: 70px;
  max-height: 160px;
  overflow: auto;
}

.dialog-done { text-align: center; }
.check-icon { width: 96px; height: 96px; display: block; margin: 8px auto 20px; }
.dialog-done p { font-size: 16px; margin: 0 0 12px; }
.dialog-done .btn { margin-top: 20px; }

@media (prefers-reduced-motion: reduce) {
  .check input::before { transition: none; }
}
