/* =====================================================================
   custom.css — 手書き拡張スタイル
   style.css（Tailwindビルド済み・パージ済み）の後に読み込む。
   既存のデザイントークン（--brand 等のCSS変数）を再利用し、
   ビルド済みCSSに含まれないクラスを安全に追加する。
   ===================================================================== */

/* ---------------------------------------------------------------------
   0. グローバルな見た目の底上げ（軽量・追加的）
   --------------------------------------------------------------------- */
:root {
  /* Tailwind typography tokens: 16px minimum, then 4px increments. */
  --text-xs: 1rem;
  --text-sm: 1rem;
  --text-lg: 1.25rem;
  --text-3xl: 2rem;

  /* AI相談で使うアクセント */
  --aic-radius: 22px;
  --aic-shadow: 0 24px 60px -28px rgba(46, 66, 24, 0.45),
    0 8px 24px -16px rgba(44, 36, 23, 0.18);

  /* --- CTA は「行動色」として、装飾のブランド緑（#5e7b3a）より少し明るく・鮮やかな
     リーフグリーンに設定。raised shadow + 矢印と合わせて“押せる主役ボタン”として識別させる。
     以前の #4a7030 はトーンが重く沈んで見えたため、ほんの少し明度・彩度を上げた。
     AI操作ボタンはソーラー系の淡い緑（.aic-btn）に分離し、CTAとの誤認を防ぐ。 */
  --cta: #54872e;
  --cta-dark: #426c22;

  /* --- 可読性ブラッシュアップ：副次テキストの色を一段深くしてコントラストを底上げ ---
     style.css のトークンを上書き（text-muted / text-muted-light が var() 参照のため全体に波及）。
     ブランドの暖色ブラウン系は保ったまま、本文・注釈の見やすさを改善する。
     ・--muted        #7a6b5a → #695b49（本文上の補足文：約4.6:1 → 約5.9:1）
     ・--muted-light  #a89a88 → #8c7d6b（※注釈・カウンタ等の微細テキスト：約2.9:1 → 約3.6:1） */
  --muted: #695b49;
  --muted-light: #8c7d6b;
}

/* CTA に立体感のある raised button シャドウ（style.css の緑シャドウを上書き）
   0 4px 0 = ボタン底面の影で「浮き上がり」を演出。hover で 2px に縮み押し込む感覚を与える。 */
.shadow-cta {
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.14), 0 10px 24px -8px rgba(74, 112, 48, 0.52);
}
.shadow-cta-hover {
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.12), 0 16px 32px -6px rgba(74, 112, 48, 0.65);
}

/* 日本語の約物・かなを詰めて自然な字送りに（見出しの不自然な余白対策）。
   palt（プロポーショナルメトリクス）を全体に適用しつつ、
   見出しでは特に効果が出る。 */
body {
  /* Typography rule: body text is 16px or larger in 4px increments.
     Only annotation/caution text explicitly marked below may use 12px. */
  font-size: 16px;
  font-feature-settings: "palt" 1;
  text-rendering: optimizeLegibility;
}

/* Arbitrary Tailwind sizes included in the prebuilt stylesheet are also
   normalized here. Annotation text opts back into 12px explicitly. */
.text-\[12px\] {
  font-size: 16px;
}
.annotation-text {
  font-size: 12px !important;
}

@media (min-width: 640px) {
  .sm\:text-\[15px\],
  .sm\:text-\[17px\] {
    font-size: 16px;
  }
  .sm\:text-\[18px\],
  .sm\:text-\[19px\] {
    font-size: 20px;
  }
  .sm\:text-\[46px\] {
    font-size: 48px;
  }
}

/* 見出し（Noto Serif JP）の字間・行間を微調整して上質に */
.font-display {
  letter-spacing: 0.01em;
  line-height: 1.55;
  font-feature-settings: "palt" 1;
}

/* キーボード操作時のフォーカスリングを統一（アクセシビリティ＋上質感） */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 6px;
}

/* アンカースクロール時にヘッダー分のオフセットを確保 */
section[id] {
  scroll-margin-top: 72px;
}

/* Header disclosure label: keep the advertising indication compact and clear. */
.header-pr-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--brand);
  border-radius: 0.25rem;
  color: var(--brand-dark);
  background: var(--surface);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.08em;
}

/* Footer links mirror the reference LP's information while retaining this LP's palette. */
.site-footer-admin {
  line-height: 2;
}
.site-footer-admin span,
.site-footer-admin a {
  white-space: nowrap;
}
.site-footer-admin a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.site-footer-admin a:hover {
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, 0.8);
}
.site-footer-separator {
  margin: 0 0.5rem;
  color: rgba(255, 255, 255, 0.35);
}

@media (max-width: 420px) {
  .site-footer-separator {
    margin: 0 0.25rem;
  }
}

/* =====================================================================
   1. 住まいAI相談室（#ai-consult）
   ===================================================================== */

/* セクション見出し周りに余白のリズムを少し追加 */
#ai-consult .aic-lead {
  margin-top: 16px;
}

/* ---- チャットウィンドウ本体 ---------------------------------------- */
.aic-window {
  position: relative;
  margin-top: 40px;
  border-radius: var(--aic-radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--aic-shadow);
  overflow: hidden;
}

/* ---- ヘッダー（ブランドグラデーションで“相談室”の世界観を出す） ---- */
.aic-header {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #4a6b2d 0%, #5e7b3a 60%, #6b8a44 100%);
  color: #fff;
  overflow: hidden;
}
/* ヘッダーにやわらかな光沢 */
.aic-header::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    120% 140% at 12% -20%,
    rgba(255, 255, 255, 0.22),
    rgba(255, 255, 255, 0) 55%
  );
  pointer-events: none;
}
.aic-header__info {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
  line-height: 1.3;
}
.aic-header__name {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.02em;
}
.aic-header__status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.85);
}
.aic-header__status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #b6f08a;
  box-shadow: 0 0 0 3px rgba(182, 240, 138, 0.3);
  animation: aic-pulse 2s ease-in-out infinite;
}
/* 右上の進捗ピル（#diagnosis-progress） */
.aic-pill {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.02em;
  backdrop-filter: blur(4px);
}

/* ヘッダー内アバター（白い受け皿でAIアイコンを際立たせる） */
.aic-header .aic-avatar {
  position: relative;
  z-index: 1;
}

/* ---- チャット本体エリア -------------------------------------------- */
.aic-body {
  position: relative;
  min-height: 240px;
  padding: 22px 18px 24px;
  background: var(--surface);
}
/* ごく薄いドットテクスチャでチャット画面らしさを演出 */
.aic-body::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--brand) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: 0.05;
  pointer-events: none;
}
.aic-body > * {
  position: relative;
  z-index: 1;
}

@media (min-width: 640px) {
  .aic-body {
    min-height: 0;
    padding: 26px 24px 28px;
  }
}

/* ---- AIアバター ----------------------------------------------------- */
.aic-avatar {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  overflow: visible;
}
.aic-avatar > .aic-avatar__inner {
  position: relative;
  display: flex;
  width: 100%;
  height: 100%;
  border-radius: 13px;
  overflow: hidden;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(94, 123, 58, 0.18);
}
.aic-avatar img {
  position: absolute;
  inset: 1px;
  width: calc(100% - 2px);
  height: calc(100% - 2px);
  object-fit: contain;
}
.aic-avatar svg {
  margin: auto;
  width: 56%;
  height: 56%;
  color: var(--brand);
}
/* オンラインドット */
.aic-avatar--online::after {
  content: "";
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--ok);
  border: 2px solid var(--surface);
}
.aic-avatar--sm {
  width: 36px;
  height: 36px;
  border-radius: 11px;
}
.aic-avatar--sm > .aic-avatar__inner {
  border-radius: 11px;
}
/* 大きめ（ヘッダー・ヒーロー・FAB用） */
.aic-avatar--lg {
  width: 54px;
  height: 54px;
  border-radius: 17px;
}
.aic-avatar--lg > .aic-avatar__inner {
  border-radius: 17px;
}
/* 丸型（FAB用） */
.aic-avatar--round,
.aic-avatar--round > .aic-avatar__inner {
  border-radius: 999px;
}

/* やわらかな脈動リング（明るい背景向け。AIが応対中の雰囲気） */
.aic-avatar--glow::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(94, 123, 58, 0.38);
  animation: aic-ring 2.4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes aic-ring {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(94, 123, 58, 0.38);
  }
  50% {
    box-shadow: 0 0 0 9px rgba(94, 123, 58, 0);
  }
}

/* ヘッダー内アバターは白枠を少し強調 */
.aic-header .aic-avatar > .aic-avatar__inner {
  box-shadow: inset 0 0 0 1px rgba(94, 123, 58, 0.12),
    0 2px 10px rgba(0, 0, 0, 0.14);
}

/* ---- 吹き出し ------------------------------------------------------- */
.aic-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.aic-bubble {
  position: relative;
  width: 100%;
  padding: 14px 14px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 8px 22px -14px rgba(44, 36, 23, 0.28);
}
@media (min-width: 640px) {
  .aic-bubble {
    padding: 16px 18px;
  }
}
.aic-bubble__lead {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.7;
  color: rgba(44, 36, 23, 0.92);
}
.aic-bubble__sub {
  margin-top: 6px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
}
.aic-bubble__qlabel {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: rgba(94, 123, 58, 0.75);
}
.aic-bubble__q {
  margin-top: 4px;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.5;
  color: var(--brand-dark);
  font-feature-settings: "palt" 1;
  letter-spacing: -0.01em;
}
@media (min-width: 640px) {
  .aic-bubble__q {
    font-size: 20px;
    line-height: 1.55;
  }
}

/* ---- 特徴バッジ ----------------------------------------------------- */
.aic-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.aic-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--brand-light);
  color: var(--brand-dark);
  font-size: 16px;
  font-weight: 800;
}
.aic-badge svg {
  width: 14px;
  height: 14px;
  color: var(--brand);
}

/* ---- ステップ進捗バー ----------------------------------------------- */
/* ステップヘッダー（戻るボタン＋進捗バー） */
.aic-stepbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.aic-back {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
  padding: 5px 10px 5px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.aic-back svg {
  width: 14px;
  height: 14px;
}
.aic-back:hover {
  color: var(--brand-dark);
  border-color: rgba(94, 123, 58, 0.4);
  background: var(--brand-light);
}
.aic-steps {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
}
/* ステップヘッダー内ではバー自身の下余白は不要 */
.aic-stepbar .aic-steps {
  flex: 1;
  margin-bottom: 0;
}

/* 自由記入の注意書き */
.aic-note {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted-light);
}
.aic-seg {
  height: 6px;
  flex: 1;
  border-radius: 999px;
  background: rgba(94, 123, 58, 0.18);
  overflow: hidden;
  transition: background 0.3s ease;
}
.aic-seg--done {
  background: var(--brand);
}
.aic-seg--active {
  background: rgba(94, 123, 58, 0.22);
}
.aic-seg--active::after {
  content: "";
  display: block;
  height: 100%;
  width: 55%;
  border-radius: 999px;
  background: var(--brand);
  animation: aic-grow 0.5s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

/* ---- 選択肢ボタン --------------------------------------------------- */
.aic-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}
.aic-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  background: #fff;
  border: 1.5px solid rgba(94, 123, 58, 0.22);
  text-align: left;
  font-size: 16px;
  font-weight: 700;
  color: var(--brand-dark);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease,
    background 0.18s ease, box-shadow 0.18s ease;
}
.aic-option__num {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 9px;
  background: var(--brand-light);
  color: var(--brand);
  font-size: 16px;
  font-weight: 900;
  transition: background 0.18s ease, color 0.18s ease;
}
.aic-option__label {
  flex: 1;
  min-width: 0;
  line-height: 1.5;
}
.aic-option__arrow {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: rgba(94, 123, 58, 0.45);
  transition: transform 0.18s ease, color 0.18s ease;
}
.aic-option:hover {
  border-color: var(--brand);
  background: var(--brand-light);
  transform: translateY(-2px);
  box-shadow: 0 14px 26px -16px rgba(94, 123, 58, 0.55);
}
.aic-option:hover .aic-option__num {
  background: var(--brand);
  color: #fff;
}
.aic-option:hover .aic-option__arrow {
  color: var(--brand);
  transform: translateX(3px);
}
.aic-option:active {
  transform: translateY(0);
}

/* ---- 自由記入 ------------------------------------------------------- */
.aic-textarea-wrap {
  position: relative;
  margin-top: 18px;
}
.aic-textarea {
  width: 100%;
  resize: none;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: #fff;
  padding: 14px 16px 28px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--foreground);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.aic-textarea::placeholder {
  color: var(--muted-light);
}
.aic-textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(94, 123, 58, 0.14);
}
.aic-counter {
  position: absolute;
  right: 12px;
  bottom: 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted-light);
  pointer-events: none;
}

/* ---- アクション行 --------------------------------------------------- */
.aic-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}
.aic-skip {
  font-size: 16px;
  font-weight: 700;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  text-underline-offset: 2px;
}
.aic-skip:hover {
  text-decoration: underline;
}

/* ---- AI操作ボタン（セカンダリ＝“ツール操作”）-----------------------
   申込フォームへ誘導するCTA（塗りつぶし＋raised）と役割を分けるため、
   AIの操作ボタン（相談をはじめる／AIに相談する）は淡いブランド緑の
   ソフトボタンにする。塗り＝CTA、淡い緑＝AI操作、テラコッタ＝AI経由CV、の3階層。 */
.aic-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 50px;
  padding: 0 24px;
  border-radius: 16px;
  border: 1.5px solid rgba(94, 123, 58, 0.42);
  background: var(--brand-light);
  color: var(--brand-dark);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 20px -14px rgba(94, 123, 58, 0.5);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease,
    border-color 0.18s ease;
}
.aic-btn svg {
  width: 18px;
  height: 18px;
  color: var(--brand);
  transition: transform 0.18s ease;
}
.aic-btn:hover {
  transform: translateY(-2px);
  background: #e3edd4;
  border-color: var(--brand);
  box-shadow: 0 12px 26px -14px rgba(94, 123, 58, 0.6);
}
.aic-btn:hover svg {
  transform: translateX(3px);
}
.aic-btn:active {
  transform: translateY(0);
}
.aic-start-wrap {
  margin-top: 22px;
  text-align: center;
}
.aic-btn--lg {
  height: 56px;
  padding: 0 30px;
  font-size: 16px;
  width: 100%;
}
/* 申込フォームへ送る本命CV用（テラコッタ）。
   AIの操作ボタン（相談をはじめる/AIに相談する＝緑）と色で役割を分ける。 */
.aic-btn--cv {
  background: linear-gradient(135deg, #d9682e, #bb541e);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 14px 30px -12px rgba(217, 104, 46, 0.72);
}
.aic-btn--cv svg {
  color: #fff;
}
.aic-btn--cv:hover {
  background: linear-gradient(135deg, #e0712f, #c45a20);
  box-shadow: 0 18px 36px -12px rgba(217, 104, 46, 0.8);
}

/* ---- ローディング（タイピング） ------------------------------------- */
.aic-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 0;
  text-align: center;
}
.aic-typing {
  display: inline-flex;
  gap: 6px;
  padding: 14px 18px;
  border-radius: 4px 16px 16px 16px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 6px 18px -12px rgba(44, 36, 23, 0.25);
}
.aic-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(94, 123, 58, 0.6);
  animation: aic-bounce 1.2s infinite ease-in-out;
}
.aic-dot:nth-child(2) {
  animation-delay: 0.15s;
}
.aic-dot:nth-child(3) {
  animation-delay: 0.3s;
}
.aic-loading__text {
  margin-top: 16px;
  font-size: 16px;
  font-weight: 700;
  color: var(--muted);
}

/* ---- 結果 ----------------------------------------------------------- */
.aic-result {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.aic-result__head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.aic-result__head-text {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
  font-weight: 900;
  color: var(--brand-dark);
}
.aic-result__head-text svg {
  width: 16px;
  height: 16px;
  color: var(--brand);
}
.aic-card {
  border-radius: 16px;
  border: 1px solid rgba(94, 123, 58, 0.18);
  background: #fff;
  padding: 16px 18px;
}
.aic-card__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--brand);
}
.aic-answer {
  background: var(--brand-light);
  border-color: rgba(94, 123, 58, 0.22);
}
.aic-answer p.aic-card__text {
  margin-top: 8px;
  font-size: 16px;
  line-height: 1.8;
  color: var(--brand-darker);
}
.aic-card__text {
  font-size: 16px;
  line-height: 1.8;
  color: rgba(44, 36, 23, 0.92);
}
.aic-advice {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 12px;
}
.aic-advice__item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid rgba(94, 123, 58, 0.12);
  font-size: 16px;
  line-height: 1.75;
  color: rgba(44, 36, 23, 0.92);
}
.aic-advice__item:first-child {
  border-top: none;
  padding-top: 4px;
}
.aic-advice__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 8px;
  background: var(--brand-light);
  color: var(--brand);
}
.aic-advice__icon svg {
  width: 13px;
  height: 13px;
}
/* ---- AIによる最新リサーチ（市場 / すまいリクエスト） ---------------- */
.aic-research {
  background: var(--brand-light);
  border-color: rgba(94, 123, 58, 0.22);
}
.aic-research .aic-card__label svg {
  width: 13px;
  height: 13px;
  color: var(--brand);
}
.aic-research__list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.aic-research__item {
  padding: 12px 0;
  border-top: 1px solid rgba(94, 123, 58, 0.16);
}
.aic-research__item:first-child {
  border-top: none;
  padding-top: 4px;
}
.aic-research__sublabel {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 800;
  color: var(--brand-dark);
}
.aic-research__text {
  margin: 0;
  font-size: 16px;
  line-height: 1.8;
  color: rgba(44, 36, 23, 0.92);
}

/* ---- 次の一歩（CTAへの橋渡し） ------------------------------------- */
.aic-nextstep {
  margin: 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--brand);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.75;
}

.aic-cta-wrap {
  margin-top: 6px;
  text-align: center;
}
.aic-restart {
  margin-top: 14px;
  font-size: 16px;
  font-weight: 700;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  text-underline-offset: 2px;
}
.aic-restart:hover {
  text-decoration: underline;
}
.aic-disclaimer {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted-light);
}

/* ---- フラット表示（カードで囲まない・renove寄せ）：見立て＋ヘアライン区切りのセクション ---- */
.aic-result--flat { gap: 0; }
.aic-verdict { padding: 2px 0 2px; }
.aic-verdict__text {
  margin: 8px 0 0;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.6;
  color: var(--brand-darker);
}
.aic-sec {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(94, 123, 58, 0.18);
}
.aic-sec__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: var(--brand);
}
.aic-sec__label svg { width: 14px; height: 14px; color: var(--brand); }
.aic-sec__lead {
  margin: 10px 0 0;
  font-size: 16px;
  line-height: 1.85;
  font-weight: 700;
  color: var(--brand-darker);
}
.aic-sec__text {
  margin: 10px 0 0;
  font-size: 16px;
  line-height: 1.85;
  color: rgba(44, 36, 23, 0.92);
}
.aic-sec__lead + .aic-sec__text { margin-top: 6px; }
.aic-result--flat .aic-cta-wrap { margin-top: 24px; }
.aic-result--flat .aic-disclaimer { margin-top: 14px; }

/* ---- 各ステップの登場アニメーション --------------------------------- */
.aic-enter > * {
  animation: aic-pop 0.45s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}
.aic-enter > *:nth-child(2) {
  animation-delay: 0.06s;
}
.aic-enter > *:nth-child(3) {
  animation-delay: 0.12s;
}
.aic-enter > *:nth-child(4) {
  animation-delay: 0.18s;
}
.aic-options .aic-option {
  animation: aic-pop 0.4s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}
.aic-options .aic-option:nth-child(2) {
  animation-delay: 0.05s;
}
.aic-options .aic-option:nth-child(3) {
  animation-delay: 0.1s;
}
.aic-options .aic-option:nth-child(4) {
  animation-delay: 0.15s;
}

@keyframes aic-pop {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes aic-bounce {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  30% {
    transform: translateY(-7px);
    opacity: 1;
  }
}
@keyframes aic-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 3px rgba(182, 240, 138, 0.3);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(182, 240, 138, 0.12);
  }
}
@keyframes aic-grow {
  from {
    width: 0;
  }
  to {
    width: 55%;
  }
}

/* 動きを控えたいユーザーへの配慮 */
@media (prefers-reduced-motion: reduce) {
  .aic-enter > *,
  .aic-options .aic-option,
  .aic-seg--active::after,
  .aic-dot,
  .aic-header__status::before,
  .aic-avatar--glow::before {
    animation: none !important;
  }
}

/* =====================================================================
   2. FV AI導線 / フローティング AI 相談ボタン（常時表示）
   ・FV内: 画面下部のAI CTAは非表示
   ・モバイル: FV通過後は邪魔にならないアイコンのみの丸ボタン
   ・PC: ラベル付きの横長ボタン
   ・スクロールで StickyCTA が出たら、その上へ JS が押し上げる（bottom を上書き）
   ===================================================================== */
.hero-ai-link {
  display: inline-flex;
  width: min(100%, 390px);
  align-items: center;
  gap: 11px;
  padding: 9px 13px 9px 9px;
  border: 1px solid rgba(94, 123, 58, 0.24);
  border-radius: 18px;
  background: rgba(253, 251, 248, 0.92);
  box-shadow: 0 12px 28px -18px rgba(46, 66, 24, 0.58);
  backdrop-filter: blur(8px);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.hero-ai-link:hover {
  transform: translateY(-1px);
  border-color: rgba(94, 123, 58, 0.42);
  box-shadow: 0 16px 34px -18px rgba(46, 66, 24, 0.66);
}
.hero-ai-link__avatar {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
}
.hero-ai-link__body {
  min-width: 0;
  flex: 1 1 auto;
  line-height: 1.35;
}
.hero-ai-link__body b,
.hero-ai-link__body span {
  display: block;
}
.hero-ai-link__body b {
  font-size: 16px;
  font-weight: 900;
  color: var(--brand-dark);
}
.hero-ai-link__body span {
  margin-top: 2px;
  font-size: 16px;
  font-weight: 700;
  color: rgba(44, 36, 23, 0.66);
}
.hero-ai-link__icon {
  flex: 0 0 auto;
  color: var(--brand);
}

.ai-fab {
  position: fixed;
  z-index: 50; /* StickyCTA(z-40) より前面 */
  right: 14px;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: center;
  gap: 0;
  padding: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(94, 123, 58, 0.25);
  box-shadow: 0 12px 30px -10px rgba(46, 66, 24, 0.5);
  backdrop-filter: blur(6px);
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.3, 1),
    box-shadow 0.2s ease, bottom 0.25s ease, opacity 0.2s ease;
}
.ai-fab--hidden {
  pointer-events: none;
  opacity: 0;
  transform: translateY(12px);
}
.ai-fab .aic-avatar {
  width: 50px;
  height: 50px;
}
.ai-fab__label {
  display: none; /* モバイルはアイコンのみ */
}
.ai-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px -12px rgba(46, 66, 24, 0.58);
}
.ai-fab:active {
  transform: scale(0.96);
}

@media (min-width: 640px) {
  .ai-fab {
    right: 24px;
    bottom: 24px;
    gap: 11px;
    padding: 8px 18px 8px 8px;
  }
  .ai-fab .aic-avatar {
    width: 54px;
    height: 54px;
  }
  .ai-fab__label {
    display: block;
    line-height: 1.25;
  }
}
.ai-fab__label b {
  display: block;
  font-size: 16px;
  font-weight: 900;
  color: var(--brand-dark);
}
.ai-fab__label span {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: rgba(44, 36, 23, 0.66);
}

/* =====================================================================
   3. ユーティリティ
   ===================================================================== */

/* お悩みカード：バッジの inline-flex 行間スペースを除去してタイトルと自然に詰める */
.worry-num-badge {
  display: block;
  width: fit-content;
  line-height: 1;
}

/* セクション間の気づきはCTAと競合しない、温かいサンド色の案内表示にする */
.cause-hint {
  border: 1px solid #d8c59e;
  background: #f3ead7;
  color: #5f4b2f;
  box-shadow: 0 8px 22px -16px rgba(95, 75, 47, 0.38);
}
.cause-hint span {
  text-decoration-color: rgba(166, 116, 40, 0.55);
}
.hint-icon {
  border: 1px solid #d8c59e;
  background: #f3ead7;
  color: #a67428;
  box-shadow: 0 10px 24px -16px rgba(95, 75, 47, 0.45);
}

/* FAQアイコン：CTAの濃い緑から離し、読み物・解説として自然な淡いセージにする */
.faq-q-badge {
  border: 1px solid #c6d8b7;
  background: #edf4e8;
  color: #5f7d4b;
}
.faq-a-badge {
  border: 1px solid #d6cda8;
  background: #f3efd9;
  color: #6f6a31;
}

/* 安心宣言：信頼感のあるブルーグリーンに寄せ、CTA色との競合を避ける */
.assurance-shield-icon {
  border: 1px solid #c6d8b7;
  background: #edf4e8;
  color: #5f7d4b;
  box-shadow: 0 12px 28px -18px rgba(95, 125, 75, 0.52);
}
.assurance-note-icon {
  color: #5f7d4b;
}

/* 「これから」はボタン風の濃色塗りを避け、淡いセージの情報パネルとして強調 */
.next-direction-card {
  border: 1px solid #b9cba2;
  background: #e8efe1;
  color: var(--brand-darker);
  box-shadow: 0 10px 26px -20px rgba(46, 66, 24, 0.42);
}
.next-direction-card__label {
  color: var(--brand-dark);
}
.next-direction-card__note {
  color: #59684a;
}

@media (min-width: 640px) {
  .worry-num-badge {
    margin: 0 auto;
  }
}

/* ヒーロー注釈：PCサイズで右端から少し内側に配置 */
@media (min-width: 640px) {
  .hero-note {
    right: 20px;
  }
}

/* FAQ の質問文：行端まで詰めてから折り返す自然な（greedy）折り返しにする。
   text-wrap: balance / word-break: auto-phrase は1行目が途中で短く終わり不自然なため不使用。
   日本語の標準の禁則処理（行頭に 。、 や小書きかなを置かない）はブラウザ既定に任せる。 */
.faq-q {
  text-wrap: normal;
}
/* スマホでは質問文の表示幅を確保するため、ボタンの左右パディングと余白を少し詰める */
@media (max-width: 639px) {
  .faq-btn {
    padding-left: 18px;
    padding-right: 16px;
    gap: 10px;
  }
}

/* Q1〜Q3 見出し（`.min-w-0` を付与）：左の Q バッジと横並び（flex）のため、
   flex アイテムが既定の min-width:auto だと折り返さず右にあふれることがある。
   `min-w-0` で確実に利用幅内で折り返させる。サイズはスマホ24px / PC32px（固定）。
   折り返しは text-balance を使わず、行端まで詰めてから折り返す自然な挙動にしている。 */
