/* ===========================
   リセット & 基本設定
   =========================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 16px;
  color: #000;
  background-color: #e5eaef;
  min-height: 100vh;
}

img, svg {
  display: block;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

/* ===========================
   カラー変数
   =========================== */
:root {
  --color-bg: #e5eaef;
  --color-red: #eb0000;
  --color-gray: #acacac;
  --color-gray-light: #d8d8d8;
  --color-gray-btn: #a9abaf;
  --color-border: #acacac;
  --color-border-dark: #b6b6b6;
  --color-white: #ffffff;
  --color-black: #000000;
  --color-text-gray: #7e7e7e;
  --gradient-accent: linear-gradient(180deg, #8eb4ff 0%, #6590e5 65.385%);
  --gradient-hero: linear-gradient(180deg, #8eb4ff 0%, #6590e5 100%);
  --gradient-btn-upload: linear-gradient(233.54deg, #8eb4ff 2.78%, #6590e5 64.42%);
  --radius-input: 5px;
  --radius-card: 20px;
  --radius-btn: 33px;
}

/* ===========================
   レイアウト
   =========================== */
.page-wrapper {
  position: relative;
  min-height: 100vh;
  padding-bottom: 60px;
}

/* ヒーロー背景 */
.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 573px;
  background: url('../assets/figma/hero_pc.png') no-repeat center / cover;
  z-index: 0;
}

/* コンテナ */
.container {
  position: relative;
  z-index: 1;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 68px;
}

/* ===========================
   タイトルエリア
   =========================== */
.title-area {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-top: 102px;
}

.title-subtitle {
  display: flex;
  align-items: center;
  gap: 8px;
}

.title-dot {
  display: block;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: rgba(255,255,255,0.7);
  flex-shrink: 0;
}

.title-subtitle p {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-white);
  line-height: 1.2;
}

.title-main {
  font-size: 44px;
  font-weight: 700;
  color: var(--color-white);
  line-height: 1.2;
}

/* ===========================
   フォームカード
   =========================== */
.form-card {
  width: 100%;
  background: var(--color-white);
  border-radius: var(--radius-card);
  padding: 80px 122px;
  display: flex;
  flex-direction: column;
  gap: 52px;
}

/* ===========================
   お見積りの流れ
   =========================== */
.flow-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.flow-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
}

.divider {
  border: none;
  border-top: 1px solid #ccc;
  width: 100%;
}

.flow-text {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  font-weight: 400;
  line-height: 24px;
}

.flow-text p {
  line-height: 24px;
  margin-bottom: 0;
}

/* ===========================
   ステップインジケーター
   矢印深さ: 15px
   白背景をV字透過で見せ、各ステップ間の余白を表現
   flex:1 で均等リサイズ（固定幅なし）
   =========================== */
.step-indicator {
  display: flex;
  width: 100%;
  height: 47px;
  background: var(--color-white); /* V字透過部分に白が見える */
  border-radius: 5px;
  overflow: hidden;
}

.step {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 47px;
  min-width: 0; /* flex縮小を許可 */
}

/* STEP 1: アクティブ
   右矢印のみ（左は直角）
   padding-right:6px でテキストを視覚的中央に補正 */
.step--active {
  background: linear-gradient(90deg, #8eb4ff 0%, #6590e5 100%);
  color: var(--color-white);
  border-radius: 5px 0 0 5px;
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 50%, calc(100% - 6px) 100%, 0 100%);
  padding-right: 6px;
}

/* STEP 2: 非アクティブ
   左V字カット＋右矢印（0,0始点で上左角を含む → (6px,50%)→(0,0) が斜め辺になりV字形成） */
.step--arrow {
  background: #e8e8e8;
  color: var(--color-text-gray);
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 50%, calc(100% - 6px) 100%, 0 100%, 6px 50%);
}

/* STEP 3: 無効
   左V字カットのみ（右は直角）← Step2と同じ左形状 */
.step--disabled {
  background: var(--color-gray-light);
  color: var(--color-text-gray);
  border-radius: 0 5px 5px 0;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 6px 50%);
  padding-left: 6px;
}

.step-num {
  font-family: 'Work Sans', sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}

.step-label {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}

/* ===========================
   フォーム本体
   =========================== */
.form-body {
  display: flex;
  flex-direction: column;
  gap: 44px;
}

/* ===========================
   フォームグループ
   =========================== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* フィールドラベル行 */
.field-label {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.field-accent {
  display: block;
  width: 5px;
  height: 18px;
  background: var(--gradient-accent);
  flex-shrink: 0;
}

.field-name {
  font-size: 18px;
  font-weight: 500;
  line-height: 28px;
  white-space: nowrap;
}

/* 必須バッジ */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 4px;
  border-radius: var(--radius-input);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

.badge--required {
  border: 1px solid var(--color-red);
  color: var(--color-red);
}

/* ===========================
   サブフィールド
   =========================== */
.sub-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sub-field {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sub-field--narrow {
  max-width: 200px;
}

.sub-label-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sub-label {
  font-size: 15px;
  font-weight: 400;
  line-height: 30px;
}

/* ===========================
   インプット
   =========================== */
.input-wrap {
  position: relative;
  width: 100%;
}

.input {
  width: 100%;
  height: 50px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-input);
  background: var(--color-white);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: #000;
  padding: 0 44px 0 20px;
  outline: none;
  transition: border-color 0.2s;
  appearance: none;
  -webkit-appearance: none;
}

.input::placeholder {
  color: var(--color-gray);
}

.input:focus {
  border-color: #6590e5;
}

/* エラー時の赤枠 */
.input-wrap--error .input {
  border-color: var(--color-red);
}

/* テキストエリア */
.input--textarea {
  height: auto;
  padding: 12px 20px;
  resize: vertical;
  min-height: 80px;
}

/* セレクト */
.input--select {
  cursor: pointer;
  color: #000;
}

.input--select:invalid,
.input--select option[value=""][disabled] {
  color: var(--color-gray);
}

.input--select:focus {
  color: #000;
}

.select-arrow {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%) rotate(180deg);
  pointer-events: none;
}

/* カレンダーアイコン */
.input-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  display: flex;
  align-items: center;
}

/* ===========================
   エラーメッセージ
   =========================== */
.error-msg {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-red);
  line-height: 30px;
}

/* ===========================
   チェックボックス
   =========================== */
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 60px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

/* ネイティブcheckboxを非表示 */
.checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

/* カスタムチェックボックス */
.checkbox-custom {
  display: block;
  width: 21px;
  height: 21px;
  border: 1px solid var(--color-border);
  border-radius: 5px;
  flex-shrink: 0;
  position: relative;
  background: var(--color-white);
}

.checkbox-custom--checked {
  background: var(--gradient-accent);
  border-color: transparent;
}

.checkbox-custom--checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 9px;
  height: 13px;
  border-right: 2.5px solid #fff;
  border-bottom: 2.5px solid #fff;
  transform: rotate(40deg);
}

.checkbox:checked + .checkbox-custom {
  background: var(--gradient-accent);
  border-color: transparent;
}

.checkbox:checked + .checkbox-custom::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 9px;
  height: 13px;
  border-right: 2.5px solid #fff;
  border-bottom: 2.5px solid #fff;
  transform: rotate(40deg);
}

.checkbox-label {
  font-size: 16px;
  font-weight: 400;
  line-height: 26px;
}

/* ===========================
   ファイルアップロード
   =========================== */
.upload-area {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ドロップゾーン（PC） */
.dropzone {
  width: 100%;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-input);
  background: var(--color-white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 46px 20px;
}

.dropzone-icon {
  display: flex;
  justify-content: center;
}

.dropzone-text {
  font-size: 18px;
  font-weight: 400;
  line-height: 30px;
  text-align: center;
}

/* SP用アップロードボタン */
.upload-btn {
  background: var(--gradient-btn-upload);
  color: var(--color-white);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 30px;
  border-radius: var(--radius-input);
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

/* ファイルリスト */
.file-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 41px;
  border: 1px solid var(--color-border-dark);
  border-radius: var(--radius-input);
  padding: 0 12px;
}

.file-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.file-item-left span {
  font-size: 16px;
  font-weight: 400;
  line-height: 26px;
}

.file-remove {
  display: flex;
  align-items: center;
  padding: 4px;
}

/* ===========================
   個人情報同意
   =========================== */
.consent-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.consent-intro {
  font-size: 15px;
  font-weight: 400;
  line-height: 25px;
}

.consent-box {
  position: relative;
  width: 100%;
  height: 244px;
  border: 1px solid var(--color-border-dark);
  border-radius: var(--radius-input);
  overflow: hidden;
  display: flex;
}

.consent-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 28px 26px;
  scrollbar-width: none;
}

.consent-scroll::-webkit-scrollbar {
  display: none;
}

.consent-header-right {
  font-size: 14px;
  font-weight: 400;
  line-height: 24px;
  text-align: right;
  margin-bottom: 16px;
}

.consent-title {
  font-size: 20px;
  font-weight: 500;
  line-height: 32px;
  margin-bottom: 12px;
}

.consent-body {
  font-size: 14px;
  font-weight: 400;
  line-height: 24px;
}

/* 独自スクロールバー（PC） */
.consent-scrollbar {
  width: 8px;
  background: #f0f0f0;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 4px;
}

.consent-scrollbar-thumb {
  width: 100%;
  height: 60px;
  background: #c0c0c0;
  border-radius: 4px;
}

.consent-check {
  width: 100%;
  justify-content: center;
  gap: 8px;
}

.consent-check .checkbox-label {
  font-size: 18px;
}

/* ===========================
   送信ボタン
   =========================== */
.submit-wrap {
  display: flex;
  justify-content: center;
  padding-bottom: 40px;
}

.submit-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 29px;
  width: 250px;
  height: 60px;
  background: var(--color-gray-btn);
  border-radius: var(--radius-btn);
  padding: 0 22px 0 62px;
  cursor: not-allowed;
}

.submit-btn span {
  font-size: 18px;
  font-weight: 500;
  line-height: 30px;
  white-space: nowrap;
}

.submit-arrow {
  flex-shrink: 0;
}

/* 有効時スタイル */
.submit-btn:not([disabled]) {
  background: var(--gradient-btn-upload);
  cursor: pointer;
}

.submit-btn:not([disabled]) span {
  color: var(--color-white);
}

.submit-btn:not([disabled]) .submit-arrow path {
  stroke: #fff;
}

/* ===========================
   表示切り替え（PC/SP）
   =========================== */
.sp-only {
  display: none;
}

.pc-only {
  display: flex;
}

/* SP時のみ改行を有効化する */
.br-sp {
  display: none;
}

/* ===========================
   メモ用ライン
   =========================== */
.note-red {
  font-size: 15px;
  font-weight: 400;
  color: var(--color-red);
  line-height: 25px;
}

/* ===========================
   thanksページ: STEP3アクティブ（完了・左V字カット形状・ブルー）
   .step--disabled と同形状、色のみ差し替え
   =========================== */
.step--active-last {
  background: linear-gradient(90deg, #8eb4ff 0%, #6590e5 100%);
  color: var(--color-white);
  border-radius: 0 5px 5px 0;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 6px 50%);
  padding-left: 6px;
}

/* ===========================
   thanksページ: フォームカード gap 調整
   入力・確認ページ(52px)より広い 64px
   =========================== */
.form-card--thanks {
  gap: 64px;
}

/* ===========================
   thanksページ: 感謝メッセージエリア
   =========================== */
.thanks-content {
  display: flex;
  flex-direction: column;
  gap: 36px;
  width: 100%;
}

.thanks-title {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  color: #000;
}

.thanks-body {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 28px;
  text-align: center;
  color: #000;
}

.thanks-body p {
  margin-bottom: 0;
}

/* ===========================
   確認ページ: ステップ追加状態
   STEP1完了（グレー・右矢印形状）
   STEP2アクティブ（ブルー・中間形状）
   =========================== */
.step--done {
  background: #e8e8e8;
  color: var(--color-text-gray);
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 50%, calc(100% - 6px) 100%, 0 100%);
  padding-right: 6px;
}

.step--active-mid {
  background: linear-gradient(90deg, #8eb4ff 0%, #6590e5 100%);
  color: var(--color-white);
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 50%, calc(100% - 6px) 100%, 0 100%, 6px 50%);
}

/* ===========================
   確認ページ: 読み取り専用フィールド
   入力フォームの代わりに #f0f0f0 グレー背景で値を表示
   =========================== */
.input--readonly {
  width: 100%;
  min-height: 50px;
  background: #f0f0f0;
  border-radius: var(--radius-input);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: #000;
  padding: 12px 20px;
  line-height: 26px;
  display: flex;
  align-items: center;
}

/* 複数行テキスト（住所など）上揃え */
.input--readonly-tall {
  align-items: flex-start;
  word-break: break-all;
}

/* ===========================
   確認ページ: ファイルアイテム（読み取り専用）
   削除ボタンなし・グレー背景
   =========================== */
.file-item--readonly {
  background: #f0f0f0;
  border: none;
}

/* ===========================
   確認ページ: ボタングループ
   「入力画面に戻る」と「送信」を横並び
   =========================== */
.btn-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding-bottom: 40px;
}

/* 入力画面に戻るボタン */
.btn-back {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 250px;
  height: 60px;
  background: var(--color-white);
  border: 1px solid #4e7bdb;
  border-radius: var(--radius-btn);
  padding: 0 22px;
  cursor: pointer;
}

.btn-back .btn-label {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 18px;
  font-weight: 500;
  color: #4e7bdb;
  line-height: 28px;
  white-space: nowrap;
  flex: 1;
  text-align: center;
}

/* 送信ボタン */
.btn-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 250px;
  height: 60px;
  background: linear-gradient(180deg, #8eb4ff 0%, #6590e5 65.385%);
  border-radius: 30px;
  padding: 0 22px;
  cursor: pointer;
  border: none;
}

.btn-submit .btn-label {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 18px;
  font-weight: 500;
  color: var(--color-white);
  line-height: 28px;
  white-space: nowrap;
  flex: 1;
  text-align: center;
}

/* ===========================
   Tablet対応 (768px ～ 1199px)
   =========================== */
@media (min-width: 768px) and (max-width: 1199px) {
  .container {
    padding: 0 40px; /* 220pxから削減して幅を確保 */
  }

  .form-card {
    padding: 60px 40px; /* カード内部の余白も調整 */
  }
}

/* ===========================
   SP対応 (max-width: 767px)
   =========================== */
@media (max-width: 767px) {

  /* ヒーロー背景 */
  .hero-bg {
    height: 452px;
    background: url('../assets/figma/hero_sp.png') no-repeat center / cover;
  }

  /* コンテナ */
  .container {
    padding: 0 20px;
    gap: 32px;
    align-items: flex-start;
  }

  /* タイトル */
  .title-area {
    padding-top: 52px;
    gap: 20px;
  }

  .title-dot {
    width: 10px;
    height: 10px;
  }

  .title-subtitle p {
    font-size: 16px;
  }

  .title-main {
    font-size: 28px;
  }

  /* フォームカード */
  .form-card {
    width: 100%;
    padding: 40px 20px;
    gap: 40px;
  }

  /* 流れ */
  .flow-title {
    font-size: 14px;
  }

  .flow-text {
    font-size: 13px;
    line-height: 22px;
  }

  .flow-text p {
    line-height: 22px;
  }

  /* ステップ: flex:1 で均等縮小（固定幅なし） */
  .step {
    flex-direction: column;
    gap: 4px;
    justify-content: center;
    align-items: center;
  }

  .step-num,
  .step-label {
    font-size: 12px;
    line-height: 18px;
  }

  /* フォーム本体 */
  .form-body {
    gap: 26px;
    width: 100%;
  }

  /* フォームグループ */
  .form-group {
    gap: 16px;
    width: 100%;
  }

  /* フィールド名 */
  .field-name {
    font-size: 16px;
  }

  .field-accent {
    height: 16px;
  }

  /* バッジ */
  .badge {
    font-size: 12px;
    padding: 5px 6px;
  }

  /* サブラベル */
  .sub-label {
    font-size: 14px;
  }

  /* インプット */
  .input {
    height: 46px;
    font-size: 14px;
    padding: 0 44px 0 12px;
  }

  .input::placeholder {
    font-size: 14px;
  }

  /* チェックボックス */
  .checkbox-group {
    gap: 12px 60px;
  }

  .checkbox-custom {
    width: 20px;
    height: 20px;
  }

  .checkbox-label {
    font-size: 14px;
    line-height: 24px;
  }

  /* ドロップゾーン */
  .pc-only {
    display: none;
  }

  .sp-only {
    display: block;
  }

  .br-sp {
    display: inline;
  }

  .sp-upload .dropzone {
    padding: 32px 40px;
  }

  .dropzone-text {
    font-size: 16px;
    line-height: 28px;
  }

  /* ファイルアイテム */
  .file-item {
    height: 40px;
  }

  .file-item-left span {
    font-size: 14px;
  }

  /* 同意ボックス */
  .consent-box {
    width: 295px;
  }

  .consent-scroll {
    padding: 28px 12px;
  }

  .consent-header-right {
    font-size: 13px;
    line-height: 22px;
  }

  .consent-title {
    font-size: 16px;
    line-height: 28px;
  }

  .consent-body {
    font-size: 13px;
    line-height: 22px;
  }

  .consent-check .checkbox-label {
    font-size: 14px;
    line-height: 24px;
  }

  /* 送信ボタン */
  .submit-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .submit-btn {
    width: 250px;
    height: 60px;
  }

  .submit-btn span {
    font-size: 16px;
  }

  /* 備考・Eメール */
  .note-red {
    font-size: 13px;
    line-height: 22px;
  }

  /* 郵便番号 */
  .sub-field--narrow {
    max-width: 148px;
  }

  /* thanksページ: フォームカード gap */
  .form-card--thanks {
    gap: 36px;
  }

  /* thanksページ: 感謝テキスト */
  .thanks-title {
    font-size: 20px;
    line-height: 30px;
  }

  .thanks-body {
    font-size: 13px;
    line-height: 25px;
    text-align: left;
  }

  /* 確認ページ: 読み取り専用フィールド */
  .input--readonly {
    font-size: 14px;
    padding: 10px 12px;
    min-height: 46px;
    line-height: 24px;
  }

  /* 確認ページ: ファイルアイテム読み取り専用 */
  .file-item--readonly {
    height: 40px;
  }

  /* 確認ページ: ボタングループ（縦積み） */
  .btn-group {
    flex-direction: column;
    gap: 20px;
    width: 100%;
    align-items: center;
  }

  .btn-back .btn-label,
  .btn-submit .btn-label {
    font-size: 16px;
  }
}
