/* ===========================
   香り診断 - スタイルシート
   =========================== */

:root {
  --green-dark:   #2d6a4f;
  --green-mid:    #40916c;
  --green-light:  #74c69d;
  --green-pale:   #d8f3dc;
  --cream:        #f9f5ef;
  --text-dark:    #1b1b1b;
  --text-mid:     #4a4a4a;
  --text-light:   #888;
  --white:        #ffffff;
  --shadow:       0 4px 20px rgba(0,0,0,0.08);
  --radius:       16px;
  --radius-sm:    10px;
}

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

body {
  font-family: 'Helvetica Neue', 'Hiragino Sans', 'Meiryo', sans-serif;
  background: var(--cream);
  color: var(--text-dark);
  line-height: 1.7;
  min-height: 100vh;
}

/* ===== HEADER ===== */
.site-header {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-mid) 100%);
  color: var(--white);
  padding: 32px 20px 28px;
  text-align: center;
}
.logo {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 6px;
}
.tagline {
  font-size: 0.9rem;
  opacity: 0.85;
  letter-spacing: 0.03em;
}

/* ===== MAIN ===== */
.main {
  max-width: 680px;
  margin: 0 auto;
  padding: 32px 16px 60px;
}

/* ===== STEP INDICATOR ===== */
.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 36px;
}
.step-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.step-dot span {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ddd;
  color: var(--text-light);
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}
.step-dot small {
  font-size: 0.7rem;
  color: var(--text-light);
  transition: color 0.3s;
}
.step-dot.active span {
  background: var(--green-mid);
  color: var(--white);
}
.step-dot.active small {
  color: var(--green-mid);
  font-weight: 600;
}
.step-dot.done span {
  background: var(--green-dark);
  color: var(--white);
}
.step-line {
  width: 40px;
  height: 2px;
  background: #ddd;
  margin-bottom: 18px;
  transition: background 0.3s;
}
.step-line.done { background: var(--green-dark); }

@media (max-width: 400px) {
  .step-line { width: 20px; }
}

/* ===== STEP SECTION ===== */
.step-section { display: none; }
.step-section.active { display: block; animation: fadeIn 0.35s ease; }

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

.step-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 8px;
  text-align: center;
}
.step-desc {
  font-size: 0.88rem;
  color: var(--text-mid);
  text-align: center;
  margin-bottom: 24px;
}

/* ===== CHOICE CARDS ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

@media (max-width: 400px) {
  .card-grid { grid-template-columns: 1fr; }
}

.choice-card {
  background: var(--white);
  border: 2px solid transparent;
  border-radius: var(--radius);
  padding: 20px 14px;
  cursor: pointer;
  text-align: center;
  box-shadow: var(--shadow);
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.choice-card:hover {
  border-color: var(--green-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.choice-card.selected {
  border-color: var(--green-mid);
  background: var(--green-pale);
}
.card-icon  { font-size: 1.8rem; line-height: 1; }
.card-label { font-size: 0.95rem; font-weight: 700; color: var(--text-dark); }
.card-sub   { font-size: 0.75rem; color: var(--text-light); }

/* ===== BACK BUTTON ===== */
.back-btn {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 6px 0;
  display: block;
  text-align: center;
  width: 100%;
  transition: color 0.2s;
}
.back-btn:hover { color: var(--green-mid); }

/* ===== RESULT ===== */
.result-title { margin-bottom: 16px; }

.result-summary {
  background: var(--green-pale);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.85rem;
  color: var(--green-dark);
  margin-bottom: 24px;
  text-align: center;
  line-height: 1.9;
}
.result-summary strong { font-weight: 700; }

.result-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.result-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: fadeIn 0.4s ease both;
}
.result-card:nth-child(2) { animation-delay: 0.1s; }
.result-card:nth-child(3) { animation-delay: 0.2s; }

.result-card-header {
  background: linear-gradient(90deg, var(--green-dark), var(--green-mid));
  color: var(--white);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.rank-badge {
  background: rgba(255,255,255,0.25);
  border-radius: 50%;
  width: 32px; height: 32px;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.result-name-jp { font-size: 1.1rem; font-weight: 700; }
.result-name-en { font-size: 0.8rem; opacity: 0.8; }

.result-card-body { padding: 16px 18px; }

.result-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 12px;
}
.tag {
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 600;
}
.tag-system  { background: #e8f4f8; color: #2a7a9b; }
.tag-beginner-ok  { background: var(--green-pale); color: var(--green-dark); }
.tag-beginner-mid { background: #fff3cd; color: #856404; }
.tag-beginner-ng  { background: #fde8e8; color: #b91c1c; }
.tag-strength-weak   { background: #f0f4ff; color: #4c5fa1; }
.tag-strength-mid    { background: #ede9fe; color: #5b21b6; }
.tag-strength-strong { background: #fce7f3; color: #9d174d; }

.result-row {
  margin-bottom: 10px;
  font-size: 0.88rem;
}
.result-row-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--green-dark);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.result-row-value { color: var(--text-mid); }

.result-row-reason {
  background: var(--cream);
  border-left: 3px solid var(--green-light);
  padding: 8px 12px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.85rem;
  color: var(--text-dark);
  font-style: italic;
}

.caution-box {
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.78rem;
  color: #7a5a00;
  margin-top: 10px;
}
.caution-box::before { content: "⚠️ "; }

/* ===== RETRY BUTTON ===== */
.retry-btn {
  display: block;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  background: var(--green-mid);
  color: var(--white);
  border: none;
  border-radius: 40px;
  padding: 16px 24px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s, transform 0.2s;
  box-shadow: 0 4px 16px rgba(64,145,108,0.3);
}
.retry-btn:hover {
  background: var(--green-dark);
  transform: translateY(-2px);
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--green-dark);
  color: rgba(255,255,255,0.7);
  text-align: center;
  padding: 24px 16px;
  font-size: 0.75rem;
  line-height: 1.8;
}
.footer-link a {
  color: var(--green-light);
  text-decoration: none;
}
.footer-link { margin-top: 10px; }

/* ===== NO RESULT ===== */
.no-result {
  text-align: center;
  color: var(--text-mid);
  padding: 32px;
  font-size: 0.9rem;
}
