/* ============================================================
   Chat Lady Finder — フロントエンド CSS
   SEO対応：装飾的な絵文字はaria-hidden / セマンティックHTML維持
   レスポンシブ：モバイルファースト設計
   ============================================================ */

/* ---- リセット・変数 ---- */
.clf-finder,
.clf-finder * {
  box-sizing: border-box;
}

.clf-finder {
  --clf-yellow:      #FFD600;
  --clf-yellow-d:    #F9A800;
  --clf-yellow-lt:   #FFF9C4;
  --clf-yellow-pale: #FFFDE7;
  --clf-pink:        #FF80AB;
  --clf-pink-lt:     #FFE4F0;
  --clf-white:       #ffffff;
  --clf-text:        #3D2C00;
  --clf-text-mid:    #6B4F00;
  --clf-radius:      14px;
  --clf-radius-pill: 999px;

  max-width: 680px;
  margin: 0 auto 40px;
  background: var(--clf-yellow-pale);
  border: 2px solid var(--clf-yellow);
  border-radius: 20px;
  padding: 28px 20px;
  box-shadow: 0 4px 24px rgba(255,193,7,.2);
}

/* ---- ステップインジケーター ---- */
.clf-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  gap: 0;
  flex-wrap: nowrap;
}

.clf-step {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.clf-step__dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #ddd0a0;
  color: #9a7a30;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  transition: background .3s, transform .3s;
  flex-shrink: 0;
}

.clf-step.is-active .clf-step__dot {
  background: var(--clf-yellow-d);
  color: #fff;
  transform: scale(1.2);
  box-shadow: 0 3px 10px rgba(249,168,0,.45);
}

.clf-step.is-done .clf-step__dot {
  background: var(--clf-yellow);
  color: var(--clf-text);
}

.clf-step-line {
  height: 3px;
  width: 28px;
  background: #ddd0a0;
  border-radius: 2px;
  flex-shrink: 0;
  transition: background .3s;
}

/* ---- 質問エリア ---- */
.clf-question {
  display: none;
}
.clf-question.is-active {
  display: block;
  animation: clf-in .3s ease both;
}

@keyframes clf-in {
  from { opacity:0; transform:translateY(8px); }
  to   { opacity:1; transform:translateY(0); }
}

.clf-q-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--clf-yellow-d);
  letter-spacing: .08em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.clf-q-label {
  font-size: 17px;
  font-weight: 900;
  color: var(--clf-text);
  margin: 0 0 18px;
  line-height: 1.55;
}

/* ---- 選択肢 ---- */
.clf-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.clf-option {
  width: 100%;
  padding: 13px 16px;
  background: var(--clf-white);
  border: 2px solid var(--clf-yellow);
  border-radius: var(--clf-radius);
  font-size: 14px;
  font-weight: 700;
  color: var(--clf-text);
  cursor: pointer;
  text-align: left;
  line-height: 1.4;
  transition: background .18s, border-color .18s, transform .15s, box-shadow .18s;
}

.clf-option:hover,
.clf-option:focus {
  background: var(--clf-yellow-lt);
  border-color: var(--clf-yellow-d);
  transform: translateX(3px);
  box-shadow: 0 3px 12px rgba(255,193,7,.25);
  outline: none;
}

.clf-option.is-selected {
  background: var(--clf-yellow);
  border-color: var(--clf-yellow-d);
}

/* ---- ローディング ---- */
.clf-loading {
  text-align: center;
  padding: 40px 0;
  color: var(--clf-text-mid);
  font-weight: 700;
}

.clf-loading__spinner {
  width: 42px;
  height: 42px;
  border: 4px solid var(--clf-yellow-lt);
  border-top-color: var(--clf-yellow-d);
  border-radius: 50%;
  animation: clf-spin 1s linear infinite;
  margin: 0 auto 14px;
}

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

/* ---- 結果ヘッダー ---- */
.clf-result-header {
  text-align: center;
  margin-bottom: 20px;
}

.clf-result-header__title {
  font-size: 18px;
  font-weight: 900;
  color: var(--clf-text);
  margin-bottom: 4px;
}

.clf-result-header__sub {
  font-size: 12px;
  color: var(--clf-text-mid);
}

/* ---- 結果カード ---- */
.clf-card {
  background: var(--clf-white);
  border: 2px solid var(--clf-yellow);
  border-radius: 18px;
  padding: 18px 16px;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(255,193,7,.15);
  animation: clf-in .4s ease both;
}

.clf-card:nth-child(2) { animation-delay:.08s; }
.clf-card:nth-child(3) { animation-delay:.16s; }

/* カードヘッダー：ランク＋タイトル横並び */
.clf-card__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

/* 画像ブロック：タイトル下・中央揃え */
.clf-card__img-wrap {
  text-align: center;
  margin-bottom: 14px;
}

.clf-card__rank {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 15px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.clf-card__rank--1 { background: #FFD700; color: #5a3e00; }
.clf-card__rank--2 { background: #C0C0C0; color: #333; }
.clf-card__rank--3 { background: #cd7f32; color: #fff; }

.clf-card__img {
  width: 300px;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  object-fit: contain;
  border: 2px solid var(--clf-yellow-lt);
  display: inline-block;  /* 中央揃えのためinline-block */
}

.clf-card__img-ph {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  background: var(--clf-yellow-lt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}

.clf-card__title {
  font-size: 17px;
  font-weight: 900;
  color: var(--clf-text);
  line-height: 1.3;
}

/* カードテーブル */
.clf-card__table {
  margin-bottom: 12px;
  overflow-x: auto;   /* 横スクロール対応 */
  -webkit-overflow-scrolling: touch;
}

.clf-card__tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 280px;   /* 最小幅でつぶれ防止 */
}

.clf-card__tbl th,
.clf-card__tbl td {
  padding: 7px 10px;
  border: 1px solid #f0e080;
  text-align: left;
  line-height: 1.5;
  vertical-align: top;
}

.clf-card__tbl th {
  background: var(--clf-yellow-lt);
  font-weight: 700;
  color: var(--clf-text-mid);
  white-space: nowrap;
  width: 35%;
}

.clf-card__tbl td {
  color: var(--clf-text);
}

/* 紹介文 */
.clf-card__desc {
  font-size: 13px;
  line-height: 1.85;
  color: var(--clf-text);
  margin-bottom: 14px;
  white-space: pre-line;
}

/* 広告ボタン */
.clf-card__btn {
  display: block;
  width: 100%;
  padding: 14px;
  background: linear-gradient(90deg, var(--clf-yellow) 0%, var(--clf-yellow-d) 100%);
  color: var(--clf-text);
  font-size: 15px;
  font-weight: 900;
  text-align: center;
  border-radius: var(--clf-radius-pill);
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(249,168,0,.38);
  transition: transform .18s, box-shadow .18s;
  letter-spacing: .04em;
}

.clf-card__btn:hover,
.clf-card__btn:focus {
  transform: translateY(-2px);
  box-shadow: 0 7px 20px rgba(249,168,0,.5);
  color: var(--clf-text);
  text-decoration: none;
  outline: 2px solid var(--clf-yellow-d);
  outline-offset: 2px;
}

/* やり直しボタン */
.clf-retry-wrap {
  text-align: center;
  margin-top: 6px;
}

.clf-retry-btn {
  background: none;
  border: 2px solid var(--clf-yellow);
  border-radius: var(--clf-radius-pill);
  padding: 9px 26px;
  font-size: 13px;
  font-weight: 700;
  color: var(--clf-text-mid);
  cursor: pointer;
  transition: background .2s;
}

.clf-retry-btn:hover {
  background: var(--clf-yellow-lt);
}

/* ---- レスポンシブ（480px以下） ---- */
@media (max-width: 480px) {
  .clf-finder {
    padding: 20px 14px;
    border-radius: 16px;
  }

  .clf-step__dot {
    width: 26px;
    height: 26px;
    font-size: 11px;
  }

  .clf-step-line {
    width: 16px;
  }

  .clf-q-label {
    font-size: 15px;
  }

  .clf-option {
    font-size: 13px;
    padding: 11px 14px;
  }

  .clf-card__header {
    gap: 10px;
  }

  .clf-card__title {
    font-size: 15px;
  }

  /* 画像はスマホでもカード幅いっぱいに（max 300px） */
  .clf-card__img {
    width: 100%;
    max-width: 300px;
    height: auto;
  }

  .clf-card__btn {
    font-size: 14px;
    padding: 12px;
  }

  .clf-card__tbl th {
    width: 40%;
    font-size: 12px;
  }
}
