/* ===== Base ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
}

body {
  font-family: 'Zen Maru Gothic', 'Hiragino Sans', 'Yu Gothic', sans-serif;
  background: linear-gradient(180deg, #FFF5F8 0%, #FFE4ED 50%, #FFD6E5 100%);
  color: #4A2632;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background-attachment: fixed;
}

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 28px 22px 80px;
  position: relative;
  z-index: 1;
}

/* ===== Sparkles (キラキラ背景) ===== */
.sparkles {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 0;
}

.sparkles span {
  position: absolute;
  width: 8px;
  height: 8px;
  background: radial-gradient(circle, #fff 0%, #FFB3D1 40%, transparent 70%);
  border-radius: 50%;
  animation: twinkle 3s ease-in-out infinite;
  opacity: 0;
  filter: drop-shadow(0 0 4px #FFB3D1);
}

.sparkles span.large {
  width: 14px;
  height: 14px;
}

.sparkles span.small {
  width: 4px;
  height: 4px;
}

@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(0.3) rotate(0deg); }
  50% { opacity: 1; transform: scale(1) rotate(180deg); }
}

/* ===== Screen ===== */
.screen {
  display: none;
  animation: fadeUp 0.5s ease;
}

.screen.active {
  display: block;
}

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

/* ===== Cover (start screen) ===== */
.cover-button {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 16px 38px rgba(194, 24, 91, 0.22);
  transition: transform 0.2s, box-shadow 0.2s;
  animation: float 4s ease-in-out infinite;
}

.cover-button:active {
  transform: scale(0.98);
  box-shadow: 0 8px 22px rgba(194, 24, 91, 0.22);
}

.cover-img {
  width: 100%;
  height: auto;
  display: block;
}

/* ===== Hero Grid (8 hime) ===== */
.hero-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 8px 0 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 24px;
  border: 2px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 12px 28px rgba(233, 30, 99, 0.12);
}

.hero-card {
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, #FFE4ED, #FFD1E0);
  border: 2px solid #fff;
  box-shadow: 0 4px 10px rgba(233, 30, 99, 0.18);
  animation: floatGrid 4s ease-in-out infinite;
  transition: transform 0.3s;
}

.hero-card:nth-child(1) { animation-delay: 0s; }
.hero-card:nth-child(2) { animation-delay: 0.3s; }
.hero-card:nth-child(3) { animation-delay: 0.6s; }
.hero-card:nth-child(4) { animation-delay: 0.9s; }
.hero-card:nth-child(5) { animation-delay: 0.15s; }
.hero-card:nth-child(6) { animation-delay: 0.45s; }
.hero-card:nth-child(7) { animation-delay: 0.75s; }
.hero-card:nth-child(8) { animation-delay: 1.05s; }

.hero-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@keyframes floatGrid {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-4px) rotate(0.5deg); }
}

.hero-tease {
  text-align: center;
  font-size: 14px;
  color: #C2185B;
  font-weight: 700;
  letter-spacing: 0.15em;
  margin: 18px 0 28px;
  line-height: 1.7;
}

/* ===== Result Image ===== */
.hero-img,
.result-img {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #FFD1E0 0%, #FFB3D1 60%, #FF8FB7 100%);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 4px solid #fff;
  box-shadow: 0 12px 32px rgba(233, 30, 99, 0.18);
  position: relative;
  overflow: hidden;
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.placeholder-text {
  color: #fff;
  font-weight: 700;
  font-size: 20px;
  text-align: center;
  text-shadow: 0 2px 6px rgba(194, 24, 91, 0.3);
  letter-spacing: 0.05em;
}

.hero-img.has-image .placeholder-text,
.result-img.has-image .placeholder-text {
  display: none;
}

/* ===== Start Screen ===== */
.main-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 34px;
  font-weight: 900;
  text-align: center;
  color: #C2185B;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
  text-shadow: 0 2px 6px rgba(255, 255, 255, 0.6);
}

.subtitle {
  text-align: center;
  font-size: 14px;
  color: #E91E63;
  margin-bottom: 32px;
  letter-spacing: 0.15em;
  font-weight: 500;
}

.lead {
  text-align: center;
  font-size: 15px;
  line-height: 2;
  margin-bottom: 36px;
  color: #5C3340;
}

.btn-primary {
  display: block;
  width: 100%;
  padding: 20px 24px;
  background: linear-gradient(135deg, #EC407A 0%, #C2185B 100%);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: 18px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(194, 24, 91, 0.35);
  transition: transform 0.15s, box-shadow 0.15s;
  letter-spacing: 0.12em;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -100%;
  width: 60%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transform: rotate(20deg);
  animation: shine 3s ease-in-out infinite;
}

@keyframes shine {
  0% { left: -100%; }
  60%, 100% { left: 200%; }
}

.btn-primary:active {
  transform: scale(0.97);
  box-shadow: 0 4px 12px rgba(194, 24, 91, 0.35);
}

.meta {
  text-align: center;
  font-size: 12px;
  color: #B07A89;
  margin-top: 18px;
}

/* ===== Question ===== */
.btn-back {
  background: rgba(255, 255, 255, 0.7);
  border: 1.5px solid #FBC4D0;
  color: #C2185B;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 16px;
  margin-bottom: 16px;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.05em;
  border-radius: 50px;
  transition: all 0.15s;
}

.btn-back:active {
  transform: scale(0.95);
  background: #FCE4EC;
}

.btn-back.hidden {
  visibility: hidden;
}

.progress {
  margin-bottom: 32px;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #FCE4EC;
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #F48FB1 0%, #EC407A 50%, #C2185B 100%);
  border-radius: 4px;
  width: 14%;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-text {
  text-align: right;
  font-size: 13px;
  color: #C2185B;
  margin-top: 8px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.question-text {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.6;
  margin-bottom: 8px;
  color: #4A2632;
}

.question-hint {
  font-size: 13px;
  color: #C2185B;
  margin-bottom: 24px;
  font-weight: 500;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.option {
  display: block;
  width: 100%;
  padding: 16px 20px;
  background: #fff;
  border: 2px solid #FBC4D0;
  border-radius: 16px;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  color: #4A2632;
  line-height: 1.5;
  position: relative;
}

.option:active {
  transform: scale(0.98);
}

.option.selected {
  background: linear-gradient(135deg, #FCE4EC 0%, #F8BBD0 100%);
  border-color: #EC407A;
  color: #C2185B;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(233, 30, 99, 0.18);
  transform: translateY(-2px);
}

.option.selected::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  background: #C2185B;
  border-radius: 50%;
  background-image: linear-gradient(135deg, transparent 50%, transparent 50%);
}

.option.selected::before {
  content: '';
  position: absolute;
  right: 22px;
  top: 50%;
  width: 6px;
  height: 11px;
  border-right: 2.5px solid #fff;
  border-bottom: 2.5px solid #fff;
  transform: translateY(-65%) rotate(45deg);
  z-index: 2;
}

.btn-next {
  margin-top: 16px;
}

/* ===== Loading ===== */
.screen-loading {
  text-align: center;
  padding: 100px 0;
}

.loading-stars {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 36px;
}

.loading-stars .star {
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #F48FB1, #C2185B);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  animation: starPulse 1.2s ease-in-out infinite;
}

.loading-stars .star:nth-child(2) { animation-delay: 0.2s; }
.loading-stars .star:nth-child(3) { animation-delay: 0.4s; }

@keyframes starPulse {
  0%, 100% { transform: scale(0.4) rotate(-15deg); opacity: 0.4; }
  50% { transform: scale(1.2) rotate(15deg); opacity: 1; }
}

.loading-text {
  font-size: 18px;
  font-weight: 700;
  color: #C2185B;
  line-height: 2;
  letter-spacing: 0.1em;
}

/* ===== Result ===== */
.result-eyebrow {
  text-align: center;
  font-size: 14px;
  color: #C2185B;
  margin-bottom: 14px;
  letter-spacing: 0.3em;
  font-weight: 500;
}

.result-illustration {
  margin: 0 auto 28px;
  width: 100%;
  max-width: 380px;
  aspect-ratio: 1 / 1;
}

.result-name {
  font-family: 'Noto Serif JP', serif;
  text-align: center;
  font-size: 32px;
  font-weight: 900;
  color: #C2185B;
  margin-bottom: 10px;
  letter-spacing: 0.08em;
}

.result-catch {
  text-align: center;
  font-size: 14px;
  color: #E91E63;
  margin-bottom: 32px;
  letter-spacing: 0.08em;
  font-weight: 500;
}

.gauge-wrap {
  background: #fff;
  border-radius: 24px;
  padding: 28px 24px;
  margin-bottom: 28px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(233, 30, 99, 0.1);
  border: 2px solid #FCE4EC;
}

.gauge-label {
  font-size: 13px;
  color: #C2185B;
  margin-bottom: 14px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.gauge {
  width: 100%;
  height: 16px;
  background: #FCE4EC;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 18px;
}

.gauge-fill {
  height: 100%;
  background: linear-gradient(90deg, #F8BBD0 0%, #EC407A 50%, #C2185B 100%);
  border-radius: 8px;
  width: 0%;
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.gauge-fill::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
  background: #fff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.8);
}

.gauge-value {
  font-family: 'Noto Serif JP', serif;
  font-size: 40px;
  font-weight: 900;
  color: #C2185B;
}

.result-block {
  background: #fff;
  border-radius: 20px;
  padding: 26px 22px;
  margin-bottom: 16px;
  box-shadow: 0 6px 18px rgba(233, 30, 99, 0.08);
  border: 1px solid #FCE4EC;
}

.result-block.warn {
  background: linear-gradient(135deg, #FFF8E1 0%, #FFECB3 100%);
  border-left: 5px solid #F06292;
}

.result-block.hope {
  background: linear-gradient(135deg, #FFF5F8 0%, #FCE4EC 100%);
  border-left: 5px solid #C2185B;
}

.block-title {
  font-size: 16px;
  font-weight: 700;
  color: #C2185B;
  margin-bottom: 14px;
  border-bottom: 2px dotted #FBC4D0;
  padding-bottom: 10px;
  letter-spacing: 0.05em;
}

.block-body {
  font-size: 15px;
  line-height: 2;
  color: #4A2632;
}

.reason-list {
  padding-left: 22px;
  font-size: 15px;
  line-height: 2;
}

.reason-list li {
  margin-bottom: 12px;
  color: #4A2632;
  padding-left: 4px;
}

.reason-list li::marker {
  color: #C2185B;
  font-weight: 700;
}

/* ===== CTA (inline・キラーん) ===== */
.cta-inline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 16px 18px;
  margin: -8px 0 28px;
  background: linear-gradient(135deg, #F06292 0%, #EC407A 50%, #C2185B 100%);
  color: #fff;
  text-decoration: none;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 0 8px 22px rgba(194, 24, 91, 0.35);
  position: relative;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s;
  animation: ctaPulse 2.4s ease-in-out infinite;
}

.cta-inline::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -120%;
  width: 60%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
  transform: rotate(20deg);
  animation: ctaShine 2.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes ctaShine {
  0% { left: -120%; }
  50%, 100% { left: 180%; }
}

@keyframes ctaPulse {
  0%, 100% { box-shadow: 0 8px 22px rgba(194, 24, 91, 0.35), 0 0 0 0 rgba(236, 64, 122, 0.4); }
  50% { box-shadow: 0 8px 22px rgba(194, 24, 91, 0.45), 0 0 0 10px rgba(236, 64, 122, 0); }
}

.cta-inline:hover {
  transform: scale(1.06);
  box-shadow: 0 14px 32px rgba(194, 24, 91, 0.5);
}

.cta-inline:active {
  transform: scale(0.97);
}

.cta-inline-text {
  position: relative;
  z-index: 2;
  text-shadow: 0 1px 2px rgba(194, 24, 91, 0.3);
}

.cta-inline-arrow {
  position: relative;
  z-index: 2;
  font-size: 12px;
  animation: arrowBounce 1.4s ease-in-out infinite;
}

@keyframes arrowBounce {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(4px); }
}

/* キラーん（星) */
.kira {
  position: absolute;
  width: 14px;
  height: 14px;
  background:
    linear-gradient(90deg, transparent 46%, #fff 48%, #fff 52%, transparent 54%),
    linear-gradient(0deg, transparent 46%, #fff 48%, #fff 52%, transparent 54%);
  background-size: 100% 100%;
  filter: drop-shadow(0 0 6px #fff) drop-shadow(0 0 12px #FFE0EC);
  pointer-events: none;
  opacity: 0;
  z-index: 3;
}

.kira::before,
.kira::after {
  content: '';
  position: absolute;
  inset: 0;
  background: inherit;
}

.kira::before { transform: rotate(45deg); }

.kira-1 {
  top: 22%;
  left: 12%;
  animation: kiraTwinkle 2.8s ease-in-out infinite;
}

.kira-2 {
  top: 55%;
  right: 18%;
  width: 10px;
  height: 10px;
  animation: kiraTwinkle 2.8s ease-in-out infinite 0.9s;
}

.kira-3 {
  bottom: 20%;
  left: 38%;
  width: 8px;
  height: 8px;
  animation: kiraTwinkle 2.8s ease-in-out infinite 1.7s;
}

@keyframes kiraTwinkle {
  0%, 70%, 100% { opacity: 0; transform: scale(0.3) rotate(0deg); }
  10%, 30% { opacity: 1; transform: scale(1.2) rotate(180deg); }
  20% { opacity: 1; transform: scale(1.5) rotate(90deg); }
}

/* ===== PDF Download ===== */
.pdf-download {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 18px 22px;
  margin: 20px 0 14px;
  background: #fff;
  border: 2px solid #FBC4D0;
  border-radius: 18px;
  text-decoration: none;
  color: #4A2632;
  box-shadow: 0 6px 18px rgba(233, 30, 99, 0.1);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.pdf-download:hover {
  transform: translateY(-2px);
  border-color: #EC407A;
  box-shadow: 0 10px 24px rgba(233, 30, 99, 0.18);
}

.pdf-download:active {
  transform: scale(0.98);
}

.pdf-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #EC407A 0%, #C2185B 100%);
  color: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 10px rgba(194, 24, 91, 0.3);
}

.pdf-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pdf-title {
  font-size: 14px;
  font-weight: 700;
  color: #C2185B;
  line-height: 1.4;
}

.pdf-sub {
  font-size: 11px;
  color: #8B6B75;
  line-height: 1.4;
}

.pdf-arrow {
  flex-shrink: 0;
  font-size: 18px;
  color: #C2185B;
  font-weight: 700;
}

/* ===== CTA (image banner) ===== */
.cta-banner {
  display: block;
  width: 100%;
  margin: 32px 0 24px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(194, 24, 91, 0.22);
  transition: transform 0.2s, box-shadow 0.2s;
  animation: float 4s ease-in-out infinite;
}

.cta-banner:active {
  transform: scale(0.98);
  box-shadow: 0 6px 16px rgba(194, 24, 91, 0.22);
}

.cta-banner-img {
  display: block;
  width: 100%;
  height: auto;
}

/* ===== CTA (legacy/unused) ===== */
.cta-block {
  background: linear-gradient(135deg, #C2185B 0%, #EC407A 60%, #F06292 100%);
  color: #fff;
  border-radius: 28px;
  padding: 36px 26px;
  margin: 32px 0 24px;
  text-align: center;
  box-shadow: 0 12px 32px rgba(194, 24, 91, 0.3);
  position: relative;
  overflow: hidden;
}

.cta-block::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
  border-radius: 50%;
}

.cta-block::after {
  content: '';
  position: absolute;
  bottom: -40px;
  left: -40px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
  border-radius: 50%;
}

.cta-eyebrow {
  font-size: 12px;
  letter-spacing: 0.25em;
  margin-bottom: 14px;
  opacity: 0.95;
  font-weight: 500;
  position: relative;
  z-index: 1;
}

.cta-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.7;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
  letter-spacing: 0.02em;
}

.cta-desc {
  font-size: 14px;
  line-height: 2;
  margin-bottom: 26px;
  opacity: 0.97;
  position: relative;
  z-index: 1;
}

.btn-line {
  display: block;
  width: 100%;
  padding: 20px 24px;
  background: #06C755;
  color: #fff;
  text-decoration: none;
  border-radius: 50px;
  font-size: 17px;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(6, 199, 85, 0.45);
  transition: transform 0.15s;
  position: relative;
  z-index: 1;
  letter-spacing: 0.12em;
}

.btn-line:active {
  transform: scale(0.97);
}

.cta-meta {
  font-size: 11px;
  margin-top: 16px;
  opacity: 0.9;
  line-height: 1.8;
  position: relative;
  z-index: 1;
}

.btn-secondary,
.btn-share {
  display: block;
  width: 100%;
  padding: 14px 24px;
  background: transparent;
  color: #C2185B;
  border: 2px solid #C2185B;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  margin-top: 14px;
  transition: all 0.15s;
  letter-spacing: 0.1em;
}

.btn-share {
  background: #fff;
}

.btn-secondary:active,
.btn-share:active {
  transform: scale(0.98);
}

/* ===== Mobile optimization ===== */
@media (min-width: 481px) {
  .container {
    border-left: 1px solid #FCE4EC;
    border-right: 1px solid #FCE4EC;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
}
