*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --gold: #C9A84C;
  --gold-light: #F0D98A;
  --gold-pale: #FDF8EC;
  --navy: #1A2744;
  --navy-mid: #2E4480;
  --sky: #EFF5FF;
  --sky-mid: #D4E4FF;
  --text: #1A2744;
  --text-mid: #4A5A7A;
  --text-light: #8A9ABB;
  --white: #FFFFFF;
  --radius: 16px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Serif JP', serif;
  background: #FAFBFF;
  color: var(--text);
  line-height: 1.9;
  overflow-x: hidden;
}

/* ── HERO ── */
.hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-mid) 60%, #3A5AA0 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px 100px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 40%, rgba(201,168,76,0.12) 0%, transparent 70%);
}
.hero-mandala {
  position: absolute;
  width: 600px; height: 600px;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.06;
  animation: slow-spin 60s linear infinite;
}
@keyframes slow-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

.hero-badge {
  display: inline-block;
  border: 1px solid rgba(201,168,76,0.5);
  color: var(--gold-light);
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px;
  letter-spacing: 0.2em;
  padding: 6px 20px;
  border-radius: 100px;
  margin-bottom: 28px;
  position: relative;
}
.hero h1 {
  font-family: 'Noto Serif JP', serif;
  font-weight: 300;
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  color: var(--white);
  line-height: 1.4;
  letter-spacing: 0.05em;
  position: relative;
  margin-bottom: 8px;
}
.hero h1 span { color: var(--gold-light); font-weight: 500; }
.hero-sub {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  font-style: italic;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.05em;
  margin-bottom: 40px;
  position: relative;
}
.hero-tagline {
  font-size: 1rem;
  color: rgba(255,255,255,0.8);
  max-width: 560px;
  line-height: 2;
  position: relative;
  margin-bottom: 48px;
}
.hero-cta {
  display: inline-block;
  background: var(--gold);
  color: var(--navy);
  font-family: 'Noto Serif JP', serif;
  font-weight: 500;
  font-size: 1rem;
  padding: 16px 48px;
  border-radius: 100px;
  text-decoration: none;
  position: relative;
  transition: background 0.25s, transform 0.2s;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 24px rgba(201,168,76,0.4);
}
.hero-cta:hover { background: var(--gold-light); transform: translateY(-2px); }
.hero-scroll {
  position: absolute;
  bottom: 32px; left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.4);
  font-size: 12px;
  letter-spacing: 0.2em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.hero-scroll::after {
  content: '';
  width: 1px; height: 40px;
  background: rgba(255,255,255,0.25);
  animation: scroll-line 2s ease-in-out infinite;
}
@keyframes scroll-line {
  0%,100% { opacity:0.25; transform:scaleY(1); }
  50% { opacity:1; transform:scaleY(1.4); }
}

/* ── SECTIONS ── */
.section { padding: 100px 24px; }
.section--sky { background: var(--sky); }
.section--white { background: var(--white); }
.section--navy { background: var(--navy); position: relative; overflow: hidden; }
.section--navy::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 60% at 70% 50%, rgba(201,168,76,0.08) 0%, transparent 70%);
}
.section--gold-pale { background: var(--gold-pale); }

.container { max-width: 800px; margin: 0 auto; }

.eyebrow {
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px;
  letter-spacing: 0.25em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gold-light);
  max-width: 60px;
}
.eyebrow--center { justify-content: center; }
.eyebrow--center::after { display: none; }

.section-title {
  font-weight: 300;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  line-height: 1.5;
  margin-bottom: 32px;
  letter-spacing: 0.03em;
}
.section-title--white { color: var(--white); }

.lead { font-size: 1.05rem; line-height: 2.1; color: var(--text-mid); margin-bottom: 24px; }
.body-text { font-size: 1rem; line-height: 2.1; color: var(--text-mid); margin-bottom: 24px; }
.body-text--white { color: rgba(255,255,255,0.75); }

/* ── DIAGRAM ── */
.diagram-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 48px 40px;
  margin: 40px 0;
  border: 1px solid var(--sky-mid);
  box-shadow: 0 8px 40px rgba(26,39,68,0.07);
}
.diagram-title {
  text-align: center;
  font-size: 1rem;
  color: var(--text-light);
  letter-spacing: 0.15em;
  margin-bottom: 32px;
}
.axes-diagram { display: flex; justify-content: center; align-items: center; padding: 20px 0; }
.axes-diagram svg { max-width: 380px; width: 100%; }

/* ── HIGHLIGHT ── */
.highlight-box {
  background: var(--gold-pale);
  border-left: 3px solid var(--gold);
  border-radius: 0 12px 12px 0;
  padding: 24px 28px;
  margin: 32px 0;
  font-size: 1.1rem;
  line-height: 2;
}
.highlight-box strong { color: var(--navy); font-weight: 700; }

/* ── IMAKOKO ── */
.imakoko-box {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  border-radius: 24px;
  padding: 56px 48px;
  text-align: center;
  margin: 48px 0;
  position: relative;
  overflow: hidden;
}
.imakoko-box::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 50%, rgba(201,168,76,0.1) 0%, transparent 70%);
}
.imakoko-phrase {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 300;
  color: var(--white);
  letter-spacing: 0.3em;
  position: relative;
  margin-bottom: 16px;
  line-height: 1.5;
}
.imakoko-phrase span { color: var(--gold-light); }
.imakoko-desc { color: rgba(255,255,255,0.65); font-size: 0.95rem; position: relative; line-height: 2; }

/* ── STATS ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 48px 0 40px;
  position: relative;
}
.stat-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
}
.stat-card:first-child { background: rgba(201,168,76,0.15); border-color: rgba(201,168,76,0.4); }
.stat-value {
  font-family: 'Cormorant Garamond', serif;
  font-size: 3.5rem;
  font-weight: 300;
  color: var(--gold-light);
  line-height: 1;
  margin-bottom: 8px;
}
.stat-card:first-child .stat-value { font-size: 4rem; }
.stat-label { font-size: 0.9rem; color: rgba(255,255,255,0.6); letter-spacing: 0.1em; }
.stat-name { font-size: 1.05rem; color: var(--white); font-weight: 500; margin-bottom: 4px; }

/* ── THREE COLS ── */
.three-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 40px 0; }
.col-card { background: var(--sky); border-radius: var(--radius); padding: 32px 24px; text-align: center; }
.col-card .num { font-family: 'Cormorant Garamond', serif; font-size: 2rem; font-weight: 300; color: var(--gold); margin-bottom: 8px; }
.col-card h3 { font-size: 1rem; font-weight: 500; margin-bottom: 12px; color: var(--navy); }
.col-card p { font-size: 0.9rem; color: var(--text-mid); line-height: 1.9; }

/* ── TEST CTA ── */
.test-card {
  background: var(--white);
  border-radius: 24px;
  padding: 56px 48px;
  max-width: 680px;
  margin: 0 auto;
  box-shadow: 0 16px 60px rgba(26,39,68,0.12);
}
.test-desc { font-size: 0.95rem; color: var(--text-mid); line-height: 2.1; margin-bottom: 16px; text-align: left; }
.rank-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 28px 0 36px; text-align: left; }
.rank-item { background: var(--sky); border-radius: 12px; padding: 16px 20px; }
.rank-item strong { display: block; color: var(--navy); font-size: 0.85rem; margin-bottom: 4px; letter-spacing: 0.05em; }
.rank-item span { color: var(--text-mid); font-size: 0.85rem; line-height: 1.7; }

/* ── BUTTONS ── */
.btn {
  display: inline-block;
  font-family: 'Noto Serif JP', serif;
  font-weight: 500;
  font-size: 1rem;
  padding: 16px 48px;
  border-radius: 100px;
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: background 0.2s, transform 0.2s;
  cursor: pointer;
  border: none;
}
.btn--gold { background: var(--gold); color: var(--navy); box-shadow: 0 4px 24px rgba(201,168,76,0.4); }
.btn--gold:hover { background: var(--gold-light); transform: translateY(-2px); }
.btn--navy { background: var(--navy); color: var(--white); box-shadow: 0 4px 24px rgba(26,39,68,0.25); }
.btn--navy:hover { background: var(--navy-mid); transform: translateY(-2px); }

/* ── FOOTER ── */
footer {
  background: var(--navy);
  color: rgba(255,255,255,0.45);
  text-align: center;
  padding: 40px 24px;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}
footer a { color: rgba(255,255,255,0.6); text-decoration: none; }

/* ── FADE IN ── */
.fade-in { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.fade-in.visible { opacity: 1; transform: none; }

/* ── TEST PAGE ── */
.test-page { background: var(--sky); min-height: 100vh; padding: 0 0 80px; }
.test-header {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-mid) 100%);
  padding: 40px 24px 48px;
  text-align: center;
}
.test-header h1 { font-family: 'Noto Serif JP', serif; font-weight: 300; font-size: clamp(1.4rem, 4vw, 2rem); color: var(--white); letter-spacing: 0.05em; margin-bottom: 8px; }
.test-header p { font-family: 'Cormorant Garamond', serif; font-style: italic; color: var(--gold-light); font-size: 1rem; letter-spacing: 0.1em; }

.progress-wrap { background: rgba(255,255,255,0.15); height: 4px; margin-top: 24px; border-radius: 2px; max-width: 400px; margin-left: auto; margin-right: auto; }
.progress-bar { height: 4px; background: var(--gold); border-radius: 2px; transition: width 0.4s ease; width: 0%; }

.test-body { max-width: 680px; margin: 0 auto; padding: 48px 24px 0; }

.question-page { display: none; }
.question-page.active { display: block; }

.question-block { background: var(--white); border-radius: var(--radius); padding: 32px 28px; margin-bottom: 20px; box-shadow: 0 4px 20px rgba(26,39,68,0.06); }
.question-num { font-family: 'Cormorant Garamond', serif; font-size: 12px; letter-spacing: 0.2em; color: var(--gold); margin-bottom: 10px; text-transform: uppercase; }
.question-text { font-size: 1rem; font-weight: 500; line-height: 1.8; margin-bottom: 20px; color: var(--navy); }
.options { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.options li label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--sky-mid);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  font-size: 0.95rem;
  line-height: 1.6;
}
.options li label:hover { border-color: var(--gold-light); background: var(--gold-pale); }
.options li input[type="radio"] { display: none; }
.options li input[type="radio"]:checked + .radio-custom { background: var(--gold); border-color: var(--gold); }
.options li input[type="radio"]:checked + .radio-custom::after { opacity: 1; }
.options li:has(input:checked) label { border-color: var(--gold); background: var(--gold-pale); }

.radio-custom {
  width: 20px; height: 20px;
  border: 2px solid var(--sky-mid);
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  transition: all 0.2s;
  pointer-events: none;
}
.radio-custom::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 8px; height: 8px;
  background: var(--white);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s;
}

.page-counter { text-align: center; font-family: 'Cormorant Garamond', serif; font-size: 13px; letter-spacing: 0.2em; color: var(--text-light); margin-bottom: 28px; }

.next-btn-wrap { text-align: center; margin-top: 32px; display: none; }

/* ── RESULT PAGE ── */
.result-page { background: #FAFBFF; min-height: 100vh; }
.result-hero {
  padding: 80px 24px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.result-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 40%, rgba(201,168,76,0.12) 0%, transparent 70%);
}
.result-rank-label {
  font-family: 'Cormorant Garamond', serif;
  font-size: 12px;
  letter-spacing: 0.3em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 16px;
  position: relative;
}
.result-score {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(5rem, 15vw, 9rem);
  font-weight: 300;
  line-height: 1;
  position: relative;
  margin-bottom: 8px;
}
.result-score-unit { font-size: 2.5rem; }
.result-rank-name {
  font-family: 'Noto Serif JP', serif;
  font-weight: 300;
  font-size: clamp(1.8rem, 5vw, 3rem);
  letter-spacing: 0.1em;
  position: relative;
  margin-bottom: 8px;
}
.result-category {
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  position: relative;
  margin-bottom: 40px;
}

.result-body { max-width: 720px; margin: 0 auto; padding: 0 24px 80px; }

.result-card { background: var(--white); border-radius: var(--radius); padding: 40px 36px; margin-bottom: 24px; border: 1px solid var(--sky-mid); box-shadow: 0 4px 24px rgba(26,39,68,0.06); }
.result-card h2 { font-family: 'Noto Serif JP', serif; font-weight: 500; font-size: 1.1rem; color: var(--navy); margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--sky-mid); letter-spacing: 0.05em; }
.result-card p { font-size: 0.95rem; line-height: 2.1; color: var(--text-mid); margin-bottom: 16px; }
.result-card p:last-child { margin-bottom: 0; }

.work-steps { list-style: none; counter-reset: step; }
.work-steps li { counter-increment: step; display: flex; gap: 16px; margin-bottom: 20px; }
.work-steps li::before {
  content: counter(step);
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--gold);
  min-width: 32px;
  line-height: 1.4;
}
.work-steps li p { font-size: 0.95rem; line-height: 2; color: var(--text-mid); margin: 0; }
.work-steps li strong { display: block; color: var(--navy); font-size: 0.9rem; margin-bottom: 4px; }

.result-back { text-align: center; margin-top: 40px; }

.share-wrap { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
.share-btn { display: inline-block; padding: 10px 24px; border-radius: 100px; font-size: 0.9rem; text-decoration: none; letter-spacing: 0.05em; transition: opacity 0.2s; }
.share-btn:hover { opacity: 0.8; }
.share-btn--x { background: #000; color: #fff; }
.share-btn--fb { background: #1877F2; color: #fff; }

/* rank colors */
.rank-s { color: #8B5CF6; }
.rank-a { color: var(--gold); }
.rank-b { color: #3B82F6; }
.rank-c { color: #10B981; }
.rank-d { color: #F59E0B; }
.rank-e { color: #EF4444; }
.result-hero--s { background: linear-gradient(160deg, #2D1B69 0%, #4C1D95 60%, #6D28D9 100%); }
.result-hero--a { background: linear-gradient(160deg, var(--navy) 0%, var(--navy-mid) 60%, #B8973A 100%); }
.result-hero--b { background: linear-gradient(160deg, #0D2B5E 0%, #1E3A8A 60%, #2563EB 100%); }
.result-hero--c { background: linear-gradient(160deg, #064E3B 0%, #065F46 60%, #059669 100%); }
.result-hero--d { background: linear-gradient(160deg, #78350F 0%, #92400E 60%, #D97706 100%); }
.result-hero--e { background: linear-gradient(160deg, #7F1D1D 0%, #991B1B 60%, #DC2626 100%); }

@media (max-width: 640px) {
  .stats-grid { grid-template-columns: 1fr; }
  .three-cols { grid-template-columns: 1fr; }
  .rank-grid { grid-template-columns: 1fr; }
  .diagram-card { padding: 32px 20px; }
  .imakoko-box { padding: 40px 24px; }
  .test-card { padding: 40px 24px; }
  .result-card { padding: 28px 20px; }
  .question-block { padding: 24px 20px; }
}
