/* =========================================================
 *  kanabou.ai 単体フォームページ共通スタイル
 *  /contact/ と /form/{slug}/ が共有する。
 *
 *  LP (/lp/ai-system-260623/) の reset + style + theme-b + e-redesign から
 *  「フォームに必要な分だけ」を抜き出して 1 枚にまとめたもの。
 *  LP 側の改修がフォームを壊さないよう、LP の CSS は参照しない。
 * ========================================================= */

:root {
  /* ---- ChumTech ブランドカラー（design-system スキル準拠・ロゴのオレンジ/ブルー） ----
   * Orange #EF7B1B = プライマリ（CTA・強調）
   * Blue   #1D76B2 = アクセント（リンク・選択状態）
   * Navy   #364656 = テキスト・見出し
   *
   * ★ ブランドの #EF7B1B は白文字を載せると 2.79:1 でコントラスト不足。
   *   「白文字を載せる面」と「小さい文字色」には濃いオレンジ (--c-main-strong 4.1:1) を使い、
   *   #EF7B1B は罫線・背景・図形など文字を載せない用途に限る。
   */
  --c-main: #EF7B1B;          /* ブランドオレンジ（図形・枠・背景） */
  --c-main-strong: #C85F08;   /* 白文字を載せる面 / 文字色に使うオレンジ */
  --c-main-grad-from: #E0710D;
  --c-main-grad-to: #C85F08;
  --c-main-light: #F7C08A;
  --c-main-bg-soft: #FDF3E8;

  --c-sub: #1D76B2;           /* ChumTech Blue（リンク・フォーカス・選択） */
  --c-sub-dark: #175E8E;
  --c-sub-light: #7FB4D6;
  --c-sub-bg-soft: #EDF5FA;

  /* Neutral（Navy 基調） */
  --c-white: #fff;
  --c-ink: #364656;           /* ChumTech Navy */
  --c-text: #364656;
  --c-text-muted: #5A6875;
  --c-text-light: #6B7785;
  --c-bg: #fff;
  --c-bg-soft: #F7F8F9;
  --c-bg-cool: #EDEFF2;
  --c-border: #D1D5DA;
  --c-shadow: rgba(54, 70, 86, 0.10);

  /* LINE */
  --c-line: #06C755;
  --c-line-dark: #06A04A;
  --c-line-bg: #F0FBF4;

  --font-base: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "游ゴシック", "YuGothic", "Noto Sans JP", sans-serif;
  --maxw: 720px;
  --radius: 8px;
}

/* ---- reset（最小限） ---- */
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p, figure, dl, dd, ul, ol, li { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
input, button, textarea, select { font: inherit; }
a { text-decoration: none; color: currentColor; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; font-size: 17px; }
body {
  font-family: var(--font-base);
  color: var(--c-text);
  background: var(--c-bg-soft);
  line-height: 1.8;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
}

.container { width: min(92%, var(--maxw)); margin-inline: auto; }

/* =========================================================
 *  ヘッダー / フッター
 * ========================================================= */
.site-header {
  background: var(--c-white);
  border-bottom: 1px solid var(--c-border);
  padding: 0.9rem 0;
}
.site-header .container { display: flex; align-items: center; }
.brand { display: flex; align-items: center; }
.brand img { height: clamp(26px, 6.4vw, 32px); width: auto; }

.footer {
  background: var(--c-ink);
  color: rgba(255, 255, 255, 0.78);
  text-align: center;
  padding: 2rem 0;
  font-size: 0.9rem;
  margin-top: clamp(2.5rem, 7vw, 4rem);
}
.footer a { color: rgba(255, 255, 255, 0.78); text-decoration: underline; }
.footer-links { display: flex; gap: 1.2rem; justify-content: center; margin-bottom: 0.7rem; flex-wrap: wrap; }

/* =========================================================
 *  ページ見出し
 * ========================================================= */
.page { padding: clamp(2rem, 6vw, 3.4rem) 0 0; }
/* 縦積み固定。inline 要素どうし（バッジと見出し）が同じ行に流れて重なるのを防ぐ */
.page-head {
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  margin-bottom: clamp(1.6rem, 4vw, 2.2rem);
}
.page-title {
  font-size: clamp(1.5rem, 5.8vw, 2.2rem);
  font-weight: 600;
  line-height: 1.5;
  color: var(--c-ink);
  letter-spacing: 0.02em;
  word-break: normal;
  line-break: strict;
  text-wrap: balance;
}
.page-title .accent { color: var(--c-main-strong); }

/* セミナー参加者向けの帯 */
.seminar-tag {
  display: inline-flex; align-items: center; gap: 0.5rem;
  max-width: 100%;
  background: var(--c-sub-bg-soft);
  border: 1px solid var(--c-sub-light);
  color: var(--c-sub-dark);
  font-weight: 600;
  font-size: clamp(0.85rem, 3.3vw, 0.96rem);
  padding: 0.42rem 1rem;
  border-radius: 999px;
  margin-bottom: 0.9rem;
  line-height: 1.5;
}
.seminar-tag svg { width: 1.05em; height: 1.05em; flex: none; }

.page-lead {
  max-width: 34rem; margin: 0 auto;
  text-align: center;
  color: var(--c-text-muted);
  font-size: clamp(1rem, 4vw, 1.08rem);
  line-height: 1.95;
  text-wrap: balance;
  word-break: auto-phrase;
}

/* =========================================================
 *  LINE 案内（申し込み後の流れ）
 * ========================================================= */
.line-note {
  max-width: 40rem; margin: clamp(1.6rem, 4vw, 2.2rem) auto 0;
  background: var(--c-line-bg);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: clamp(1.1rem, 4vw, 1.5rem);
}
.line-note-head {
  display: flex; align-items: center; gap: 0.55rem;
  font-weight: 700; color: var(--c-line-dark);
  font-size: clamp(1rem, 4vw, 1.1rem);
  line-height: 1.5;
  margin-bottom: 0.7rem;
}
.line-note-head svg { width: 1.35em; height: 1.35em; flex: none; }
.line-note-body { color: var(--c-text); font-size: clamp(0.95rem, 3.7vw, 1.02rem); line-height: 1.9; }
.line-note-body strong { color: var(--c-line-dark); font-weight: 700; }
.line-steps { margin-top: 0.9rem; display: grid; gap: 0.5rem; }
.line-step { display: flex; gap: 0.65rem; align-items: flex-start; font-size: clamp(0.92rem, 3.6vw, 1rem); line-height: 1.75; }
.line-step-no {
  flex: none; width: 1.55rem; height: 1.55rem; border-radius: 50%;
  background: var(--c-line); color: #fff;
  font-size: 0.82rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-top: 0.12rem;
}

/* =========================================================
 *  フォーム
 * ========================================================= */
.form {
  max-width: 40rem; margin: clamp(1.6rem, 4vw, 2.2rem) auto 0;
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 5vw, 2.4rem);
  box-shadow: 0 8px 24px var(--c-shadow);
}
.field { margin-bottom: 1.3rem; }
.field-label {
  display: flex; align-items: center; gap: 0.6rem;
  font-weight: 500; color: var(--c-ink);
  margin-bottom: 0.55rem;
  font-size: clamp(1rem, 4vw, 1.1rem);
  line-height: 1.5;
}
.req { background: var(--c-main-strong); color: var(--c-white); font-size: 0.72rem; font-weight: 500; padding: 0.14rem 0.55rem; border-radius: 5px; }
.opt { background: var(--c-bg-cool); color: var(--c-text-light); font-size: 0.72rem; font-weight: 500; padding: 0.14rem 0.55rem; border-radius: 5px; }

.input, .select, .textarea {
  width: 100%; padding: 0.95rem 1.1rem;
  font-family: inherit; font-size: 1.05rem; color: var(--c-text);
  background: var(--c-bg-soft);
  border: 1.5px solid var(--c-border);
  border-radius: 10px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--c-sub); background: var(--c-white); }
.textarea { resize: vertical; min-height: 6.5rem; }

.choices { display: flex; flex-direction: column; gap: 0.6rem; }
.choice {
  display: flex; align-items: flex-start; gap: 0.7rem;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--c-border); border-radius: 10px;
  background: var(--c-bg-soft); cursor: pointer;
  font-size: clamp(0.98rem, 3.8vw, 1.06rem); color: var(--c-text); line-height: 1.6;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.choice:hover { border-color: var(--c-sub-light); }
.choice input { margin-top: 0.24rem; width: 1.2rem; height: 1.2rem; flex: none; accent-color: var(--c-sub); }
.choice:has(input:checked) { border-color: var(--c-sub); background: var(--c-sub-bg-soft); }
.choice-other { margin-top: 0.8rem; }

.consent {
  display: flex; gap: 0.6rem; align-items: flex-start;
  font-size: clamp(0.95rem, 3.6vw, 1.02rem); color: var(--c-text-muted);
  margin: 0.4rem 0 1.4rem; line-height: 1.7;
}
.consent input { margin-top: 0.35rem; width: 1.2rem; height: 1.2rem; flex: none; accent-color: var(--c-main-strong); }
.consent a { color: var(--c-sub); text-decoration: underline; }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 0.5em;
  width: 100%;
  padding: 1.15rem 1.6rem;
  background: linear-gradient(180deg, var(--c-main-grad-from) 0%, var(--c-main-grad-to) 100%);
  color: var(--c-white);
  font-weight: 700;
  font-size: clamp(1.2rem, 5vw, 1.45rem);
  border: 0; border-radius: 999px; cursor: pointer;
  box-shadow: 0 6px 16px rgba(200, 95, 8, 0.24);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  text-align: center;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(200, 95, 8, 0.32); filter: brightness(1.03); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: 0.6; cursor: default; transform: none; filter: none; }

.form-foot {
  margin-top: 1.2rem;
  font-size: clamp(0.9rem, 3.5vw, 0.98rem);
  color: var(--c-text-light);
  line-height: 1.85; text-align: center;
  text-wrap: balance; word-break: auto-phrase;
}

/* 入力エラー（submit.ts が ?error= で戻してくる） */
.form-error {
  max-width: 40rem; margin: 0 auto clamp(1rem, 3vw, 1.4rem);
  background: #FEF2F2; border: 1px solid #FCA5A5; color: #991B1B;
  border-radius: var(--radius); padding: 0.9rem 1.1rem;
  font-size: clamp(0.95rem, 3.6vw, 1.02rem); line-height: 1.7;
}

/* =========================================================
 *  サンクスページ
 * ========================================================= */
.thanks { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.thanks-card {
  background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius);
  padding: clamp(1.8rem, 6vw, 3rem);
  max-width: 37rem; width: 100%; text-align: center;
  box-shadow: 0 12px 30px var(--c-shadow);
}
.thanks-logo { display: flex; justify-content: center; margin-bottom: 1.5rem; }
.thanks-logo img { height: 26px; width: auto; }
.thanks-check {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(180deg, #22C55E, #16A34A);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.4rem;
  box-shadow: 0 8px 20px rgba(22, 163, 74, 0.3);
}
.thanks-check svg { width: 36px; height: 36px; color: #fff; }
.thanks-title { font-size: clamp(1.3rem, 5vw, 1.7rem); font-weight: 700; color: var(--c-ink); line-height: 1.55; }
.thanks-msg { margin-top: 1.1rem; color: var(--c-text-muted); font-size: clamp(0.95rem, 3.7vw, 1.02rem); line-height: 1.95; }
.thanks-msg b { color: var(--c-line-dark); font-weight: 700; }

/* 進捗ステップ（申込は完了・いま LINE 追加・そのあと日程調整、を一目で示す） */
.tflow { margin-top: 1.5rem; text-align: left; border-top: 1px solid var(--c-border); }
.tflow-item { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.9rem 0.15rem; border-bottom: 1px solid var(--c-border); }
.tflow-num {
  flex: none; width: 1.75rem; height: 1.75rem; margin-top: 0.1rem;
  display: flex; align-items: center; justify-content: center; border-radius: 50%;
  background: var(--c-bg-cool); color: var(--c-text-light); font-size: 0.82rem; font-weight: 700;
}
.tflow-item.is-done .tflow-num { background: var(--c-ink); color: #fff; }
.tflow-item.is-now .tflow-num { background: var(--c-main-strong); color: #fff; }
.tflow-num svg { width: 0.95rem; height: 0.95rem; }
.tflow-body { display: block; }
.tflow-name { display: block; font-size: 0.97rem; font-weight: 700; line-height: 1.6; color: var(--c-text-light); }
.tflow-item.is-done .tflow-name, .tflow-item.is-now .tflow-name { color: var(--c-ink); }
.tflow-state { display: block; margin-top: 0.15rem; font-size: 0.82rem; line-height: 1.7; color: var(--c-text-light); }
.tflow-item.is-now .tflow-state { font-weight: 700; color: var(--c-main-strong); }

.line-block {
  margin-top: 1.7rem;
  padding: 1.5rem 1.2rem 1.4rem;
  background: var(--c-line-bg);
  border: 2px solid var(--c-line);
  border-radius: var(--radius);
  text-align: left;
}
.line-block-head { font-weight: 700; color: var(--c-line-dark); font-size: clamp(1.02rem, 4.1vw, 1.18rem); letter-spacing: 0.02em; line-height: 1.6; }
.line-block-body strong { color: var(--c-ink); font-weight: 700; }
.line-wrap { text-align: center; }
.line-block-cue { margin-top: 1.1rem; text-align: center; font-weight: 700; color: var(--c-line-dark); font-size: clamp(0.95rem, 3.8vw, 1.06rem); letter-spacing: 0.04em; line-height: 1.6; }
.line-block-body { margin-top: 0.6rem; color: var(--c-text); font-size: clamp(0.95rem, 3.7vw, 1.02rem); line-height: 1.9; }
.line-badge { display: inline-block; line-height: 0; margin-top: 0.85rem; transition: transform 0.15s ease, filter 0.15s ease; }
.line-badge:hover { transform: translateY(-2px); filter: brightness(1.03); }
.line-badge img { height: 52px; width: auto; display: block; margin: 0 auto; }
.line-block-micro { margin-top: 0.9rem; font-size: 0.82rem; color: var(--c-text-light); line-height: 1.75; }

.thanks-back { display: inline-block; margin-top: 1.6rem; color: var(--c-sub); font-weight: 600; font-size: 0.95rem; }
.thanks-back:hover { text-decoration: underline; }
