/* ============================================================
   survey.css
   アンケートセクション専用スタイル
   女性向け美容系 / 白ベース / アクセント：#F98377 #FE9476 #FFC7A0
   ============================================================ */

/* ---- カラー変数 ---- */
:root {
  --s-text:       #3B3C3E;
  --s-accent1:    #F98377;
  --s-accent2:    #FE9476;
  --s-accent3:    #FFC7A0;
  --s-bg:         #ffffff;
  --s-bg-soft:    #FFF8F6;
  --s-border:     #FFD9CC;
  --s-radius-lg:  20px;
  --s-radius-md:  14px;
  --s-radius-sm:  10px;
  --s-shadow:     0 4px 20px rgba(249, 131, 119, 0.12);
  --s-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   SURVEY SECTION — 固定ラッパー
   ============================================================ */
#survey-section {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  background: var(--s-bg-soft);
  z-index: 100;
  /* スクロールバーを細くして美しく */
  scrollbar-width: thin;
  scrollbar-color: var(--s-accent3) transparent;
}
#survey-section::-webkit-scrollbar {
  width: 4px;
}
#survey-section::-webkit-scrollbar-thumb {
  background: var(--s-accent3);
  border-radius: 4px;
}

/* アンケート完了後：fixed解除 */
#survey-section.survey-done {
  position: relative;
  height: auto;
  overflow: visible;
  background: transparent;
}

#survey-inner {
  max-width: 750px;
  margin: 0 auto;
  padding: 0 0 40px;
  min-height: 100%;
}

/* ============================================================
   LP CONTENT — アンケート完了前は非表示
   ============================================================ */
#lp-content {
  display: none;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--s-transition), transform var(--s-transition);
}
#lp-content.lp-visible {
  display: block;
}
#lp-content.lp-animate {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   キャッチコピー領域
   ============================================================ */
.survey-catchcopy {
  background: linear-gradient(160deg, #fff5f3 0%, #fff0eb 60%, #fff8f5 100%);
  padding: 40px 24px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
/* 装飾的な背景の丸 */
.survey-catchcopy::before,
.survey-catchcopy::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.survey-catchcopy::before {
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(255,199,160,0.25) 0%, transparent 70%);
  top: -40px;
  right: -30px;
}
.survey-catchcopy::after {
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(249,131,119,0.15) 0%, transparent 70%);
  bottom: -20px;
  left: 10px;
}

.survey-catch-sub {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--s-accent1);
  font-weight: 600;
  margin: 0 0 10px;
  text-transform: none;
  position: relative;
  z-index: 1;
}
.survey-catch-sub::before,
.survey-catch-sub::after {
  content: "—";
  margin: 0 8px;
  opacity: 0.6;
}

.survey-catch-main {
  font-size: clamp(22px, 5.5vw, 30px);
  font-weight: 700;
  color: var(--s-text);
  line-height: 1.5;
  margin: 0 0 14px;
  letter-spacing: 0.02em;
  position: relative;
  z-index: 1;
}

.survey-catch-desc {
  font-size: 13px;
  color: #7a7b7d;
  line-height: 1.8;
  margin: 0;
  position: relative;
  z-index: 1;
}

/* ============================================================
   プログレスバー
   ============================================================ */
.survey-progress-wrap {
  padding: 18px 24px 14px;
  background: var(--s-bg);
  border-bottom: 1px solid #fde8e3;
  position: sticky;
  top: 0;
  z-index: 10;
}

.survey-progress-label {
  font-size: 12px;
  color: var(--s-accent1);
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}
.survey-progress-label #progress-current {
  font-size: 16px;
}
.survey-progress-sep {
  margin: 0 2px;
  opacity: 0.5;
}

.survey-progress-bar {
  height: 5px;
  background: #fde8e3;
  border-radius: 10px;
  overflow: hidden;
}
.survey-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--s-accent3), var(--s-accent1));
  border-radius: 10px;
  width: 25%;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   質問カードコンテナ
   ============================================================ */
#survey-cards-wrap {
  padding: 0;
}

/* ============================================================
   質問カード
   ============================================================ */
.survey-card {
  display: none;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--s-transition), transform var(--s-transition);
}

.survey-card.active {
  display: block;
}
.survey-card.slide-in {
  opacity: 1;
  transform: translateY(0);
}
/* 回答済みカード（次の質問の下に積み重なる表示用） */
.survey-card.answered {
  display: block;
  opacity: 0.6;
  pointer-events: none;
}

/* ---- カード内：画像 ---- */
.survey-card-image {
  width: 100%;
  overflow: hidden;
  background: linear-gradient(135deg, #FFD9CC 0%, #FFEBE3 50%, #FFF5F0 100%);
  position: relative;
  max-width: 750px;
  margin: 0 auto;
}

.survey-img {
  /* imgタグを上書きするためにstyle属性より優先 */
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  margin: 0 !important;
}

/* ダミー画像（img読み込み失敗時） */
.survey-img-dummy {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  background: linear-gradient(135deg, #FFD9CC 0%, #FFEBE3 50%, #FFF5F0 100%);
}
.survey-img-dummy::before {
  content: "👤";
  font-size: 48px;
  opacity: 0.4;
}
.survey-img-dummy span {
  font-size: 11px;
  color: var(--s-accent1);
  letter-spacing: 0.05em;
  opacity: 0.7;
}

/* ---- カード内：本文 ---- */
.survey-card-body {
  padding: 24px 20px 28px;
  background: var(--s-bg);
}
@media screen and (min-width: 541px) {
  .survey-card-body {
    padding: 32px 32px 36px;
  }
}

/* 質問番号バッジ */
.survey-qnum {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  background: linear-gradient(135deg, var(--s-accent3), var(--s-accent1));
  color: #fff;
  font-weight: 700;
  font-size: 17px;
  padding: 5px 14px 5px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 8px rgba(249,131,119,0.3);
}
.survey-qnum span {
  font-size: 17px;
  margin-left: 1px;
}

/* 質問文 */
.survey-question {
  font-size: clamp(15px, 3.8vw, 18px);
  font-weight: 700;
  color: var(--s-text);
  line-height: 1.65;
  margin: 0 0 22px;
  letter-spacing: 0.02em;
}

/* ============================================================
   回答ボタン
   ============================================================ */
.survey-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.survey-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 18px;
  background: var(--s-bg);
  border: 2px solid var(--s-border);
  border-radius: var(--s-radius-md);
  cursor: pointer;
  text-align: left;
  transition:
    background var(--s-transition),
    border-color var(--s-transition),
    transform 0.15s ease,
    box-shadow var(--s-transition);
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.survey-btn:active {
  transform: scale(0.98);
}

/* チェックボックス風アイコン */
.survey-btn-check {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: 2px solid var(--s-border);
  border-radius: 50%;
  background: #fff;
  position: relative;
  transition:
    background var(--s-transition),
    border-color var(--s-transition);
}
.survey-btn-check::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ボタンテキスト */
.survey-btn-text {
  font-size: clamp(13px, 3.2vw, 15px);
  font-weight: 600;
  color: var(--s-text);
  line-height: 1.4;
  letter-spacing: 0.02em;
  transition: color var(--s-transition);
}

/* 選択状態 */
.survey-btn.selected {
  background: linear-gradient(135deg, #fff5f3 0%, #ffeee9 100%);
  border-color: var(--s-accent1);
  box-shadow: 0 4px 16px rgba(249,131,119,0.18);
}
.survey-btn.selected .survey-btn-check {
  background: linear-gradient(135deg, var(--s-accent3), var(--s-accent1));
  border-color: var(--s-accent1);
}
.survey-btn.selected .survey-btn-check::after {
  transform: translate(-50%, -50%) scale(1);
}
.survey-btn.selected .survey-btn-text {
  color: var(--s-accent1);
}

/* ホバー（PC） */
@media (hover: hover) {
  .survey-btn:hover:not(.selected) {
    border-color: var(--s-accent3);
    background: #fffaf8;
    box-shadow: 0 4px 12px rgba(255,199,160,0.2);
  }
}

/* ============================================================
   完了メッセージ（オプション：全問回答後に一瞬表示）
   ============================================================ */
#survey-complete-msg {
  display: none;
  text-align: center;
  padding: 48px 24px;
  background: var(--s-bg);
}
#survey-complete-msg.show {
  display: block;
  animation: fadeInUp 0.4s ease forwards;
}
.survey-complete-icon {
  font-size: 48px;
  margin-bottom: 16px;
}
.survey-complete-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--s-text);
  margin-bottom: 8px;
}
.survey-complete-sub {
  font-size: 13px;
  color: #9a9b9d;
  line-height: 1.7;
}

/* ============================================================
   アニメーション定義
   ============================================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   スマホ最適化
   ============================================================ */
@media screen and (max-width: 374px) {
  .survey-catch-main {
    font-size: 20px;
  }
  .survey-card-body {
    padding: 20px 16px 24px;
  }
  .survey-btn {
    padding: 14px 14px;
    gap: 12px;
  }
}
