/* ============================================================
   香りタイプ診断16 — スタイル
   ============================================================ */
:root {
  --bg: #fff7f0;
  --card: #ffffff;
  --ink: #4a3730;
  --ink-soft: #8a7568;
  --accent: #ff8fab;
  --accent-deep: #f06292;
  --teal: #26c6a2;
  --gold: #e8b34b;
  --line-green: #06c755;
  --radius: 20px;
  --shadow: 0 4px 20px rgba(74, 55, 48, 0.08);
}

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

body {
  font-family: 'Zen Maru Gothic', 'Hiragino Maru Gothic ProN', sans-serif;
  background:
    radial-gradient(circle at 15% 20%, #ffe9d6 0%, transparent 40%),
    radial-gradient(circle at 85% 75%, #ffe0ec 0%, transparent 45%),
    var(--bg);
  color: var(--ink);
  min-height: 100dvh;
  line-height: 1.7;
}

.screen { display: none; min-height: 100dvh; }
.screen.active { display: block; }
.center { text-align: center; }

/* ---------- ヒーロー ---------- */
.hero {
  max-width: 560px;
  margin: 0 auto;
  padding: 56px 24px 40px;
  text-align: center;
}
.hero-eyebrow {
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.15em;
  font-size: 13px;
  margin-bottom: 8px;
}
.hero-title {
  font-size: clamp(30px, 8.5vw, 48px);
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: nowrap;
}
.hero-title .accent {
  background: linear-gradient(135deg, var(--accent) 0%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-soft);
  letter-spacing: 0.3em;
  margin: 4px 0 20px;
}

.hero-chars {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: -10px;
  margin-bottom: 20px;
}
.hero-char {
  width: 128px;
  height: 128px;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow);
  border: 3px solid #fff;
}
.hero-char.c1 { transform: rotate(-6deg) translateY(6px); z-index: 1; }
.hero-char.c2 { width: 148px; height: 148px; z-index: 2; margin: 0 -14px; }
.hero-char.c3 { transform: rotate(6deg) translateY(6px); z-index: 1; }
@media (max-width: 420px) {
  .hero-char { width: 100px; height: 100px; }
  .hero-char.c2 { width: 120px; height: 120px; }
}

.hero-copy { font-size: 15px; margin-bottom: 28px; }
.hero-copy strong { color: var(--accent-deep); }

.btn-primary {
  font-family: inherit;
  font-size: 18px;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  border: none;
  border-radius: 999px;
  padding: 18px 56px;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(240, 98, 146, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(240, 98, 146, 0.5); }
.btn-primary:active { transform: translateY(0); }

/* ---------- セクション共通 ---------- */
.section { max-width: 640px; margin: 0 auto; padding: 40px 20px; }
.section-title {
  text-align: center;
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 20px;
  position: relative;
}
.section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  margin: 10px auto 0;
}
.section-lead { text-align: center; font-size: 14px; margin-bottom: 24px; }
.section-lead strong { color: var(--accent-deep); }

/* ---------- 4軸カード ---------- */
.axes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (max-width: 480px) { .axes-grid { grid-template-columns: 1fr; } }
.axis-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.axis-badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 900;
  color: #fff;
  border-radius: 8px;
  padding: 2px 10px;
  margin-bottom: 8px;
}
.axis-badge.sd { background: var(--accent-deep); }
.axis-badge.bm { background: var(--gold); }
.axis-badge.wc { background: #e8804b; }
.axis-badge.lk { background: #8d6fc0; }
.axis-card h3 { font-size: 16px; font-weight: 900; margin-bottom: 4px; }
.axis-card p { font-size: 13px; color: var(--ink-soft); }
.axes-note { text-align: center; font-size: 14px; margin-top: 20px; }
.axes-note strong { color: var(--accent-deep); font-size: 16px; }

/* ---------- ティザーグリッド ---------- */
.type-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 480px) { .type-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
.type-cell {
  background: var(--card);
  border-radius: var(--radius);
  padding: 10px 8px 12px;
  text-align: center;
  box-shadow: var(--shadow);
}
.type-cell img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 14px;
  background: #fffdfa;
}
.type-cell .t-code {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.18em;
  margin-top: 6px;
  background: linear-gradient(135deg, var(--accent-deep) 0%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.type-cell .t-name { font-size: 12px; font-weight: 700; margin-top: 2px; }
.type-cell .t-family { font-size: 10px; color: var(--ink-soft); }

/* ---------- 診断のながれ ---------- */
.how-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}
@media (max-width: 540px) { .how-steps { grid-template-columns: 1fr; } }
.how-step {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  box-shadow: var(--shadow);
}
.how-icon { font-size: 36px; margin-bottom: 8px; }
.how-step h3 { font-size: 15px; font-weight: 900; margin-bottom: 4px; }
.how-step p { font-size: 12px; color: var(--ink-soft); }

/* ---------- FAQ ---------- */
.faq-item {
  background: var(--card);
  border-radius: 14px;
  box-shadow: var(--shadow);
  margin-bottom: 10px;
  overflow: hidden;
}
.faq-item summary {
  font-size: 14px;
  font-weight: 700;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
  position: relative;
}
.faq-item summary::before { content: 'Q. '; color: var(--accent-deep); font-weight: 900; }
.faq-item summary::after {
  content: '＋';
  position: absolute;
  right: 18px;
  color: var(--accent-deep);
  font-weight: 900;
}
.faq-item[open] summary::after { content: '−'; }
.faq-item p { font-size: 13px; padding: 0 20px 16px; color: var(--ink-soft); }

.footer {
  text-align: center;
  padding: 24px 0 48px;
}
.footer-presented {
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: 0.12em;
  opacity: 0.8;
  margin-bottom: 6px;
}
.footer-logo {
  height: 18px;
  opacity: 0.65;
}

/* ---------- 診断画面 ---------- */
#screen-quiz { max-width: 560px; margin: 0 auto; padding: 20px; }

.quiz-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0 24px;
}
.btn-back {
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink-soft);
  background: var(--card);
  border: none;
  border-radius: 12px;
  width: 40px; height: 40px;
  cursor: pointer;
  box-shadow: var(--shadow);
  flex-shrink: 0;
}
.btn-back:disabled { opacity: 0.3; cursor: default; }
.progress-track {
  flex: 1;
  height: 10px;
  background: #f3e4d8;
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 5%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--gold) 100%);
  border-radius: 999px;
  transition: width 0.3s ease;
}
.progress-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  flex-shrink: 0;
}

.quiz-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 32px 24px 36px;
  box-shadow: var(--shadow);
  animation: slideIn 0.25s ease;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}
.quiz-card.animating { animation: slideIn 0.25s ease; }

.q-number {
  font-size: 14px;
  font-weight: 900;
  color: var(--accent-deep);
  margin-bottom: 8px;
}
.q-text {
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 20px;
  min-height: 2.6em;
  text-align: center;
}

/* A/Bの選択肢ラベル */
.q-options { margin-bottom: 24px; text-align: center; }
.q-option { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.opt-tag { font-weight: 900; margin-right: 6px; }
.opt-a .opt-tag { color: var(--accent-deep); }
.opt-b .opt-tag { color: var(--teal); }

/* 6段階ハートスケール */
.scale {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.scale-end {
  font-size: 15px;
  font-weight: 900;
  flex-shrink: 0;
}
.end-a { color: var(--accent-deep); margin-right: 4px; }
.end-b { color: var(--teal); margin-left: 4px; }

.heart {
  --size: 40px;
  width: var(--size);
  height: var(--size);
  flex-shrink: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  position: relative;
  padding: 0;
  transition: transform 0.12s ease;
}
.heart.w3 { --size: 56px; }
.heart.w2 { --size: 44px; }
.heart.w1 { --size: 32px; }
@media (max-width: 420px) {
  .scale { gap: 5px; }
  .heart.w3 { --size: 48px; }
  .heart.w2 { --size: 38px; }
  .heart.w1 { --size: 28px; }
}

/* SVGハート（マスクで描画） */
.heart::before {
  content: '';
  position: absolute;
  inset: 0;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/svg%3E") center / contain no-repeat;
}
/* 輪郭ハート（未選択）: 塗り色からくり抜きで輪郭表現 */
.heart.a::before { background: var(--accent-deep); }
.heart.b::before { background: var(--teal); }
.heart::after {
  content: '';
  position: absolute;
  inset: 3px;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/svg%3E") center / contain no-repeat;
  background: var(--card);
  transition: opacity 0.12s ease;
}
/* 選択済み or ホバーで塗りつぶし */
.heart:hover::after, .heart.selected::after { opacity: 0; }
.heart:hover { transform: scale(1.15); }
.heart.selected { transform: scale(1.1); }

/* ---------- 完了画面 ---------- */
.complete-wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 64px 24px 48px;
  text-align: center;
}
.complete-sparkle { font-size: 56px; animation: pop 0.5s ease; }
@keyframes pop {
  0% { transform: scale(0); }
  70% { transform: scale(1.2); }
  100% { transform: scale(1); }
}
.complete-title { font-size: 32px; font-weight: 900; margin: 8px 0 12px; }
.complete-copy { font-size: 15px; margin-bottom: 28px; }
.complete-copy strong { color: var(--accent-deep); }

.line-steps {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 24px;
  margin-bottom: 28px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.line-step { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.step-num {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.btn-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 900;
  color: #fff;
  text-decoration: none;
  background: var(--line-green);
  border-radius: 999px;
  padding: 18px 48px;
  box-shadow: 0 6px 24px rgba(6, 199, 85, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-line:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(6, 199, 85, 0.45); }

.complete-note { font-size: 12px; color: var(--ink-soft); margin: 14px 0 32px; }

.btn-ghost {
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-soft);
  background: none;
  border: none;
  text-decoration: underline;
  cursor: pointer;
}

/* ---------- 結果ページ ---------- */
:root { --type-color: var(--accent-deep); }
.result-wrap { max-width: 560px; margin: 0 auto; padding: 40px 20px 8px; }

/* 結果発表オーバーレイ */
.reveal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background:
    radial-gradient(circle at 30% 30%, #ffe9d6 0%, transparent 55%),
    radial-gradient(circle at 70% 70%, #ffe0ec 0%, transparent 55%),
    var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease;
}
.reveal-overlay.fade-out { opacity: 0; pointer-events: none; }
.reveal-inner { text-align: center; }
.reveal-text {
  font-size: 20px;
  font-weight: 900;
  color: var(--ink);
  letter-spacing: 0.08em;
  animation: revealPulse 1.2s ease infinite;
}
@keyframes revealPulse { 0%,100% { opacity: 0.65; } 50% { opacity: 1; } }
.reveal-bubbles { display: flex; gap: 14px; justify-content: center; margin-bottom: 18px; }
.reveal-bubbles span {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  animation: bubbleFloat 1s ease-in-out infinite;
}
.reveal-bubbles span:nth-child(2) { animation-delay: 0.18s; border-color: var(--gold); }
.reveal-bubbles span:nth-child(3) { animation-delay: 0.36s; }
@keyframes bubbleFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
body.revealing { overflow: hidden; }

.result-hero { text-align: center; margin-bottom: 24px; animation: heroPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes heroPop {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}
.result-eyebrow {
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.15em;
  font-size: 13px;
  margin-bottom: 12px;
}
.result-char-frame {
  display: inline-block;
  border-radius: 32px;
  padding: 8px;
  background: linear-gradient(135deg, var(--type-color), #fff 130%);
  box-shadow: var(--shadow);
}
.result-char {
  display: block;
  width: min(64vw, 280px);
  height: auto;
  border-radius: 26px;
  background: #fff;
}
.result-code {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.3em;
  margin-top: 16px;
  color: var(--type-color);
}
.result-name { font-size: 30px; font-weight: 900; line-height: 1.3; }
.result-catch { font-size: 15px; font-weight: 700; color: var(--ink-soft); margin-top: 6px; }

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 14px;
}
.tag-chip {
  font-size: 12px;
  font-weight: 700;
  color: var(--type-color);
  background: #fff;
  border: 2px solid var(--type-color);
  border-radius: 999px;
  padding: 4px 14px;
}

/* 香りバランスバー */
.axes-bars { display: flex; flex-direction: column; gap: 18px; }
.axis-labels {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.axis-pole small { font-size: 11px; font-weight: 500; }
.axis-pole.win { color: var(--type-color); }
.axis-pole b { font-size: 15px; font-weight: 900; }
.axis-track {
  height: 14px;
  border-radius: 999px;
  background: #f3e4d8;
  overflow: hidden;
}
.axis-track.flip { transform: scaleX(-1); }
.axis-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--type-color);
  background: linear-gradient(90deg, var(--type-color), color-mix(in srgb, var(--type-color) 55%, #ffffff));
  animation: barGrow 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: left;
}
@keyframes barGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* つよみ / 注意 */
.sw-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
}
@media (max-width: 480px) { .sw-grid { grid-template-columns: 1fr; } }
.sw-title { font-size: 14px; font-weight: 900; margin-bottom: 8px; }
.sw-title.good { color: var(--accent-deep); }
.sw-title.care { color: #8d6fc0; }
.sw-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.sw-list li {
  font-size: 13px;
  background: #fff7f0;
  border-radius: 10px;
  padding: 8px 12px;
}

.scent-reason { font-size: 14px; margin-bottom: 16px; }

.result-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 16px;
}
.result-heading {
  font-size: 16px;
  font-weight: 900;
  color: var(--accent-deep);
  margin-bottom: 12px;
}
.result-desc { font-size: 14px; }

.result-family { margin-bottom: 10px; }
.family-badge {
  display: inline-block;
  font-size: 14px;
  font-weight: 900;
  color: #fff;
  background: var(--type-color);
  border-radius: 999px;
  padding: 6px 18px;
}
.result-products-lead { font-size: 13px; margin-bottom: 12px; }

.product-list { display: flex; flex-direction: column; gap: 10px; }
.product-item {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  background: #fff7f0;
  border: 2px solid #f3e4d8;
  border-radius: 14px;
  padding: 14px 16px;
  transition: border-color 0.15s, background 0.15s;
}
.product-item:hover { border-color: var(--accent); background: #fff0f4; }
.product-rank {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.product-name { font-size: 13px; font-weight: 700; flex: 1; }
.product-price { font-size: 13px; font-weight: 900; color: var(--accent-deep); flex-shrink: 0; }
.product-arrow { font-size: 18px; font-weight: 900; color: var(--ink-soft); flex-shrink: 0; }

.coupon-remind {
  font-size: 12px;
  color: var(--ink-soft);
  text-align: center;
  margin-top: 12px;
}

.compat-row { display: flex; gap: 12px; }
.mini-type {
  flex: 1;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  background: #fff7f0;
  border: 2px solid #f3e4d8;
  border-radius: 16px;
  padding: 14px 10px;
  transition: border-color 0.15s;
}
.mini-type:hover { border-color: var(--accent); }
.mini-label { display: block; font-size: 12px; font-weight: 900; margin-bottom: 8px; }
.mini-type.love .mini-label { color: var(--accent-deep); }
.mini-type.clash .mini-label { color: #8d6fc0; }
.mini-type img {
  width: 72px; height: 72px;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
}
.mini-code {
  display: block;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.15em;
  color: var(--ink-soft);
  margin-top: 6px;
}
.mini-name { display: block; font-size: 12px; font-weight: 700; }

.result-share { text-align: center; padding: 8px 0 16px; }
.share-lead { font-size: 14px; font-weight: 700; margin-bottom: 14px; }
.share-btns { display: flex; gap: 10px; justify-content: center; margin-bottom: 20px; }
.btn-share {
  font-size: 14px;
  font-weight: 900;
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  padding: 12px 24px;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease;
}
.btn-share:hover { transform: translateY(-2px); }
.btn-x { background: #1a1a1a; }
.btn-line-share { background: var(--line-green); }

.result-invalid { text-align: center; padding: 64px 0; }
.result-invalid .invalid-emoji { font-size: 56px; }
.result-invalid h1 { font-size: 22px; font-weight: 900; margin: 12px 0; }
.result-invalid p { font-size: 14px; color: var(--ink-soft); margin-bottom: 24px; }
.result-invalid .btn-primary { display: inline-block; text-decoration: none; }
