/* ========================================
   Yes/No 診断チャート - CSS
   WP-Search (マニュオン) スタイル参考
======================================== */

:root {
  --color-primary: #000000;
  --color-secondary: #333333;
  --color-accent: #0066cc;
  --color-bg: #fdfdfd;
  --color-gray: #f7f7f7;
  --color-border: #e0e0e0;
  --color-success: #4caf50;
  --color-gradient-1: #d8ffff;
  --color-gradient-2: #87e7ff;
  --font-family: "游ゴシック体", "Yu Gothic", YuGothic, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  --container-width: 800px;
  --border-radius: 12px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* リセット & ベース */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  font-weight: 500;
  background-color: var(--color-bg);
  color: var(--color-secondary);
  line-height: 1.8;
  letter-spacing: 0.05em;
  min-height: 100vh;
  padding: 40px 20px;
}

/* コンテナ */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
}

/* メインタイトル */
.main-title {
  text-align: center;
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin-bottom: 40px;
  color: var(--color-primary);
}

/* ========================================
   診断チャート本体
======================================== */
.yesno-wrap {
  background: #ffffff;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 40px;
  position: relative;
  overflow: hidden;
}

/* 上部のアクセントライン */
.yesno-wrap::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-gradient-1), var(--color-gradient-2));
}

/* ========================================
   質問エリア
======================================== */
.question-area {
  margin-bottom: 30px;
  animation: fadeInUp 0.5s ease;
}

.question-card {
  text-align: center;
}

.question-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: var(--color-primary);
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: bold;
  border-radius: 50%;
  margin-bottom: 20px;
}

.question-label span {
  font-size: 1.5rem;
  margin-left: 2px;
}

.question-title {
  font-size: 1.1rem;
  color: var(--color-accent);
  margin-bottom: 10px;
  font-weight: 600;
}

.question-text {
  font-size: 1.25rem;
  color: var(--color-primary);
  font-weight: 600;
  line-height: 1.6;
}

/* ========================================
   選択肢ボタン
======================================== */
.choices {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 30px;
}

.choices li {
  width: 100%;
}

.choice-btn {
  width: 100%;
  padding: 18px 24px;
  font-size: 1.1rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--color-primary);
  background: var(--color-gray);
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.choice-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transition: left 0.5s ease;
}

.choice-btn:hover {
  background: #ffffff;
  border-color: var(--color-primary);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.choice-btn:hover::before {
  left: 100%;
}

.choice-btn:active {
  transform: translateY(0);
}

/* 2カラムレイアウト (選択肢が2つの場合) */
.choices.two-columns {
  flex-direction: row;
  gap: 16px;
}

.choices.two-columns li {
  flex: 1;
}

/* ========================================
   進捗バー
======================================== */
.progress-wrap {
  height: 6px;
  background: var(--color-gray);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--color-gradient-1), var(--color-gradient-2));
  border-radius: 3px;
  transition: width 0.5s ease;
}

.progress-text {
  text-align: center;
  font-size: 0.85rem;
  color: #999;
}

/* ========================================
   結果エリア
======================================== */
.result-area {
  text-align: center;
  animation: fadeInUp 0.6s ease;
}

.result-area.hidden {
  display: none;
}

.result-card {
  background: linear-gradient(135deg, var(--color-gradient-1), var(--color-gradient-2));
  border-radius: var(--border-radius);
  padding: 40px 30px;
  margin-bottom: 20px;
}

.result-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.result-title {
  font-size: 1.5rem;
  color: var(--color-primary);
  margin-bottom: 16px;
}

.result-text {
  font-size: 1.1rem;
  color: var(--color-secondary);
  margin-bottom: 24px;
  line-height: 1.8;
}

.result-btn {
  display: inline-block;
  padding: 14px 40px;
  background: var(--color-primary);
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  border-radius: 50px;
  transition: all 0.3s ease;
}

.result-btn:hover {
  background: var(--color-secondary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.restart-btn {
  padding: 12px 30px;
  font-size: 0.95rem;
  font-family: inherit;
  color: #666;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.restart-btn:hover {
  background: var(--color-gray);
  border-color: var(--color-secondary);
  color: var(--color-primary);
}

/* ========================================
   選択履歴
======================================== */
.history {
  margin-top: 40px;
  padding: 24px;
  background: var(--color-gray);
  border-radius: var(--border-radius);
}

.history h3 {
  font-size: 0.9rem;
  color: #888;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.history ul {
  list-style: none;
}

.history li {
  padding: 8px 0;
  font-size: 0.9rem;
  color: var(--color-secondary);
  border-bottom: 1px dashed var(--color-border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.history li:last-child {
  border-bottom: none;
}

.history li::before {
  content: "✓";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: var(--color-success);
  color: white;
  font-size: 0.7rem;
  border-radius: 50%;
}

.history:empty,
.history ul:empty {
  display: none;
}

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

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* ========================================
   レスポンシブ
======================================== */
@media (max-width: 600px) {
  body {
    padding: 20px 16px;
  }

  .yesno-wrap {
    padding: 30px 20px;
  }

  .question-text {
    font-size: 1.1rem;
  }

  .choice-btn {
    padding: 16px 20px;
    font-size: 1rem;
  }

  .choices.two-columns {
    flex-direction: column;
  }

  .result-card {
    padding: 30px 20px;
  }

  .result-title {
    font-size: 1.3rem;
  }
}

/* ========================================
   ダークモード対応 (オプション)
======================================== */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #1a1a2e;
    --color-gray: #16213e;
    --color-border: #2a2a4a;
  }

  body {
    color: #e0e0e0;
  }

  .yesno-wrap {
    background: #16213e;
  }

  .question-text,
  .result-title {
    color: #ffffff;
  }

  .choice-btn {
    background: #1a1a2e;
    color: #e0e0e0;
  }

  .choice-btn:hover {
    background: #2a2a4a;
    border-color: var(--color-gradient-2);
  }

  .history {
    background: #0f0f23;
  }
}

/* === CTA Button === */
.cta-button {
  background: linear-gradient(135deg, #007aff, #0056b3);
  color: white;
  border: none;
  padding: 16px 32px;
  font-size: 18px;
  font-weight: bold;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 24px;
  display: inline-block;
  width: 100%;
  box-sizing: border-box;
}
.cta-button:hover {
  background: linear-gradient(135deg, #0056b3, #003d80);
  transform: scale(1.03);
  box-shadow: 0 6px 20px rgba(0,122,255,0.3);
}

/* === Lead Modal === */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.6);
}
.modal-content {
  background: #fff;
  margin: 10% auto;
  padding: 32px;
  border-radius: 16px;
  max-width: 420px;
  width: 85%;
  position: relative;
  animation: modalFadeIn 0.3s ease;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.close-button {
  color: #aaa;
  position: absolute;
  right: 16px;
  top: 12px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
}
.close-button:hover { color: #333; }
.modal-content h2 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 22px;
}
.modal-content p {
  color: #666;
  margin-bottom: 20px;
  font-size: 14px;
}
#leadForm input {
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 14px;
  border: 1.5px solid #ddd;
  border-radius: 10px;
  font-size: 16px;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
#leadForm input:focus {
  outline: none;
  border-color: #007aff;
  box-shadow: 0 0 0 3px rgba(0,122,255,0.1);
}
.submit-button {
  width: 100%;
  background: linear-gradient(135deg, #28a745, #1e7e34);
  color: white;
  padding: 16px;
  border: none;
  border-radius: 10px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 4px;
}
.submit-button:hover {
  background: linear-gradient(135deg, #1e7e34, #155d27);
  transform: scale(1.02);
}

/* === Booking Embed === */
.booking-embed {
  margin-top: 32px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.1);
  background: #fff;
}
.booking-embed h3 {
  text-align: center;
  padding: 20px 20px 0;
  font-size: 1.1rem;
  color: #333;
}
.booking-embed iframe {
  width: 100%;
  height: 700px;
  border: none;
  display: block;
}
