/* =================================================================
   step me LP
   色・角丸・文字サイズは、この下の :root にまとめています。
   デザインを変えるときは、まずここの値を書き換えてください。
   ================================================================= */
:root {
  /* メインカラー（選択中のボタン・進捗バー・見出しのアクセントなど） */
  --color-main: #0b8a7d;
  --color-main-dark: #086c62;
  --color-main-light: #e5f5f3;

  /* CTA（「はじめる」「送信する」ボタン）の色 */
  --color-cta: #e8590c;
  --color-cta-dark: #c44a08;
  --color-cta-shadow: #a33d06;

  /* 信頼バッジ（運営会社の紹介の下）の色 */
  --color-trust: #a0611c;

  /* タグ（#すべて無料 など）の色 */
  --color-tag-bg: #fff4d6;
  --color-tag-text: #8a5a00;

  /* 文字・背景 */
  --color-text: #1f2d3a;
  --color-text-sub: #5a6876;
  --color-bg: #eef3f4;
  --color-surface: #ffffff;
  --color-border: #d5dee3;
  --color-disabled: #b9c3ca;

  /* エラー表示 */
  --color-error: #c62828;
  --color-error-bg: #fdecec;

  /* 形・大きさ */
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-pill: 999px;
  --page-max-width: 480px;
  --fv-card-overlap: 56px; /* 質問1のカードが、メイン画像の下側に重なる高さ */
  --font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
}

/* ---------- 基本 ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--color-main-dark); }

button,
input,
select { font: inherit; color: inherit; }

[hidden] { display: none !important; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 3px solid var(--color-main);
  outline-offset: 2px;
}

[tabindex="-1"]:focus { outline: none; }

.page {
  max-width: var(--page-max-width);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--color-surface);
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.06);
}

main { flex: 1; }

/* ---------- ヘッダー ---------- */
.site-header {
  display: flex;
  align-items: center;
  height: 52px;
  padding: 0 16px;
  padding-top: env(safe-area-inset-top);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}

/* 利用規約・プライバシーポリシーのページの「step me」（トップへ戻るリンク） */
.site-home {
  color: var(--color-text);
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
}

/* ---------- ボタン ---------- */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 56px;
  padding: 12px 20px;
  border: 0;
  border-radius: var(--radius-pill);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  cursor: pointer;
  transition: transform 0.08s ease, background-color 0.15s ease, box-shadow 0.08s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:disabled { cursor: not-allowed; }

.btn-primary {
  background: var(--color-main);
  color: #fff;
}
.btn-primary:active:not(:disabled) { background: var(--color-main-dark); }

.btn-cta {
  background: var(--color-cta);
  color: #fff;
  font-size: 18px;
  min-height: 60px;
  box-shadow: 0 4px 0 var(--color-cta-shadow);
}
.btn-cta:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--color-cta-shadow);
}
.btn-cta:disabled {
  background: var(--color-disabled);
  box-shadow: 0 4px 0 #9aa5ad;
}

.btn.is-loading::before {
  content: "";
  width: 18px;
  height: 18px;
  border: 3px solid rgba(255, 255, 255, 0.5);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- ファーストビュー（メイン画像＋質問1） ---------- */
.fv-visual {
  position: relative;
  aspect-ratio: 1 / 1; /* メイン画像は正方形（1500×1500px）の想定 */
  overflow: hidden;
  background: var(--color-main-light);
}
.fv-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% center; /* 正方形でない画像のとき、どこを中心に切り抜くか（左右%・上下） */
}

/* HTML版のキャッチ。画像に入れたら class に is-baked を足して隠す */
.fv-overlay {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
}
.fv-overlay.is-baked {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.fv-catch {
  margin: 0;
  font-size: clamp(20px, 6.4vw, 24px); /* 画像の人物に重ならないよう、左上の空の部分に収める（画面幅に合わせて縮む） */
  line-height: 1.45;
  letter-spacing: 0.02em;
  color: var(--color-text);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.95), 0 0 3px #fff;
}

.fv-tags {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: calc(var(--fv-card-overlap) + 12px);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.fv-tags li {
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-main-dark);
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* 画像の下側に重なる、質問1のカード */
.fv-card {
  position: relative;
  margin: calc(var(--fv-card-overlap) * -1) 12px 0;
  padding: 20px 16px;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
}
.fv-card .question { padding-top: 0; }
.fv-card .q-num { display: none; }
.fv-card .q-title {
  margin: 0 64px 16px 0; /* 右上の「簡単30秒」と重ならないように */
  font-size: 19px;
}
/* 幅の狭いスマホ（iPhone SE 第1世代など）で、選択肢の文字が2行に折り返さないように */
@media (max-width: 359px) {
  .fv-card .choice { padding: 10px 6px; font-size: 15px; }
}

.fv-badge {
  position: absolute;
  top: -20px;
  right: 12px;
  display: grid;
  place-content: center;
  width: 66px;
  height: 66px;
  margin: 0;
  border-radius: 50%;
  background: var(--color-main);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

.fv-cta-note {
  margin: 12px 16px 24px;
  color: var(--color-text-sub);
  font-size: 13px;
  text-align: center;
}

/* ---------- 運営会社の紹介（ABOUT US） ---------- */
.about {
  padding: 32px 16px 40px;
  background: var(--color-bg);
}
.about-inner {
  display: flex;
  gap: 14px;
}
.about-label {
  flex: none;
  margin: 2px 0 0;
  writing-mode: vertical-rl;
  color: var(--color-text-sub);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.25em;
}
.about-title {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.5;
}
.about-text {
  margin: 0;
  font-size: 15px;
  line-height: 1.9;
}
.about-text strong { color: var(--color-main-dark); }

/* 信頼バッジ（月桂樹の飾り付き） */
.trust-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 320px;
  margin: 28px auto 0;
  padding: 16px 12px;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  color: var(--color-trust);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}
.laurel-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.laurel { flex: none; width: 22px; height: 44px; }
.laurel-right { transform: scaleX(-1); }
.trust-text {
  margin: 0;
  text-align: center;
  line-height: 1.4;
}
.trust-main {
  display: block;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.trust-sub {
  display: block;
  margin-top: 4px;
  color: var(--color-text-sub);
  font-size: 12px;
  font-weight: 700;
}
.trust-sub .nowrap { display: inline-block; } /* 許可番号の途中で改行しない */

/* ---------- 質問画面 ---------- */
.screen-quiz { padding: env(safe-area-inset-top) 16px 32px; } /* iPhone のノッチ部分に重ならないように */

.quiz-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 44px;
  margin-left: -8px;
  padding: 0 12px 0 4px;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-text-sub);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.btn-back:active:not(:disabled) { background: var(--color-bg); }
.btn-back:disabled { opacity: 0.4; }

.progress-text {
  margin: 0;
  color: var(--color-text-sub);
  font-size: 15px;
  font-weight: 700;
}
#progress-current { color: var(--color-main-dark); font-size: 20px; }
.progress-sep { margin: 0 2px; }

.progress {
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--color-bg);
  overflow: hidden;
}
.progress-bar {
  width: 10%;
  height: 100%;
  border-radius: inherit;
  background: var(--color-main);
  transition: width 0.3s ease;
}

.question { padding-top: 28px; }

.q-title {
  margin: 0 0 20px;
  font-size: 21px;
  line-height: 1.5;
}
.q-num {
  display: block;
  margin-bottom: 4px;
  color: var(--color-main);
  font-size: 15px;
  letter-spacing: 0.05em;
}

/* 選択肢 */
.choices {
  display: grid;
  gap: 12px;
}
.choices-grid { grid-template-columns: 1fr 1fr; }

.choice {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  padding: 12px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  font-size: 17px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.choice:active { background: var(--color-main-light); }
.choice.is-selected {
  border-color: var(--color-main);
  background: var(--color-main);
  color: #fff;
}

/* 入力欄 */
.field { margin-top: 0; }
.field + .field { margin-top: 16px; }

.field-other { margin-top: 24px; }

.field-label {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 700;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.field-row .field + .field { margin-top: 0; }

.input,
.select {
  width: 100%;
  min-height: 56px;
  padding: 12px 14px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  font-size: 17px; /* 16px 未満だと iPhone で入力時に画面が拡大されるため */
}
.input::placeholder { color: #9aa6b0; }
.input:focus,
.select:focus {
  outline: none;
  border-color: var(--color-main);
  box-shadow: 0 0 0 3px var(--color-main-light);
}
.input[aria-invalid="true"],
.select[aria-invalid="true"] { border-color: var(--color-error); }

.select-wrap { position: relative; }
.select-wrap::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 18px;
  width: 10px;
  height: 10px;
  margin-top: -7px;
  border-right: 2px solid var(--color-text-sub);
  border-bottom: 2px solid var(--color-text-sub);
  transform: rotate(45deg);
  pointer-events: none;
}
.select {
  padding-right: 44px;
  appearance: none;
  -webkit-appearance: none;
}

.field-note {
  margin: 8px 0 0;
  color: var(--color-text-sub);
  font-size: 13px;
}

.field-error,
.submit-error {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--color-error-bg);
  color: var(--color-error);
  font-size: 14px;
  font-weight: 700;
}

.q-actions { margin-top: 28px; }

/* 同意チェック */
.consent {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  margin-bottom: 16px;
  font-size: 15px;
  cursor: pointer;
}
.consent-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.consent-box {
  flex: none;
  position: relative;
  width: 26px;
  height: 26px;
  border: 2px solid var(--color-border);
  border-radius: 6px;
  background: var(--color-surface);
}
.consent-input:checked + .consent-box {
  border-color: var(--color-main);
  background: var(--color-main);
}
.consent-input:checked + .consent-box::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 2px;
  width: 7px;
  height: 13px;
  border-right: 3px solid #fff;
  border-bottom: 3px solid #fff;
  transform: rotate(45deg);
}
.consent-input:focus-visible + .consent-box {
  outline: 3px solid var(--color-main);
  outline-offset: 2px;
}

/* ハニーポット（人には見えない入力欄） */
.hp-field {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- 完了画面 ---------- */
.screen-done { padding: calc(28px + env(safe-area-inset-top)) 16px 36px; }

.done-hero {
  margin-bottom: 24px;
  text-align: center;
}
.done-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--color-main);
  color: #fff;
}
.done-title {
  margin: 0;
  font-size: 20px;
  line-height: 1.6;
}

.card {
  margin-top: 16px;
  padding: 20px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}
.card-title {
  margin: 0 0 14px;
  padding-left: 10px;
  border-left: 4px solid var(--color-main);
  font-size: 17px;
  line-height: 1.4;
}

.flow {
  margin: 0;
  padding: 0;
  list-style: none;
}
.flow-item {
  position: relative;
  display: flex;
  gap: 12px;
  padding-bottom: 16px;
}
.flow-item:last-child { padding-bottom: 0; }
.flow-item:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 32px;
  bottom: 0;
  width: 2px;
  background: var(--color-border);
}
.flow-num {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-main-light);
  color: var(--color-main-dark);
  font-weight: 700;
}
.flow-item.is-next .flow-num {
  background: var(--color-main);
  color: #fff;
}
.flow-text { padding-top: 3px; }
.flow-title {
  margin: 0;
  font-weight: 700;
  line-height: 1.6;
}
.flow-note {
  margin: 4px 0 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--color-main-light);
  color: var(--color-main-dark);
  font-size: 14px;
  font-weight: 700;
}

.notes {
  margin: 0;
  padding: 0;
  list-style: none;
}
.notes li {
  position: relative;
  padding-left: 18px;
  font-size: 15px;
}
.notes li + li { margin-top: 8px; }
.notes li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.7em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-main);
}

/* ---------- フッター ---------- */
.site-footer {
  padding: 24px 16px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text-sub);
  font-size: 13px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 20px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}
.footer-links a {
  display: inline-block;
  padding: 6px 0;
  color: var(--color-text-sub);
}
.footer-info { margin: 0; }
.footer-info div {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 8px;
}
.footer-info dt::after { content: "："; }
.footer-info dd { margin: 0; }
.footer-copy {
  margin: 16px 0 0;
  text-align: center;
}

.noscript {
  max-width: var(--page-max-width);
  margin: 16px auto;
  padding: 12px 16px;
  background: var(--color-error-bg);
  color: var(--color-error);
}

/* ---------- 補足ページ（利用規約・プライバシーポリシー） ---------- */
.doc {
  padding: 24px 16px 48px;
  font-size: 15px;
  line-height: 1.8;
  overflow-wrap: anywhere; /* 長い URL でも横にはみ出さない */
}
.doc h1 { margin: 0 0 16px; font-size: 21px; line-height: 1.5; }
.doc h2 {
  margin: 32px 0 10px;
  padding-left: 10px;
  border-left: 4px solid var(--color-main);
  font-size: 17px;
  line-height: 1.5;
}
.doc p { margin: 0 0 12px; }
.doc ol,
.doc ul { margin: 0 0 12px; padding-left: 1.4em; }
.doc li + li { margin-top: 6px; }
.doc li ul { margin: 6px 0 0; }

/* 会社情報・窓口などの「項目：内容」 */
.doc-dl { margin: 0 0 12px; }
.doc-dl div {
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border);
}
.doc-dl dt { color: var(--color-text-sub); font-size: 13px; font-weight: 700; }
.doc-dl dd { margin: 0; }

/* 広告タグの一覧 */
.ad-tools { display: grid; gap: 10px; margin: 0 0 12px; }
.ad-tool {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}
.ad-tool dt { font-weight: 700; }
.ad-tool dd { margin: 2px 0 0; font-size: 14px; }

.doc-date { margin-top: 32px; color: var(--color-text-sub); font-size: 14px; }
.doc-back { margin-top: 24px; text-align: center; }

/* 下書き用の表示（公開前に HTML から削除する） */
.draft-note {
  margin: 0 0 20px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: #fff4d6;
  color: #7a4f00;
  font-size: 13px;
  font-weight: 700;
}
mark.todo {
  padding: 0 2px;
  background: #ffe58a;
  color: inherit;
  font-weight: 700;
}

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