/* ================================================================
   アスリート親学 診断・結果ページ CSS  v2.0
   quiz.css（診断フォーム＋結果ページ共通）
   ================================================================ */

/* ── ベース ─────────────────────────────────────────────────────── */
#apq-wrap,
#apq-result {
  max-width:   660px;
  margin:      0 auto;
  font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', sans-serif;
  color:       #1f2937;
}

/* ── プログレスバー ─────────────────────────────────────────────── */
#apq-progress-wrap {
  position:     relative;
  height:       8px;
  background:   #e5e7eb;
  border-radius:4px;
  margin-bottom:20px;
}
#apq-progress-bar {
  height:      100%;
  width:       0%;
  background:  linear-gradient(90deg, #3b82f6, #6366f1);
  border-radius:4px;
  transition:  width 0.35s ease;
}
#apq-progress-label {
  position:   absolute;
  right:      0;
  top:        12px;
  font-size:  0.78rem;
  color:      #6b7280;
}

/* ── 設問 ───────────────────────────────────────────────────────── */
.apq-step-num {
  font-size:   0.82rem;
  color:       #6b7280;
  margin:      0 0 6px;
}
.apq-q-text {
  font-size:   1.15rem;
  font-weight: 700;
  margin:      0 0 20px;
  line-height: 1.5;
}

/* ── 選択肢 ─────────────────────────────────────────────────────── */
.apq-options {
  list-style: none;
  padding:    0;
  margin:     0 0 24px;
}
.apq-options li { margin-bottom: 10px; }

.apq-option-label {
  display:      flex;
  align-items:  flex-start;
  gap:          12px;
  padding:      13px 16px;
  border:       2px solid #e5e7eb;
  border-radius:10px;
  cursor:       pointer;
  transition:   border-color .15s, background .15s;
  line-height:  1.5;
}
.apq-option-label:hover {
  border-color: #93c5fd;
  background:   #eff6ff;
}
.apq-option-label:has(input:checked) {
  border-color: #3b82f6;
  background:   #eff6ff;
}
.apq-option-label input[type=radio] {
  flex-shrink:  0;
  margin-top:   3px;
  accent-color: #3b82f6;
}

/* ── ヒント・エラー ─────────────────────────────────────────────── */
.apq-select-hint,
.apq-field-error {
  display:   block;
  font-size: 0.82rem;
  color:     #dc2626;
  margin-top:4px;
}

/* ── メール入力ステップ ─────────────────────────────────────────── */
#apq-email-step {
  background:   #f9fafb;
  border:       1px solid #e5e7eb;
  border-radius:12px;
  padding:      28px 24px;
}
#apq-email-step h3 {
  font-size:   1.1rem;
  margin:      0 0 6px;
}
.apq-sub {
  font-size:   0.88rem;
  color:       #6b7280;
  margin:      0 0 18px;
}
.apq-field label {
  display:     block;
  font-size:   0.88rem;
  font-weight: 600;
  margin-bottom:4px;
}
#apq-email {
  width:        100%;
  box-sizing:   border-box;
  padding:      11px 14px;
  border:       1.5px solid #d1d5db;
  border-radius:8px;
  font-size:    1rem;
  transition:   border-color .15s;
}
#apq-email:focus {
  outline:      none;
  border-color: #3b82f6;
  box-shadow:   0 0 0 3px rgba(59,130,246,.15);
}
.apq-consent-label {
  display:     flex;
  gap:         10px;
  align-items: flex-start;
  font-size:   0.84rem;
  color:       #374151;
  margin-top:  16px;
  cursor:      pointer;
}
.apq-consent-label input { flex-shrink: 0; margin-top: 3px; accent-color: #3b82f6; }
.apq-consent-label a { color: #3b82f6; }

/* ── ナビゲーション ─────────────────────────────────────────────── */
#apq-nav {
  display: flex;
  gap:     12px;
  margin-top:8px;
}
#apq-btn-prev,
#apq-btn-next,
#apq-btn-submit {
  padding:       11px 22px;
  border:        none;
  border-radius: 8px;
  font-size:     0.97rem;
  font-weight:   600;
  cursor:        pointer;
  transition:    background .15s, transform .1s;
}
#apq-btn-prev   { background: #f3f4f6; color: #374151; }
#apq-btn-prev:hover { background: #e5e7eb; }
#apq-btn-next   { background: #3b82f6; color: #fff; }
#apq-btn-next:hover { background: #2563eb; }
#apq-btn-submit { background: #10b981; color: #fff; min-width: 160px; }
#apq-btn-submit:hover { background: #059669; }

/* ── ローディング ───────────────────────────────────────────────── */
#apq-loading {
  text-align:  center;
  padding:     40px 0;
  font-size:   1rem;
  color:       #6b7280;
}
.apq-spinner {
  display:       inline-block;
  width:         20px;
  height:        20px;
  border:        3px solid #e5e7eb;
  border-top-color:#3b82f6;
  border-radius: 50%;
  animation:     spin .7s linear infinite;
  margin-right:  8px;
  vertical-align:middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── グローバルエラー ────────────────────────────────────────────── */
#apq-global-error {
  background:   #fef2f2;
  border:       1px solid #fecaca;
  border-radius:8px;
  padding:      14px 18px;
  color:        #dc2626;
  font-size:    0.93rem;
  margin-top:   16px;
}

/* ================================================================
   結果ページ
   ================================================================ */
.apq-result-wrap { max-width: 680px; margin: 0 auto; }

.apq-result-header {
  text-align:  center;
  padding:     32px 0 24px;
}
.apq-result-badge {
  display:       inline-block;
  background:    #dbeafe;
  color:         #1d4ed8;
  font-size:     0.8rem;
  font-weight:   700;
  padding:       3px 12px;
  border-radius: 999px;
  letter-spacing:.05em;
  margin-bottom: 10px;
}
.apq-result-type {
  font-size:   2rem;
  font-weight: 800;
  color:       #1e40af;
  margin:      0 0 10px;
}
.apq-result-desc { font-size: 1rem; color: #374151; }

/* ── レーダーチャート ────────────────────────────────────────────── */
.apq-radar-wrap {
  max-width:  420px;
  margin:     0 auto 32px;
}

/* ── スコアテーブル ─────────────────────────────────────────────── */
.apq-score-table {
  width:           100%;
  border-collapse: collapse;
  margin:          0 0 28px;
}
.apq-score-table caption {
  text-align:  left;
  font-size:   0.85rem;
  color:       #6b7280;
  margin-bottom:8px;
}
.apq-score-table th,
.apq-score-table td {
  padding:       10px 12px;
  border-bottom: 1px solid #f3f4f6;
  font-size:     0.95rem;
}
.apq-score-table th { font-weight: 600; white-space: nowrap; }
.apq-bar-wrap {
  display:       inline-block;
  width:         140px;
  height:        9px;
  background:    #e5e7eb;
  border-radius: 5px;
  vertical-align:middle;
  margin-right:  10px;
  overflow:      hidden;
}
.apq-bar-fill {
  height:        100%;
  width:         var(--pct, 0%);
  background:    linear-gradient(90deg, #3b82f6, #6366f1);
  border-radius: 5px;
  transition:    width .9s ease;
}
.apq-bar-val { font-weight: 700; font-size: 0.95rem; color: #1d4ed8; }

/* ── アドバイスボックス ──────────────────────────────────────────── */
.apq-advice-box {
  background:   #fefce8;
  border-left:  4px solid #f59e0b;
  border-radius:0 10px 10px 0;
  padding:      20px 22px;
  margin:       0 0 32px;
}
.apq-advice-box h3 { margin: 0 0 10px; font-size: 1rem; }
.apq-advice-box p  { margin: 0; font-size: 0.95rem; line-height: 1.65; }

/* ── CTA ────────────────────────────────────────────────────────── */
.apq-cta-wrap { text-align: center; padding-bottom: 48px; }
.apq-cta-btn {
  display:       inline-block;
  background:    linear-gradient(135deg, #f97316, #ef4444);
  color:         #fff;
  font-size:     1.05rem;
  font-weight:   700;
  padding:       16px 36px;
  border-radius: 999px;
  text-decoration:none;
  letter-spacing:.02em;
  box-shadow:    0 4px 14px rgba(249,115,22,.35);
  transition:    transform .15s, box-shadow .15s;
}
.apq-cta-btn:hover {
  transform:  translateY(-2px);
  box-shadow: 0 6px 20px rgba(249,115,22,.45);
  color:      #fff;
}

/* ── レスポンシブ ───────────────────────────────────────────────── */
@media (max-width: 600px) {
  .apq-q-text  { font-size: 1rem; }
  .apq-bar-wrap { width: 90px; }
  .apq-result-type { font-size: 1.5rem; }
  .apq-cta-btn { padding: 14px 24px; font-size: 0.97rem; }
}

/* ══════════════════════════════════════════════════
   前回比較 UI
   ══════════════════════════════════════════════════ */

/* 前回診断日 */
.apq-result-since {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 6px;
}

/* レーダー凡例 */
.apq-radar-legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 8px;
  font-size: 13px;
}
.apq-legend-now  { color: rgba(59,130,246,0.9);  font-weight: 700; }
.apq-legend-prev { color: rgba(156,163,175,0.85); font-weight: 700; }

/* スコアテーブル：前回・変化列 */
.apq-score-table .apq-prev-val {
  text-align: center;
  color: #9ca3af;
  font-size: 14px;
  min-width: 44px;
}
.apq-score-table .apq-diff {
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  min-width: 44px;
}
.apq-diff-up   { color: #16a34a; }
.apq-diff-down { color: #dc2626; }
.apq-diff-same { color: #9ca3af; }

/* 変化サマリー */
.apq-change-summary {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 20px 24px;
  margin: 24px 0;
}
.apq-change-summary h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 12px;
  color: #1e293b;
}
.apq-change-summary p {
  font-size: 14px;
  line-height: 1.7;
  margin: 8px 0;
}
.apq-change-up   { color: #15803d; }
.apq-change-down { color: #b91c1c; }
.apq-change-same { color: #475569; }
.apq-change-note {
  font-size: 13px !important;
  color: #64748b !important;
  border-top: 1px solid #e2e8f0;
  padding-top: 10px;
  margin-top: 12px !important;
}

/* セカンダリCTAボタン（再診断済みユーザー向け） */
.apq-cta-btn.apq-cta-secondary {
  background: linear-gradient(135deg, #1e40af, #3b82f6);
}

/* 動画ボタン（購入済み向け） */
.apq-cta-btn.apq-cta-video {
  background: linear-gradient(135deg, #059669, #10b981);
  display: block;
  margin-bottom: 12px;
}
.apq-cta-btn.apq-cta-video:hover {
  background: linear-gradient(135deg, #047857, #059669);
}
