/* =========================================================
   ココナラ勉強会 参加者アンケート
   株式会社エフズ（fs-create.co.jp）の配色・書体を踏襲
   ========================================================= */
:root {
  --white: #ffffff;
  --paper: #f2f1ed;
  --stone: #d8d5cd;
  --ink: #0e0f11;
  --navy: #0a1730;
  --blue: #2147c5;
  --blue-tint: #eef1fb;
  --line: rgba(14, 15, 17, .14);
  --muted: rgba(14, 15, 17, .62);
  --error: #b3261e;
  --error-tint: #fcf1f0;
  --font: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --radius: 12px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.8;
  letter-spacing: .02em;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; height: auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.wrap {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- ヘッダー ---------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--white); }
.site-header__inner {
  max-width: 640px; margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; gap: 10px;
}
.site-header__mark { width: 22px; height: auto; display: block; }
.site-header__name { font-size: 14px; font-weight: 600; letter-spacing: .08em; }

/* ---------- 進捗（画面上部に固定） ---------- */
.progress {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .96);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.progress__inner {
  max-width: 640px; margin: 0 auto; padding: 9px 20px 8px;
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 13px; line-height: 1.4;
}
.progress__label { color: var(--muted); letter-spacing: .1em; }
.progress__count { font-weight: 600; font-variant-numeric: tabular-nums; }
.progress__count small { font-size: 12px; color: var(--muted); margin-left: 2px; font-weight: 500; }
.progress__track { height: 3px; background: var(--paper); }
.progress__bar { height: 100%; width: 0; background: var(--blue); transition: width .3s ease; }

/* ---------- 冒頭 ---------- */
.intro { padding: 40px 0 8px; }
.intro__eyebrow {
  margin: 0 0 6px; font-size: 14px; color: var(--blue); font-weight: 600; letter-spacing: .14em;
}
.intro__title {
  margin: 0 0 20px; font-size: 30px; line-height: 1.4; font-weight: 600; letter-spacing: .06em;
}
.intro__text { margin: 0 0 20px; font-size: 15px; line-height: 2; }
.intro__meta {
  list-style: none; margin: 0; padding: 14px 18px;
  background: var(--paper); border-radius: var(--radius);
  display: flex; flex-wrap: wrap; gap: 4px 18px;
  font-size: 14px;
}
.intro__meta li { position: relative; padding-left: 14px; }
.intro__meta li::before {
  content: ""; position: absolute; left: 0; top: .78em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--navy);
}

/* ---------- 設問 ---------- */
.survey { padding: 16px 0 0; }
.q {
  margin: 0; padding: 32px 0; border: 0; border-bottom: 1px solid var(--line);
  min-width: 0;
}
.q:last-of-type { border-bottom: 0; }
/* legend を float にして、fieldset の上余白が見出しの下に回り込むのを防ぐ */
.q__legend { float: left; width: 100%; padding: 0; margin: 0 0 18px; }
.q__legend + * { clear: both; }
.q__head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.q__num {
  font-size: 20px; font-weight: 700; color: var(--blue); letter-spacing: .04em;
  font-variant-numeric: tabular-nums; line-height: 1;
}
.q__of { font-size: 13px; color: var(--muted); font-weight: 500; }
.q__badge {
  display: inline-block; font-size: 11px; line-height: 1; padding: 5px 8px 4px;
  border-radius: 4px; letter-spacing: .08em; font-weight: 600; vertical-align: middle;
}
.q__badge--req { background: var(--navy); color: var(--white); }
.q__badge--opt { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--stone); }
.q__title { display: block; font-size: 18px; line-height: 1.7; font-weight: 600; }
.q--name { padding: 32px 0; border-bottom: 1px solid var(--line); }
.q--name .q__legend { float: none; display: block; margin-bottom: 6px; }
.q__help { margin: 0 0 14px; font-size: 13px; line-height: 1.8; color: var(--muted); }
.q.has-error .field { box-shadow: inset 0 0 0 1.5px var(--error); }
.q__note { margin: 14px 0 0; font-size: 13px; line-height: 1.8; color: var(--muted); }
.q__note + .q__note { margin-top: 4px; }
.q__error { margin: 0; font-size: 14px; color: var(--error); font-weight: 600; }
.q__error:not(:empty) { margin-top: 12px; }
.q__error:not(:empty)::before { content: "! "; }

/* ---------- 選択肢 ---------- */
.opts { display: grid; gap: 10px; }
.opt { display: block; position: relative; cursor: pointer; }
.opt__input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.opt__box {
  display: flex; align-items: center; gap: 14px;
  min-height: 58px; padding: 12px 16px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px var(--stone);
  transition: box-shadow .15s ease, background-color .15s ease;
}
.opt__radio {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--stone); background: var(--white);
  position: relative; transition: box-shadow .15s ease, background-color .15s ease;
}
.opt__radio::after {
  content: ""; position: absolute; inset: 6px; border-radius: 50%;
  background: var(--white); transform: scale(0); transition: transform .15s ease;
}
.opt__score {
  flex: 0 0 auto; min-width: 22px; font-size: 18px; font-weight: 700; color: var(--navy);
  font-variant-numeric: tabular-nums; text-align: center;
}
.opt__label { font-size: 16px; line-height: 1.5; }

@media (hover: hover) {
  .opt:hover .opt__box { box-shadow: inset 0 0 0 1px var(--navy); }
}
.opt:active .opt__box { background: var(--paper); }
.opt__input:checked + .opt__box {
  background: var(--blue-tint);
  box-shadow: inset 0 0 0 2px var(--blue);
}
.opt__input:checked + .opt__box .opt__radio { background: var(--blue); box-shadow: none; }
.opt__input:checked + .opt__box .opt__radio::after { transform: scale(1); }
.opt__input:checked + .opt__box .opt__label { font-weight: 600; }
.opt__input:checked + .opt__box .opt__score { color: var(--blue); }
.opt__input:focus-visible + .opt__box { outline: 3px solid rgba(33, 71, 197, .35); outline-offset: 2px; }

.q.has-error .opt__box { box-shadow: inset 0 0 0 1px var(--error); }
.q.has-error .opt__input:checked + .opt__box { box-shadow: inset 0 0 0 2px var(--blue); }

/* ---------- 入力欄 ---------- */
.field {
  display: block; width: 100%;
  font: inherit; font-size: 16px; line-height: 1.7; color: var(--ink);
  padding: 13px 16px; background: var(--white);
  border: 0; border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px var(--stone);
  -webkit-appearance: none; appearance: none;
  transition: box-shadow .15s ease;
}
.field::placeholder { color: rgba(14, 15, 17, .38); }
.field:focus { outline: none; box-shadow: inset 0 0 0 2px var(--blue); }
.field--area { min-height: 128px; resize: vertical; }
.field[aria-invalid="true"] { box-shadow: inset 0 0 0 1.5px var(--error); }

/* 「掲載前に確認したい」を選んだときの連絡先 */
.contact {
  margin-top: 18px; padding: 18px 16px;
  background: var(--paper); border-radius: var(--radius);
}
.contact[hidden] { display: none; }
.contact__label { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.contact__help { margin: 0 0 12px; font-size: 13px; line-height: 1.8; color: var(--muted); }

/* ロボット対策の欄（画面には出さない） */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- お知らせ ---------- */
.notice { margin: 16px 0 0; padding: 14px 16px; border-radius: var(--radius); font-size: 14px; line-height: 1.8; }
.notice[hidden] { display: none; }
.notice--info { background: var(--blue-tint); color: var(--navy); }
.notice--error { background: var(--error-tint); color: var(--error); font-weight: 600; }

/* ---------- 送信 ---------- */
.submit { padding: 8px 0 56px; }
.submit .notice { margin: 0 0 16px; }
.btn {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: 62px; padding: 14px 20px;
  font: inherit; font-size: 17px; font-weight: 600; letter-spacing: .12em;
  color: var(--white); background: var(--navy);
  border: 0; border-radius: var(--radius); cursor: pointer;
  transition: background-color .15s ease, opacity .15s ease;
}
@media (hover: hover) { .btn:hover { background: var(--blue); } }
.btn:active { background: var(--blue); }
.btn:focus-visible { outline: 3px solid rgba(33, 71, 197, .4); outline-offset: 3px; }
.btn:disabled { cursor: wait; opacity: .85; }
.btn__loading { display: none; align-items: center; gap: 10px; }
.btn.is-loading .btn__text { display: none; }
.btn.is-loading .btn__loading { display: inline-flex; }
.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .35); border-top-color: var(--white);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.submit__note { margin: 14px 0 0; font-size: 13px; color: var(--muted); text-align: center; line-height: 1.8; }

/* ---------- 完了画面 ---------- */
.thanks { padding: 64px 0 72px; text-align: center; }
.thanks__icon { color: var(--blue); margin: 0 auto 24px; width: 56px; }
.thanks__icon svg { width: 56px; height: 56px; display: block; }
.thanks__title { margin: 0 0 24px; font-size: 22px; line-height: 1.6; font-weight: 600; letter-spacing: .05em; }
.thanks__text { margin: 0 0 12px; font-size: 15px; line-height: 2; text-align: left; }
.thanks__close {
  margin: 36px 0 0; padding-top: 24px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--muted);
}

/* ---------- フッター ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 20px; text-align: center; }
.site-footer p { margin: 0; font-size: 12px; color: var(--muted); letter-spacing: .1em; }

@media (min-width: 600px) {
  .intro { padding-top: 56px; }
  .intro__title { font-size: 34px; }
  .thanks__text { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation-duration: 1.5s !important; }
}
