/* ===== Reset ===== */
*, *::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, "PingFang SC", "Segoe UI", sans-serif;
  color: #1F2937;
  background: #F9FAFB;
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: 16px; }

/* ===== Variables ===== */
:root {
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --primary-light: #EFF6FF;
  --dark: #1F2937;
  --text: #374151;
  --text-light: #6B7280;
  --text-lighter: #9CA3AF;
  --success: #10B981;
  --warning: #F59E0B;
  --orange: #F97316;
  --danger: #EF4444;
  --bg: #F9FAFB;
  --white: #FFFFFF;
  --border: #E5E7EB;
  --radius: 12px;
  --radius-sm: 8px;
}

/* ===== Page container ===== */
.container {
  max-width: 520px;
  margin: 0 auto;
  padding: 0 20px;
}
@media (min-width: 768px) {
  .container { max-width: 640px; padding: 0 40px; }
}
@media (min-width: 1024px) {
  .container { max-width: 720px; padding: 0 48px; }
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 24px;
  height: 48px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  line-height: 1;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-secondary { background: var(--white); color: var(--primary); border: 2px solid var(--primary); }
.btn-secondary:hover { background: var(--primary-light); }
.btn-lg { height: 52px; font-size: 17px; padding: 0 32px; border-radius: var(--radius); }
.btn-block { display: flex; width: 100%; }

/* ========================================
   INDEX - Landing Page (Single Screen)
   ======================================== */
.landing-body {
  background: linear-gradient(160deg, #0F172A 0%, #1E293B 40%, #1E3A5F 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.landing-page {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 28px 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 1;
}

/* Decorative radar background */
.lp-bg-radar {
  position: absolute;
  top: 8%;
  right: -40px;
  opacity: 0.6;
  pointer-events: none;
  z-index: 0;
}

/* Brand */
.lp-brand {
  font-size: 18px;
  font-weight: 700;
  color: #93C5FD;
  letter-spacing: 4px;
  text-shadow: 0 0 20px rgba(147,197,253,0.3);
}

/* Hero Card */
.lp-hero-card {
  text-align: center;
  padding: 24px 20px;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  width: 100%;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}
.lp-hero-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 20%, rgba(37,99,235,0.12) 0%, transparent 50%);
  pointer-events: none;
}
.lp-hero-title {
  font-size: 26px;
  font-weight: 800;
  color: #F1F5F9;
  letter-spacing: 2px;
  margin: 0 0 10px;
  position: relative;
}
.lp-hero-divider {
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, #3B82F6, #60A5FA);
  border-radius: 2px;
  margin: 0 auto 10px;
}
.lp-hero-subtitle {
  font-size: 15px;
  color: rgba(148,163,184,0.9);
  letter-spacing: 2px;
  margin: 0;
}

/* Benefits */
.lp-benefits {
  width: 100%;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 14px 18px;
  box-sizing: border-box;
}
.lp-benefits-label {
  font-size: 12px;
  font-weight: 600;
  color: rgba(148,163,184,0.8);
  margin-bottom: 10px;
  letter-spacing: 1px;
}
.lp-benefits-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lp-benefit-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #E2E8F0;
}
.lp-benefit-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.lp-benefit-icon-radar {
  background: rgba(59,130,246,0.15);
  color: #60A5FA;
}
.lp-benefit-icon-target {
  background: rgba(16,185,129,0.15);
  color: #34D399;
}
.lp-benefit-icon-chart {
  background: rgba(245,158,11,0.15);
  color: #FBBF24;
}

/* CTA */
.lp-cta-btn {
  display: block;
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #2563EB 0%, #3B82F6 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  border-radius: 14px;
  letter-spacing: 1px;
  transition: all 0.25s ease;
  box-sizing: border-box;
  box-shadow: 0 4px 20px rgba(37,99,235,0.35), 0 0 40px rgba(37,99,235,0.1);
  position: relative;
  overflow: hidden;
}
.lp-cta-btn::after {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: left 0.5s ease;
}
.lp-cta-btn:hover {
  background: linear-gradient(135deg, #1D4ED8 0%, #2563EB 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(37,99,235,0.45), 0 0 50px rgba(37,99,235,0.15);
}
.lp-cta-btn:hover::after {
  left: 100%;
}
.lp-cta-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(37,99,235,0.3);
}

/* Social Proof */
.lp-social-proof {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lp-proof-item {
  font-size: 12px;
  color: rgba(148,163,184,0.7);
}
.lp-proof-dot {
  width: 3px;
  height: 3px;
  background: rgba(148,163,184,0.4);
  border-radius: 50%;
}

/* Dimensions */
.lp-dims {
  width: 100%;
  text-align: center;
}
.lp-dims-label {
  font-size: 11px;
  font-weight: 600;
  color: rgba(148,163,184,0.5);
  letter-spacing: 2px;
  margin-bottom: 8px;
}
.lp-dims-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.lp-dims-tags span {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  font-size: 12px;
  color: #94A3B8;
  font-weight: 500;
  transition: all 0.2s ease;
}
.lp-dims-tags span:hover {
  background: rgba(59,130,246,0.15);
  border-color: rgba(59,130,246,0.3);
  color: #60A5FA;
}

.lp-slogan {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.lp-slogan-l1 {
  font-size: 14px;
  font-weight: 600;
  color: #60A5FA;
  letter-spacing: 1px;
}
.lp-slogan-l2 {
  font-size: 12px;
  font-weight: 400;
  color: rgba(148,163,184,0.6);
  letter-spacing: 0.5px;
}

@media (min-width: 768px) {
  .landing-page { padding: 40px 32px 32px; gap: 18px; }
  .lp-hero-title { font-size: 24px; }
  .lp-hero-subtitle { font-size: 14px; }
  .lp-slogan-l1 { font-size: 13px; }
  .lp-slogan-l2 { font-size: 11px; }
}

/* ========================================
   QUIZ - Header
   ======================================== */
.quiz-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  padding: 12px 20px 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
@media (min-width: 768px) {
  .quiz-header { padding: 16px 40px 0; }
}
.quiz-header-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.quiz-back-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: var(--text);
  flex-shrink: 0;
}
.quiz-back-btn:hover { background: var(--primary-light); color: var(--primary); }
.quiz-header-title { flex: 1; font-size: 16px; font-weight: 600; }
.quiz-progress-text { font-size: 13px; color: var(--text-light); flex-shrink: 0; }
.quiz-progress-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.quiz-progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* ========================================
   QUIZ - Content
   ======================================== */
.quiz-page {
  padding-top: 24px;
  padding-bottom: 88px;
}
/* Dimension indicators */
.dimension-indicators {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}
.dim-dot {
  min-width: 28px;
  height: 28px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  background: var(--border);
  color: var(--text-light);
  flex-shrink: 0;
  transition: all 0.3s;
}
.dim-dot.active {
  min-width: 44px;
  background: var(--primary);
  color: var(--white);
}
.dim-dot.completed {
  background: var(--success);
  color: var(--white);
}

/* Dimension info */
.dimension-info { margin-bottom: 24px; }
.dimension-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 4px;
}
.dimension-desc { font-size: 14px; color: var(--text-light); }

/* Question card */
.question-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.question-number {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 8px;
}
.question-text {
  font-size: 15px;
  font-weight: 500;
  color: var(--dark);
  line-height: 1.6;
  margin-bottom: 16px;
}

/* ========================================
   QUIZ - Dimension Cover Page
   ======================================== */
.dim-cover {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 160px);
  padding: 32px 20px;
  text-align: center;
  animation: fadeIn 0.3s ease;
}
.dim-cover-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: #EFF6FF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin-bottom: 20px;
}
.dim-cover-badge {
  display: inline-block;
  padding: 4px 14px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  border-radius: 20px;
  margin-bottom: 20px;
}
.dim-cover-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 12px;
}
.dim-cover-divider {
  width: 40px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  margin-bottom: 20px;
}
.dim-cover-subtitle {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 12px;
}
.dim-cover-topics {
  background: #F9FAFB;
  border-radius: 12px;
  padding: 16px 20px;
  text-align: left;
  width: 100%;
  max-width: 400px;
  margin-bottom: 20px;
  list-style: none;
}
.dim-cover-topics li {
  font-size: 14px;
  color: var(--text);
  line-height: 1.8;
  padding-left: 8px;
  list-style: none;
}
.dim-cover-topics li::before {
  content: '•';
  color: var(--primary);
  font-weight: 700;
  margin-right: 8px;
}
.dim-cover-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-lighter);
  margin-bottom: 28px;
}
.dim-cover-dot {
  color: var(--border);
}
.dim-cover-start {
  max-width: 280px;
  margin-top: 8px;
}

/* ========================================
   QUIZ - Single Question Area
   ======================================== */
.question-area {
  animation: fadeIn 0.25s ease;
  padding-bottom: 24px;
}

/* Question progress bar (within dimension) */
.q-progress {
  margin-bottom: 20px;
}
.q-progress-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--text-light);
}
.q-progress-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.q-progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* Question card */
.q-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  animation: fadeIn 0.25s ease;
}
.q-num {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 8px;
}
.q-text {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.7;
  color: var(--dark);
}

/* Options container */
.q-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ========================================
   QUIZ - Option Cards (matches JS: opt-card)
   ======================================== */
.opt-card {
  position: relative;
  display: flex;
  align-items: stretch;
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.opt-card:active {
  transform: scale(0.98);
}

/* Left color stripe */
.opt-stripe {
  width: 4px;
  flex-shrink: 0;
  border-radius: 0;
  transition: background 0.2s;
}

/* Right content area */
.opt-content {
  flex: 1;
  padding: 14px 16px;
  min-width: 0;
}

/* Label row: radio + text + grade tag */
.opt-label-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

/* Custom radio circle */
.opt-radio {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.2s;
}
.opt-radio-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  transition: background 0.2s;
  display: none;
}
.opt-radio-checked .opt-radio-dot {
  display: block;
}

/* Option label text */
.opt-label {
  flex: 1;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  min-width: 0;
}

/* Grade tag (e.g. "A 0分") */
.opt-grade-tag {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  flex-shrink: 0;
  transition: all 0.2s;
  white-space: nowrap;
}

/* Score bar row */
.opt-bar-row {
  padding-left: 30px; /* align with text after radio */
}
.opt-bar-track {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.opt-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s ease, opacity 0.3s;
}

/* Selected state */
.opt-card-selected {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(37,99,235,0.12);
}

/* Radio button colors for selected state by grade */
.opt-card-selected[data-grade="A"] .opt-radio { border-color: #EF4444; }
.opt-card-selected[data-grade="A"] .opt-radio-dot { background: #EF4444; }
.opt-card-selected[data-grade="B"] .opt-radio { border-color: #F97316; }
.opt-card-selected[data-grade="B"] .opt-radio-dot { background: #F97316; }
.opt-card-selected[data-grade="C"] .opt-radio { border-color: #F59E0B; }
.opt-card-selected[data-grade="C"] .opt-radio-dot { background: #F59E0B; }
.opt-card-selected[data-grade="D"] .opt-radio { border-color: #10B981; }
.opt-card-selected[data-grade="D"] .opt-radio-dot { background: #10B981; }
.opt-card-selected[data-grade="E"] .opt-radio { border-color: #2563EB; }
.opt-card-selected[data-grade="E"] .opt-radio-dot { background: #2563EB; }

/* Selected state border color by grade */
.opt-card[data-grade="A"] .opt-stripe { background: #EF4444; }
.opt-card[data-grade="A"] .opt-grade-tag { color: #991B1B; background: #FEE2E2; }
.opt-card[data-grade="A"] .opt-bar-fill { background: #EF4444; }
.opt-card-selected[data-grade="A"] { border-color: #EF4444; background: #FEF2F2; }
.opt-card-selected[data-grade="A"] .opt-grade-tag { color: #FFF; background: #EF4444; }

/* B grade (2 points) - orange */
.opt-card[data-grade="B"] .opt-stripe { background: #F97316; }
.opt-card[data-grade="B"] .opt-grade-tag { color: #9A3412; background: #FFEDD5; }
.opt-card[data-grade="B"] .opt-bar-fill { background: #F97316; }
.opt-card-selected[data-grade="B"] { border-color: #F97316; background: #FFF7ED; }
.opt-card-selected[data-grade="B"] .opt-grade-tag { color: #FFF; background: #F97316; }

/* C grade (4 points) - yellow */
.opt-card[data-grade="C"] .opt-stripe { background: #F59E0B; }
.opt-card[data-grade="C"] .opt-grade-tag { color: #92400E; background: #FEF3C7; }
.opt-card[data-grade="C"] .opt-bar-fill { background: #F59E0B; }
.opt-card-selected[data-grade="C"] { border-color: #F59E0B; background: #FFFBEB; }
.opt-card-selected[data-grade="C"] .opt-grade-tag { color: #FFF; background: #F59E0B; }

/* D grade (6 points) - green */
.opt-card[data-grade="D"] .opt-stripe { background: #10B981; }
.opt-card[data-grade="D"] .opt-grade-tag { color: #065F46; background: #D1FAE5; }
.opt-card[data-grade="D"] .opt-bar-fill { background: #10B981; }
.opt-card-selected[data-grade="D"] { border-color: #10B981; background: #ECFDF5; }
.opt-card-selected[data-grade="D"] .opt-grade-tag { color: #FFF; background: #10B981; }

/* E grade (8 points) - blue */
.opt-card[data-grade="E"] .opt-stripe { background: #2563EB; }
.opt-card[data-grade="E"] .opt-grade-tag { color: #1E40AF; background: #DBEAFE; }
.opt-card[data-grade="E"] .opt-bar-fill { background: #2563EB; }
.opt-card-selected[data-grade="E"] { border-color: #2563EB; background: #EFF6FF; }
.opt-card-selected[data-grade="E"] .opt-grade-tag { color: #FFF; background: #2563EB; }

/* Question navigation */
.q-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}
.q-nav-spacer { flex: 1; }
.q-nav-btn {
  min-width: 100px;
}

/* Animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hint toggle (keep for question-level hints) */
.hint-toggle {
  font-size: 13px;
  color: var(--primary);
  margin-top: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  -webkit-tap-highlight-color: transparent;
}
.hint-toggle:hover { text-decoration: underline; }
.hint-content {
  display: none;
  margin-top: 8px;
  padding: 12px;
  background: #F3F4F6;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-light);
}
.hint-content.open { display: block; }

/* Quiz bottom actions */
.quiz-actions {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--white);
  padding: 12px 20px;
  display: flex;
  gap: 12px;
  box-shadow: 0 -1px 4px rgba(0,0,0,0.06);
}
@media (min-width: 768px) {
  .quiz-actions { padding: 16px 40px; }
}
.quiz-actions .btn { flex: 1; }
.quiz-actions .btn:disabled { opacity: 0.4; }

/* ========================================
   RESULT - Hero
   ======================================== */
.result-hero {
  background: linear-gradient(180deg, #0F172A 0%, #1E3A5F 100%);
  padding: 40px 20px 32px;
  text-align: center;
}
@media (min-width: 768px) {
  .result-hero { padding: 52px 40px 40px; }
}
.result-hero-label {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 20px;
}
.result-score-ring {
  position: relative;
  display: inline-block;
  margin-bottom: 16px;
}
.result-score-ring canvas { display: block; }
.result-score-center {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}
.result-score-number { font-size: 42px; font-weight: 800; color: #fff; line-height: 1; }
.result-score-max { font-size: 15px; color: rgba(255,255,255,0.65); }
.health-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
}
.health-badge.level-excellent { background: rgba(16,185,129,0.2); color: #6EE7B7; }
.health-badge.level-good { background: rgba(245,158,11,0.2); color: #FCD34D; }
.health-badge.level-warning { background: rgba(249,115,22,0.2); color: #FDBA74; }
.health-badge.level-critical { background: rgba(239,68,68,0.2); color: #FCA5A5; }
.result-health-level { margin-top: 12px; }
.result-health-desc { font-size: 14px; color: rgba(255,255,255,0.75); margin-top: 8px; text-align: center; line-height: 1.6; }

/* ========================================
   RESULT - Content
   ======================================== */
.result-page {
  background: #FFFFFF;
  margin: 0;
  padding: 24px 20px 48px;
  border-radius: 24px 24px 0 0;
  min-height: calc(100vh - 280px);
}
@media (min-width: 768px) {
  .result-page { padding: 32px 40px 64px; }
}
.result-section { margin-bottom: 32px; }
.result-section-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 16px;
}
.radar-chart-container {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.radar-chart-container canvas { display: block; margin: 0 auto; }

/* Radar legend (compact tags below radar chart) */
.radar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  justify-content: center;
}
.radar-legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--bg);
  border-radius: 20px;
  font-size: 13px;
}
.radar-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.radar-legend-name { color: #374151; font-weight: 500; }
.radar-legend-score { font-weight: 700; color: #1F2937; }

/* Pain point */
.pain-point-card {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: var(--radius-sm);
  padding: 20px;
}
.pain-point-card h4 { font-size: 15px; font-weight: 700; color: #991B1B; margin-bottom: 8px; }
.pain-point-card p { font-size: 14px; color: #7F1D1D; line-height: 1.6; }

/* Personality CTA */
.personality-cta-card {
  background: #FFFFFF;
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.personality-cta-title {
  font-size: 20px;
  font-weight: 700;
  color: #1F2937;
  margin-bottom: 8px;
  line-height: 1.4;
}
.personality-cta-desc {
  font-size: 15px;
  color: #6B7280;
  margin-bottom: 24px;
  line-height: 1.5;
}
.btn-personality-cta {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  padding: 16px 24px;
  font-size: 18px;
  font-weight: 700;
  color: #FFFFFF;
  background: linear-gradient(135deg, #2563EB, #7C3AED);
  border: none;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(37,99,235,0.35);
  transition: all 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn-personality-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37,99,235,0.45);
}
.btn-personality-cta:active {
  transform: translateY(0);
}

/* Lead form */
.lead-form-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.lead-form-card h2 { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.lead-form-card .form-desc { font-size: 14px; color: var(--text-light); margin-bottom: 20px; }
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.form-group label .required { color: var(--danger); }
.form-group input,
.form-group select {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--text);
  transition: border-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%239CA3AF' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}
.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.form-group input.error,
.form-group select.error {
  border-color: var(--danger);
}
.form-error {
  font-size: 12px;
  color: var(--danger);
  margin-top: 4px;
  display: none;
}
.form-error.visible { display: block; }
.form-row {
  display: flex;
  gap: 12px;
}
.form-row .form-group { flex: 1; }
@media (max-width: 400px) {
  .form-row { flex-direction: column; gap: 0; }
}
.form-agreement {
  font-size: 12px;
  color: var(--text-lighter);
  margin-top: 12px;
  line-height: 1.5;
}

/* ========================================
   COMPLETE
   ======================================== */
.complete-page {
  padding: 48px 20px;
  text-align: center;
  min-height: 100vh;
}
@media (min-width: 768px) {
  .complete-page { padding: 64px 40px; }
}
.complete-icon { margin-bottom: 24px; }
.complete-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 8px;
}
.complete-subtitle {
  font-size: 15px;
  color: var(--text-light);
  margin-bottom: 32px;
}
.complete-summary {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  text-align: left;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.summary-row:last-child { border-bottom: none; }
.summary-label { font-size: 14px; color: var(--text-light); }
.summary-value { font-size: 14px; font-weight: 600; color: var(--dark); }

.complete-dimensions {
  text-align: left;
  margin-bottom: 24px;
}
.complete-dim-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.complete-dim-item:last-child { border-bottom: none; }
.complete-dim-name { font-size: 14px; color: var(--text); }
.complete-dim-score { font-size: 14px; font-weight: 700; }

.complete-report-info {
  background: var(--primary-light);
  border-radius: var(--radius);
  padding: 24px 20px;
  margin-bottom: 32px;
  text-align: left;
}
.report-info-icon { margin-bottom: 12px; }
.complete-report-info h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.complete-report-info p { font-size: 14px; color: var(--text-light); margin-bottom: 12px; line-height: 1.6; }
.complete-report-info ul {
  list-style: none;
  padding: 0;
}
.complete-report-info li {
  font-size: 14px;
  color: var(--text);
  padding: 4px 0;
  padding-left: 20px;
  position: relative;
}
.complete-report-info li::before {
  content: '';
  position: absolute;
  left: 0; top: 12px;
  width: 8px; height: 8px;
  background: var(--primary);
  border-radius: 50%;
}
.report-timeline {
  margin-top: 16px;
  padding-left: 4px;
}
.timeline-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  position: relative;
}
.timeline-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 7px;
  top: 24px;
  bottom: -6px;
  width: 2px;
  background: #E5E7EB;
}
.timeline-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #E5E7EB;
  border: 2px solid #D1D5DB;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.timeline-dot.done {
  background: #10B981;
  border-color: #10B981;
}
.timeline-dot.doing {
  background: #FFFFFF;
  border-color: #2563EB;
  animation: pulse-dot 1.5s infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37,99,235,0.4); }
  50% { box-shadow: 0 0 0 6px rgba(37,99,235,0); }
}
.timeline-text {
  font-size: 14px;
  color: var(--text);
  line-height: 1.4;
}

.complete-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
@media (min-width: 768px) {
  .complete-actions { flex-direction: row; justify-content: center; }
}

/* ========================================
   Toast / Loading
   ======================================== */
.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--dark);
  color: var(--white);
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.toast.visible { opacity: 1; }

/* Share Card */
.share-card-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.share-card-modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 360px;
  overflow: hidden;
}
.share-card-preview {
  width: 100%;
  display: block;
}
.share-card-actions {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
}
.share-card-actions .btn {
  flex: 1;
  font-size: 14px;
  padding: 10px 0;
}

.loading-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Safe area */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .quiz-actions { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }

/* ===== Complete Page ===== */
.complete-page { text-align: center; padding: 40px 20px 30px; }
.complete-icon { margin-bottom: 20px; }
.complete-title { font-size: 24px; font-weight: 700; color: #1F2937; margin-bottom: 8px; }
.complete-subtitle { font-size: 15px; color: #6B7280; margin-bottom: 28px; }

.complete-summary {
  background: #F9FAFB; border-radius: 12px; padding: 18px 20px; margin-bottom: 20px; text-align: left;
}
.summary-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; }
.summary-row + .summary-row { border-top: 1px solid #E5E7EB; }
.summary-label { font-size: 14px; color: #6B7280; }
.summary-value { font-size: 15px; font-weight: 600; color: #1F2937; }

.personality-cta-section { margin: 24px 0 20px; }
.personality-cta-btn { width: 100%; font-size: 17px; padding: 16px; border-radius: 12px; }
.personality-cta-hint { font-size: 13px; color: #9CA3AF; margin-top: 10px; }

.complete-actions { display: flex; gap: 12px; margin-top: 16px; }
.complete-actions .btn { flex: 1; }

/* ===== Poster Overlay — 750px渲染 + scale(0.5)缩放 ===== */
.poster-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 1000; display: none;
}
.poster-overlay.visible { display: block; }
.poster-scroll {
  display: flex; flex-direction: column; align-items: center;
  width: 100%; height: 100%;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 20px 0 30px; box-sizing: border-box;
}
.poster-close {
  position: fixed; top: 16px; right: 16px; z-index: 1010;
  width: 36px; height: 36px; background: rgba(255,255,255,0.15);
  border-radius: 50%; color: #fff; display: flex; align-items: center;
  justify-content: center; cursor: pointer;
}
/* 缩放容器：750px渲染 → 视觉375px显示 */
.poster-scale-wrap {
  transform: scale(0.5);
  transform-origin: top center;
  width: 750px;
  /* 750px高度的一半 = 375px，但实际内容不到750px，所以多减一些让按钮贴紧 */
  margin-bottom: 0; /* JS动态计算 */
}
.poster-card-marketing {
  width: 750px;
  border-radius: 24px; overflow: hidden;
  color: #fff; position: relative;
  background-color: #0F172A; /* 不透明基础层，防止截图透出背后内容 */
}
.poster-inner {
  padding: 44px 50px 36px;
}
/* ===== 主题区 ===== */
.poster-theme-area {
  text-align: center; margin-bottom: 32px;
}
.poster-theme-badge {
  display: inline-block;
  font-size: 20px; font-weight: 600; color: rgba(167,199,231,0.85);
  letter-spacing: 2px; padding: 4px 20px;
  margin-bottom: 8px;
}
.poster-theme-title {
  font-size: 26px; font-weight: 700; color: rgba(255,255,255,0.92);
  letter-spacing: 1px;
}
/* ===== 人格主视觉 ===== */
.poster-hero-area {
  text-align: center; margin-bottom: 36px;
}
.poster-hero-emoji {
  font-size: 80px; line-height: 1;
  display: block;
  margin-bottom: 28px;
}
.poster-hero-who {
  font-size: 22px; color: rgba(148,163,184,0.75);
  margin-bottom: 10px;
}
.poster-hero-name {
  font-size: 48px; font-weight: 900; color: #fff;
  letter-spacing: 2px; margin-bottom: 12px;
}
.poster-hero-tagline {
  font-size: 22px; color: rgba(255,255,255,0.75);
  font-style: italic; line-height: 1.5;
}
/* ===== 毒舌诊断 ===== */
.poster-roast-area {
  margin-bottom: 28px;
  background: rgba(0,0,0,0.2);
  border-radius: 12px; padding: 24px 24px;
  border-left: 3px solid rgba(255,255,255,0.5);
}
.poster-roast-label {
  font-size: 22px; font-weight: 700; color: rgba(255,255,255,0.9);
  margin-bottom: 10px;
}
.poster-roast-divider {
  width: 60px; height: 2px;
  background: linear-gradient(90deg, #F59E0B, #F59E0B);
  margin-bottom: 12px;
}
.poster-roast-text {
  font-size: 22px; color: rgba(255,255,255,0.9);
  font-style: italic; line-height: 1.65;
}
/* ===== 核心特质 ===== */
.poster-traits-area {
  margin-bottom: 28px;
  background: rgba(0,0,0,0.15);
  border-radius: 12px; padding: 24px;
}
.poster-traits-title {
  font-size: 18px; font-weight: 700; color: #94A3B8;
  margin-bottom: 12px;
}
.poster-trait-item {
  display: flex; align-items: center;
  margin-bottom: 10px; font-size: 18px;
  color: #fff; line-height: 1.5;
}
.poster-trait-item:last-child { margin-bottom: 0; }
.poster-trait-icon {
  margin-right: 10px; font-size: 18px; flex-shrink: 0;
}
.poster-trait-strong .poster-trait-icon { color: #10B981; }
.poster-trait-weak .poster-trait-icon { color: #EF4444; }
.poster-trait-label {
  font-size: 14px; color: #94A3B8; margin-left: 8px;
}
/* ===== 排名 ===== */
.poster-rank-area {
  text-align: center; margin-bottom: 28px;
}
.poster-rank-line {
  font-size: 18px; color: #fff; margin-bottom: 8px;
}
.poster-rank-pct {
  font-size: 36px; font-weight: 700; color: #F59E0B;
}
.poster-rank-cta {
  font-size: 16px; color: #94A3B8; margin-top: 8px;
}
/* ===== 底部 ===== */
.poster-bottom-area {
  margin-top: 8px;
}
.poster-qr-row {
  display: flex; align-items: center;
  margin-bottom: 16px;
}
.poster-qr {
  width: 110px; height: 110px;
  background: #fff; border-radius: 12px;
  padding: 6px; flex-shrink: 0;
  margin-right: 16px;
}
.poster-qr canvas, .poster-qr img {
  width: 98px !important; height: 98px !important;
  display: block;
}
.poster-qr-text { flex: 1; }
.poster-qr-action {
  font-size: 18px; color: #fff; margin-bottom: 6px;
}
.poster-qr-hint {
  font-size: 14px; color: #94A3B8;
}
.poster-brand-row {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 14px;
  display: flex; flex-direction: column;
  align-items: center;
}
.poster-brand-main {
  font-size: 20px; color: #fff; font-weight: 600;
  margin-bottom: 4px;
}
.poster-brand-sub {
  font-size: 16px; color: #94A3B8;
}
/* ===== 按钮 ===== */
.poster-actions {
  width: 375px; margin: 8px auto 0;
  display: flex; flex-direction: column; gap: 10px;
}
.poster-save-btn { width: 100%; }
.poster-share-btn { width: 100%; }
.poster-tip { font-size: 12px; color: rgba(255,255,255,0.5); margin-top: 8px; text-align: center; }
.poster-save-area { display: none; }

/* ========================================
   LEAD CAPTURE FORM - 快速留资
   ======================================== */
.lead-form-card {
  background: #fff;
  border-radius: 16px;
  padding: 28px 20px 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  text-align: center;
}
.lead-form-icon { font-size: 32px; margin-bottom: 12px; }
.lead-form-title {
  font-size: 18px; font-weight: 700; color: #1F2937; margin-bottom: 8px;
}
.lead-form-desc {
  font-size: 13px; color: #6B7280; line-height: 1.6; margin-bottom: 20px;
}
.lead-field {
  margin-bottom: 12px;
}
.lead-field input {
  width: 100%; height: 44px; border: 1.5px solid #E5E7EB; border-radius: 10px;
  padding: 0 14px; font-size: 15px; color: #1F2937; outline: none;
  background: #F9FAFB; transition: border-color 0.2s, background 0.2s;
  box-sizing: border-box;
}
.lead-field input:focus {
  border-color: #2563EB; background: #fff;
}
.lead-field input::placeholder { color: #9CA3AF; }
.lead-submit-btn {
  width: 100%; height: 48px; border: none; border-radius: 12px;
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  color: #fff; font-size: 16px; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 16px; transition: opacity 0.2s, transform 0.1s;
  box-shadow: 0 4px 16px rgba(37,99,235,0.3);
}
.lead-submit-btn:active { transform: scale(0.98); }
.lead-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ========================================
   LEAD SUCCESS - 提交成功
   ======================================== */
.lead-success-card {
  background: #fff;
  border-radius: 16px;
  padding: 28px 20px 24px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  margin-bottom: 16px;
}
.lead-success-icon {
  width: 48px; height: 48px; border-radius: 50%;
  background: #D1FAE5; color: #059669; font-size: 24px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}
.lead-success-title {
  font-size: 18px; font-weight: 700; color: #1F2937; margin-bottom: 8px;
}
.lead-success-desc {
  font-size: 13px; color: #6B7280; line-height: 1.6;
}

/* ========================================
   SUPPLEMENTARY FORM - 补充信息
   ======================================== */
.supp-form-card {
  background: #fff;
  border-radius: 16px;
  padding: 24px 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.supp-form-header {
  font-size: 16px; font-weight: 700; color: #1F2937; margin-bottom: 4px;
}
.supp-form-desc {
  font-size: 13px; color: #6B7280; margin-bottom: 20px;
}
.supp-field-group {
  margin-bottom: 16px;
}
.supp-label {
  display: block; font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 8px;
}
.supp-radio-group {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.supp-radio {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 13px; color: #4B5563; cursor: pointer;
  padding: 6px 12px; border: 1.5px solid #E5E7EB; border-radius: 8px;
  transition: border-color 0.2s, background 0.2s;
}
.supp-radio:has(input:checked) {
  border-color: #2563EB; background: #EFF6FF; color: #2563EB;
}
.supp-radio input { margin: 0; accent-color: #2563EB; }
.supp-field-row {
  display: flex; gap: 12px; margin-bottom: 12px;
}
.supp-field-row .supp-field { flex: 1; }
.supp-field input, .supp-field select {
  width: 100%; height: 40px; border: 1.5px solid #E5E7EB; border-radius: 8px;
  padding: 0 12px; font-size: 14px; color: #1F2937; outline: none;
  background: #F9FAFB; transition: border-color 0.2s; box-sizing: border-box;
}
.supp-field input:focus, .supp-field select:focus {
  border-color: #2563EB; background: #fff;
}
.supp-field input::placeholder { color: #9CA3AF; }
.supp-submit-btn {
  width: 100%; height: 44px; border: none; border-radius: 10px;
  background: #2563EB; color: #fff; font-size: 15px; font-weight: 600;
  cursor: pointer; margin-top: 16px; transition: opacity 0.2s;
}
.supp-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.supp-skip-btn {
  width: 100%; height: 40px; border: none; border-radius: 10px;
  background: transparent; color: #6B7280; font-size: 14px;
  cursor: pointer; margin-top: 8px; transition: color 0.2s;
}
.supp-skip-btn:hover { color: #2563EB; }

/* ========================================
   PERSONALITY LINK - 弱化人格入口
   ======================================== */
.personality-link-wrap {
  text-align: center; padding: 20px 0 8px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.personality-link-icon { font-size: 16px; }
.personality-link {
  font-size: 14px; color: #2563EB; text-decoration: underline;
  cursor: pointer; transition: color 0.2s;
}
.personality-link:hover { color: #1D4ED8; }
.personality-link-desc {
  font-size: 12px; color: #9CA3AF;
}

/* ===== Result Page Updates ===== */
.result-body { background: #F9FAFB; }

.poster-save-area {
  width: 750px; height: 1334px;
  transform-origin: top left;
  position: relative; overflow: hidden;
}
