/* ============================================================
   Chimera Test Lab - 共通スタイルシート (common.css)
   ============================================================ */

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  color: #1e293b;
  background-color: #f8fafc;
  background-image: radial-gradient(#cbd5e1 1.2px, transparent 1.2px);
  background-size: 24px 24px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* --- レイアウトコンテナ --- */
.container {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

/* メインのカード枠（診断ページ共通） */
#quiz-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  text-align: center;
}

/* --- ページ上部・ヘッダー要素 --- */
.intro-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #4f46e5;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  padding: 3px 10px;
  border-radius: 9999px;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.intro-title {
  font-size: 1.55rem;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1.35;
  margin-bottom: 10px;
}

.intro-desc {
  font-size: 0.88rem;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 24px;
}

/* イントロのメタボックス */
.intro-meta-box {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 24px;
}

.intro-meta-item {
  flex: 1;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
}

.meta-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 2px;
}

.meta-val {
  font-size: 0.92rem;
  font-weight: 800;
  color: #0f172a;
}

/* --- 共通ボタンスタイル --- */
.start-btn-primary {
  display: inline-block;
  width: 100%;
  background: #4f46e5;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
  padding: 14px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
  transition: all 0.2s ease;
  text-align: center;
  text-decoration: none;
}

.start-btn-primary:hover {
  background: #4338ca;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
  transform: translateY(-1px);
}

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

/* --- 診断回答画面：プログレスバー --- */
.progress-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.progress-bar-bg {
  flex: 1;
  height: 8px;
  background: #e2e8f0;
  border-radius: 9999px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: #4f46e5;
  border-radius: 9999px;
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 0.8rem;
  font-weight: 700;
  color: #64748b;
  min-width: 45px;
}

/* --- 設問表示ボックス --- */
.question-box {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  margin-bottom: 24px;
}

.question-text {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.5;
}

/* --- 5段階評価（Likert Scale）ボタングループ（★ここを復元・強化） --- */
.likert-scale {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.likert-btn {
  display: flex;
  align-items: center;
  width: 100%;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.92rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.likert-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.likert-btn:active {
  background: #eef2ff;
  border-color: #6366f1;
}

.likert-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
  margin-right: 12px;
  flex-shrink: 0;
}

.likert-txt {
  flex: 1;
}

/* スコアに応じたアクセントカラー */
.likert-btn[data-score="1"] .likert-num { background: #fee2e2; color: #dc2626; }
.likert-btn[data-score="2"] .likert-num { background: #ffedd5; color: #ea580c; }
.likert-btn[data-score="3"] .likert-num { background: #f1f5f9; color: #64748b; }
.likert-btn[data-score="4"] .likert-num { background: #e0f2fe; color: #0284c7; }
.likert-btn[data-score="5"] .likert-num { background: #dcfce7; color: #16a34a; }

/* 4択・3択設問グループ（love-style, dopagaki, career-thinking） */
.card-header {
  margin-bottom: 20px;
}

.options-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.option-btn {
  display: block;
  width: 100%;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 0.92rem;
  font-weight: 600;
  color: #1e293b;
  text-align: left;
  cursor: pointer;
  line-height: 1.45;
  transition: all 0.15s ease;
}

.option-btn:hover {
  background: #f8fafc;
  border-color: #6366f1;
  color: #4f46e5;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.08);
}

.option-btn:active {
  background: #eef2ff;
  transform: translateY(0);
}

/* --- 画面左上固定の「← トップへ」ボタン --- */
.fixed-top-back-btn {
  position: fixed;
  top: 14px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #475569;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  z-index: 100;
  transition: all 0.2s ease;
}

.fixed-top-back-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
}

/* --- 結果画面スタイル --- */
.result-image-wrap {
  width: 100%;
  max-width: 480px;
  margin: 0 auto 20px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.result-img {
  width: 100%;
  height: auto;
  display: block;
}

.share-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: #0f172a;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 800;
  padding: 13px;
  border-radius: 10px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
  margin-bottom: 20px;
  transition: all 0.2s ease;
}

.share-btn-primary:hover {
  background: #1e293b;
  transform: translateY(-1px);
}

/* --- ページ遷移リンク & 戻るナビ --- */
.nav-links-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.main-link,
.sub-link,
.footer-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #4f46e5;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  transition: all 0.15s ease;
}

.main-link:hover,
.sub-link:hover,
.footer-nav-link:hover {
  background: #eef2ff;
  border-color: #c7d2fe;
}

/* --- レスポンシブ微調整 --- */
@media (max-width: 640px) {
  .container {
    padding: 16px 12px 32px;
  }
  #quiz-card {
    padding: 20px 16px;
    border-radius: 14px;
  }
  .intro-title {
    font-size: 1.35rem;
  }
  .option-btn {
    padding: 12px 14px;
    font-size: 0.88rem;
  }
  .likert-btn {
    padding: 10px 14px;
    font-size: 0.86rem;
  }
}
