:root {
  --bg: #0a0e1a;
  --bg-secondary: #111827;
  --card: rgba(17, 24, 39, 0.85);
  --card-border: rgba(99, 102, 241, 0.15);
  --text: #f1f5f9;
  --muted: #94a3b8;
  --accent: #6366f1;
  --accent-strong: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.4);
  --positive: #22c55e;
  --negative: #ef4444;
  --warning: #f59e0b;
  --neutral: #475569;
  --line: rgba(148, 163, 184, 0.15);
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  --glass: rgba(255, 255, 255, 0.03);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", "Noto Sans JP", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px 40px;
}

/* ========== HERO ========== */
.hero {
  text-align: center;
  margin-bottom: 24px;
  max-width: 780px;
  animation: fadeInUp 0.8s ease-out;
}

.hero__logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.2);
  color: var(--accent-strong);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.06em;
  backdrop-filter: blur(8px);
}

.hero__logo-icon {
  font-size: 18px;
}

.hero__title {
  margin: 16px 0 12px;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1.3;
  background: linear-gradient(135deg, #f1f5f9 0%, #818cf8 50%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__lead {
  margin: 0 auto;
  max-width: 600px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 15px;
}

.sp-only {
  display: inline;
}

/* ========== CARD ========== */
.card {
  width: 100%;
  max-width: 880px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 28px 24px 32px;
  backdrop-filter: blur(20px);
}

h2 {
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 800;
}

p {
  margin: 0 0 12px;
  line-height: 1.7;
}

/* ========== INTRO ========== */
.intro .points {
  padding-left: 20px;
  margin: 16px 0 20px;
  color: var(--muted);
  line-height: 1.8;
}

.intro .points li {
  margin-bottom: 4px;
}

.intro .points li::marker {
  color: var(--accent-strong);
}

.axis-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 20px 0;
}

.axis-card {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 14px;
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.axis-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.axis-icon {
  font-size: 28px;
  margin-bottom: 6px;
}

.axis-label {
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 4px;
  color: var(--accent-strong);
}

.axis-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.start-cta {
  text-align: center;
}

/* ========== BUTTONS ========== */
.btn {
  border: none;
  cursor: pointer;
  font-weight: 700;
  font-family: inherit;
  border-radius: 12px;
  font-size: 14px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 12px 20px;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  background: var(--accent-strong);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.4);
}

.btn-glow {
  animation: btnGlow 2s ease-in-out infinite;
}

@keyframes btnGlow {
  0%, 100% {
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
  }
  50% {
    box-shadow: 0 8px 40px rgba(99, 102, 241, 0.55), 0 0 60px rgba(99, 102, 241, 0.2);
  }
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  padding: 12px 18px;
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
  transform: none;
  animation: none;
}

.btn-large {
  width: 100%;
  padding: 16px 24px;
  font-size: 16px;
  border-radius: 999px;
}

.hidden {
  display: none;
}

/* ========== QUIZ ========== */
.progress {
  width: 100%;
  height: 8px;
  background: rgba(71, 85, 105, 0.3);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 14px;
}

.progress__bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong), #a78bfa);
  transition: width 0.3s ease;
  border-radius: 999px;
}

.quiz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.quiz-count {
  font-weight: 700;
  color: var(--text);
  font-size: 15px;
}

.quiz-badge {
  padding: 6px 12px;
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.2);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.question {
  margin-top: 8px;
  margin-bottom: 28px;
  line-height: 1.45;
  font-size: 24px;
  text-align: center;
  font-weight: 800;
  animation: fadeIn 0.3s ease;
}

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

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.scale-guides {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 12px;
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 12px;
}

.scale-label.positive {
  color: var(--positive);
}

.scale-label.negative {
  color: var(--negative);
}

.choices {
  margin-bottom: 24px;
}

.scale-choices {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 0 8px;
}

.choice-dot {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 3px solid var(--neutral);
  background: rgba(15, 23, 42, 0.6);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  position: relative;
  cursor: pointer;
}

.choice-dot.dot-md {
  width: 50px;
  height: 50px;
}

.choice-dot.dot-lg {
  width: 68px;
  height: 68px;
}

.choice-dot.dot-sm {
  width: 40px;
  height: 40px;
}

.choice-dot.tone-positive {
  border-color: rgba(34, 197, 94, 0.45);
}

.choice-dot.tone-negative {
  border-color: rgba(239, 68, 68, 0.45);
}

.choice-dot.tone-neutral {
  border-color: var(--neutral);
}

.choice-dot:focus-visible {
  outline: 3px solid rgba(99, 102, 241, 0.4);
  outline-offset: 4px;
}

.choice-dot:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.15);
}

.choice-dot.active.tone-positive {
  background: var(--positive);
  border-color: var(--positive);
  box-shadow: 0 0 24px rgba(34, 197, 94, 0.4), 0 8px 20px rgba(34, 197, 94, 0.2);
}

.choice-dot.active.tone-negative {
  background: var(--negative);
  border-color: var(--negative);
  box-shadow: 0 0 24px rgba(239, 68, 68, 0.4), 0 8px 20px rgba(239, 68, 68, 0.2);
}

.choice-dot.active.tone-neutral {
  background: var(--neutral);
  border-color: var(--neutral);
  box-shadow: 0 0 16px rgba(71, 85, 105, 0.3);
}

.nav {
  display: flex;
  gap: 10px;
}

.nav .btn {
  flex: 1;
}

.nav #next-btn {
  box-shadow: none;
}

/* ========== RESULT ========== */
.result-header {
  text-align: center;
  margin-bottom: 20px;
  animation: fadeInUp 0.6s ease-out;
}

.pill {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.2);
  color: var(--accent-strong);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.04em;
}

/* ========== GAUGE ========== */
.gauge-container {
  position: relative;
  width: 220px;
  margin: 20px auto 10px;
}

.gauge-svg {
  width: 100%;
  height: auto;
}

.gauge-percent {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 42px;
  font-weight: 900;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #f1f5f9, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gauge-label {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-top: -4px;
}

.result-code {
  margin: 14px 0 4px;
  font-size: 36px;
  letter-spacing: 0.1em;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent-strong), #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.result-name {
  margin: 0 0 6px;
  font-weight: 700;
  font-size: 18px;
}

.result-desc {
  color: var(--muted);
  margin: 0 auto;
  max-width: 560px;
  font-size: 14px;
}

.result-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
  margin-bottom: 18px;
}

.result-box {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 16px 12px;
  background: var(--glass);
  backdrop-filter: blur(8px);
  transition: border-color 0.2s ease;
}

.result-box:hover {
  border-color: rgba(99, 102, 241, 0.3);
}

.result-box h3 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 800;
}

.result-box ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.7;
}

.result-box li + li {
  margin-top: 4px;
}

.result-actions {
  display: flex;
  gap: 10px;
  flex-direction: column;
  flex-wrap: wrap;
}

.result-actions .btn {
  width: 100%;
}

.share-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-social {
  color: #fff;
  padding: 12px 14px;
  border-radius: 12px;
  border: none;
}

.btn-facebook {
  background: #1877f2;
  box-shadow: 0 8px 20px rgba(24, 119, 242, 0.25);
}

.btn-facebook:hover {
  background: #0f6add;
  transform: translateY(-1px);
}

.btn-line {
  background: #00c300;
  box-shadow: 0 8px 20px rgba(0, 195, 0, 0.2);
}

.btn-line:hover {
  background: #00a300;
  transform: translateY(-1px);
}

/* ========== FOOTER ========== */
.site-footer {
  margin-top: 32px;
  text-align: center;
  color: var(--neutral);
  font-size: 12px;
}

.site-footer p {
  margin: 0;
}

/* ========== RESPONSIVE ========== */
@media (min-width: 720px) {
  .sp-only {
    display: none;
  }

  .hero__title {
    font-size: 42px;
  }

  .card {
    padding: 32px 36px 36px;
  }

  .axis-cards {
    grid-template-columns: repeat(4, 1fr);
  }

  .question {
    font-size: 28px;
  }

  .choice-dot { width: 64px; height: 64px; }
  .choice-dot.dot-md { width: 52px; height: 52px; }
  .choice-dot.dot-lg { width: 72px; height: 72px; }
  .choice-dot.dot-sm { width: 42px; height: 42px; }

  .result-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .result-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .result-actions .btn {
    max-width: none;
  }

  .share-buttons {
    flex-direction: row;
  }

  .share-buttons .btn {
    flex: 1;
  }

  .gauge-container {
    width: 260px;
  }

  .gauge-percent {
    font-size: 48px;
  }
}
