/* リセット */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Noto Sans JP', 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', sans-serif;
  background: #f5f7fa;
  color: #333;
  line-height: 1.6;
  min-height: 100vh;
  padding-bottom: 80px; /* ナビ固定分の余白 */
}

.container { max-width: 720px; margin: 0 auto; padding: 40px 20px; }

/* ヘッダー */
header { text-align: center; margin-bottom: 24px; }
header h1 { font-size: 1.6rem; color: #1a1a2e; margin-bottom: 6px; font-weight: 700; letter-spacing: -0.02em; }
.subtitle { color: #666; font-size: 0.9rem; margin-bottom: 20px; }

/* プログレスバー */
.progress-wrap {
  height: 4px;
  background: #e0e0e0;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 8px;
}
.progress-bar {
  height: 100%;
  background: #4a6cf7;
  border-radius: 2px;
  width: 0%;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.progress-text {
  font-size: 0.8rem;
  color: #999;
  text-align: right;
}

/* スライド */
.slide-container {
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}
.slide-track {
  display: flex;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.slide {
  flex: 0 0 100%;
  min-width: 0;
  width: 100%;
  padding: 32px 28px;
}
.slide-question {
  font-size: 1.2rem;
  font-weight: 500;
  color: #1a1a2e;
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

/* ナビゲーション — 画面下部に固定 */
.slide-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: #fff;
  border-top: 1px solid #eee;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
  z-index: 100;
}
.slide-nav .nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}
.nav-spacer { flex: 1; }
.btn-back, .btn-next {
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-back {
  background: none;
  border: none;
  color: #888;
}
.btn-back:hover { color: #333; }
.btn-next {
  background: #4a6cf7;
  color: #fff;
  border: none;
}
.btn-next:hover { background: #3a5ce5; }
.btn-next:disabled { background: #ccc; cursor: not-allowed; }

/* フォーム要素 */
label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.95rem;
  color: #1a1a2e;
}
.form-help { font-size: 0.85rem; color: #888; margin-bottom: 10px; }
.required { color: #e74c3c; }
.form-group { margin-bottom: 20px; }

input[type="text"], input[type="email"], input[type="url"], select, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s;
  background: #fff;
}
.slide-input { font-size: 1.1rem; padding: 14px 16px; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #4a6cf7;
  box-shadow: 0 0 0 3px rgba(74,108,247,0.1);
}
textarea { resize: vertical; }
.conditional-input { margin-top: 10px; }

/* サブカテゴリ */
.subcategory-area {
  margin-top: 14px;
  padding: 14px;
  background: #f0f4ff;
  border-radius: 10px;
  animation: fadeIn 0.2s ease;
}
.subcategory-label {
  font-size: 0.85rem;
  color: #4a6cf7;
  font-weight: 600;
  margin-bottom: 10px;
}

/* チップ */
.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 8px 18px;
  border: 2px solid #ddd;
  border-radius: 50px;
  background: #fff;
  color: #555;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}
.chip:hover { border-color: #4a6cf7; color: #4a6cf7; }
.chip.selected { background: #4a6cf7; border-color: #4a6cf7; color: #fff; }

/* サイトタイプ */
.type-selector { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.type-card {
  border: 2px solid #e5e7eb; border-radius: 16px; padding: 28px 16px;
  background: #fff; cursor: pointer; transition: all 0.25s ease; text-align: center;
}
.type-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.type-card.selected { border-color: #4a6cf7; background: #f0f4ff; }
.type-icon {
  width: 56px; height: 56px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
}
.type-icon svg { width: 28px; height: 28px; stroke-width: 1.8; }
.type-icon--hp {
  background: linear-gradient(135deg, #6366f1, #4a6cf7);
  color: #fff;
}
.type-icon--lp {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
}
.type-card.selected .type-icon--hp {
  background: linear-gradient(135deg, #4f46e5, #3b5de7);
  box-shadow: 0 4px 12px rgba(74, 108, 247, 0.35);
}
.type-card.selected .type-icon--lp {
  background: linear-gradient(135deg, #d97706, #dc2626);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}
.type-label { font-weight: 600; font-size: 0.9rem; color: #1a1a2e; margin-bottom: 4px; }
.type-desc { font-size: 0.75rem; color: #888; }

/* ムードカルーセル */
.mood-carousel {
  position: relative;
}
.mood-viewport {
  overflow: hidden;
  border-radius: 16px;
}
.mood-track {
  display: flex;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.mood-card { flex: 0 0 100%; min-width: 100%; }
.mood-preview {
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid #e5e7eb;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.mood-card.selected .mood-preview {
  border-color: #4a6cf7;
  box-shadow: 0 0 0 2px #4a6cf7;
}
/* ミニプレビュー内部 */
.mood-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.mood-logo { width: 28px; height: 28px; border-radius: 6px; opacity: 0.8; }
.mood-site-name { font-size: 0.85rem; font-weight: 600; }
.mood-hero { padding: 32px 20px 24px; text-align: center; }
.mood-hero-title { font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; line-height: 1.4; }
.mood-hero-sub { font-size: 0.78rem; opacity: 0.7; margin-bottom: 16px; }
.mood-hero-btn {
  display: inline-block; padding: 10px 28px; border-radius: 6px;
  font-size: 0.82rem; font-weight: 600; border: none;
}
.mood-footer {
  padding: 12px 20px; display: flex; gap: 18px;
  font-size: 0.72rem; opacity: 0.5; border-top: 1px solid rgba(0,0,0,0.06);
}
/* ラベル */
.mood-label { text-align: center; padding: 14px 0 4px; }
.mood-label-name { font-weight: 600; font-size: 1.05rem; color: #1a1a2e; }
.mood-label-desc { font-size: 0.8rem; color: #888; margin-top: 2px; }
/* 矢印 — カード上にオーバーレイ */
.mood-arrow {
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  width: 32px; height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.08);
  font-size: 1.1rem; color: rgba(0,0,0,0.3);
  cursor: pointer;
  transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
  z-index: 10;
}
.mood-arrow:hover { background: rgba(0,0,0,0.15); color: rgba(0,0,0,0.5); }
.mood-arrow-left { left: 8px; }
.mood-arrow-right { right: 8px; }
/* ドット */
.mood-dots { display: flex; justify-content: center; gap: 5px; margin-top: 12px; align-items: center; }
.mood-dot {
  width: 8px; height: 8px; border-radius: 4px; background: #d1d5db;
  cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.mood-dot.active { background: #4a6cf7; width: 24px; }
/* 選択ボタン */
.mood-select-btn {
  display: block; width: 100%; margin-top: 16px; padding: 13px;
  background: #4a6cf7; color: #fff; border: none; border-radius: 10px;
  font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: background 0.2s;
}
.mood-select-btn:hover { background: #3a5ce5; }
.mood-select-btn.selected-state { background: #27ae60; }
.mood-select-btn.selected-state:hover { background: #219a52; }
/* 自由入力カード */
.mood-custom-preview {
  background: linear-gradient(135deg, #f0f4ff, #faf5ff) !important;
  padding: 16px 16px 0;
  display: flex; flex-direction: column;
}
.mood-custom-header {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 12px; color: #4a6cf7; font-weight: 600; font-size: 0.9rem;
}
.mood-custom-header svg { width: 18px; height: 18px; }
.mood-custom-hints {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px;
}
.mood-hint-chip {
  padding: 4px 10px; border-radius: 20px;
  background: rgba(74, 108, 247, 0.1); color: #4a6cf7;
  font-size: 0.72rem; font-weight: 500;
}
.mood-custom-textarea {
  width: 100%; min-height: 100px;
  padding: 14px; border: 1px solid #e5e7eb; border-radius: 10px;
  font-size: 0.95rem; background: #fff;
  resize: none; outline: none; line-height: 1.7;
  font-family: inherit; margin-bottom: 16px;
  transition: border-color 0.2s;
}
.mood-custom-textarea:focus {
  border-color: #4a6cf7;
  box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.1);
}

/* ボタン（下部ナビと統一） */
.btn-primary {
  display: block; width: 100%; padding: 12px 28px; background: #4a6cf7; color: #fff;
  border: none; border-radius: 8px; font-size: 0.95rem; font-weight: 600;
  cursor: pointer; transition: background 0.2s;
}
.btn-primary:hover { background: #3a5ce5; }
.btn-primary:disabled { background: #aaa; cursor: not-allowed; }

.hidden { display: none; }

/* 共通セクションカード（スライドと統一） */
.section-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
  padding: 32px 28px;
}

/* 確認画面 */
.confirm-card { background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 12px; padding: 24px; margin-bottom: 24px; }
.confirm-item { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid #f0f0f0; }
.confirm-item:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.confirm-label { font-size: 0.8rem; color: #888; font-weight: 600; margin-bottom: 4px; }
.confirm-value { font-size: 0.95rem; color: #333; line-height: 1.5; white-space: pre-wrap; }

/* 完了 */
.complete-message { text-align: center; }
.complete-message p { color: #555; margin-bottom: 8px; }
.btn-restart {
  margin-top: 24px; padding: 12px 28px;
  background: none; border: 2px solid #ddd; border-radius: 8px;
  color: #888; font-size: 0.95rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.btn-restart:hover { border-color: #999; color: #333; }

/* ローディング */
#loading { text-align: center; padding: 40px; }
.spinner {
  width: 40px; height: 40px; border: 4px solid #ddd; border-top-color: #4a6cf7;
  border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }
#loading p { color: #666; }

/* エラー */
.error-message {
  background: #fef2f2; color: #dc2626; padding: 12px 16px;
  border-radius: 8px; margin-bottom: 16px; font-size: 0.9rem;
}

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

/* レスポンシブ */
@media (max-width: 768px) {
  .container { padding: 20px 12px; }
  header h1 { font-size: 1.3rem; }
  .subtitle { font-size: 0.8rem; }
  .slide { padding: 24px 16px; }
  .section-card { padding: 24px 16px; }
  .slide-question { font-size: 1.05rem; }
  .chip { padding: 8px 14px; font-size: 0.85rem; }
  .palette-group { grid-template-columns: repeat(2, 1fr); }
  .palette-card { padding: 10px 8px; }
  .color-swatch { width: 22px; height: 22px; }
  .palette-name { font-size: 0.8rem; }
  .palette-desc { font-size: 0.7rem; }
  .type-selector { grid-template-columns: 1fr; gap: 10px; }
  .type-card { padding: 16px 14px; }
  input[type="text"], input[type="email"], select, textarea { font-size: 16px; }
  .btn-back, .btn-next { padding: 10px 20px; font-size: 0.9rem; }
  .btn-row { grid-template-columns: 1fr 1fr; }
}
