/* 体質タイプ診断 — KARADA STORY 暖色系デザイン */

:root {
  --bg: #f6b23f;
  --card: #ffffff;
  --soft: #fff8e6;
  --text: #3f3326;
  --muted: #6c5d4e;
  --line: rgba(40, 25, 10, .12);
  --accent: #e36414;
  --accent-dark: #bb4f0d;
  --vata: #5071AA;
  --pitta: #B53F2F;
  --kapha: #899934;
}

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

body {
  margin: 0;
  font-family: "M PLUS Rounded 1c", "Noto Sans JP", system-ui, sans-serif;
  font-size: 18px;
  color: var(--text);
  background: linear-gradient(180deg, #f7c55f 0%, var(--bg) 55%, #efaa36 100%);
  min-height: 100vh;
}

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 20px;
}

/* --- 画面切り替え --- */
.screen {
  display: none;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
}

.screen.active {
  display: flex;
}

/* --- ブランド --- */
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 32px;
}

.brand__logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #3f3326;
  color: #f7c55f;
  font-weight: 800;
  font-size: 18px;
}

.brand__name {
  font-weight: 800;
  letter-spacing: .02em;
  font-size: 20px;
}

/* --- スタート画面 --- */
#screen-start h1 {
  font-size: 32px;
  line-height: 1.3;
  margin: 0 0 16px;
}

#screen-start .lead {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
  margin: 0 0 12px;
}

.meta {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 28px;
}

/* --- ボタン --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 100px;
  font-weight: 800;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 6px 12px rgba(227, 100, 20, .28);
  transition: background .2s, transform .15s;
  font-family: inherit;
  width: 100%;
}

.btn:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--ghost {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
  box-shadow: none;
  margin-top: 12px;
}

.btn--ghost:hover {
  background: rgba(227, 100, 20, .08);
}

/* --- プログレスバー --- */
.progress {
  margin-bottom: 32px;
}

.progress__bar {
  height: 8px;
  background: rgba(255, 255, 255, .4);
  border-radius: 4px;
  overflow: hidden;
}

.progress__fill {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  transition: width .4s ease;
  width: 0;
}

.progress__text {
  text-align: center;
  font-size: 14px;
  color: var(--muted);
  margin-top: 8px;
  font-weight: 700;
}

/* --- 問診 --- */
#question-area {
  animation: fadeIn .3s ease;
}

#question-text {
  font-size: 22px;
  line-height: 1.5;
  margin: 0 0 24px;
  font-weight: 700;
}

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

.option-btn {
  display: block;
  width: 100%;
  padding: 18px 20px;
  background: var(--card);
  border: 2px solid var(--text);
  border-radius: 18px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  line-height: 1.5;
  transition: background .15s, border-color .15s, transform .15s;
  font-family: inherit;
  box-shadow: 3px 3px 0 rgba(63, 51, 38, .1);
}

.option-btn:hover {
  background: var(--soft);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 4px 4px 0 rgba(63, 51, 38, .15);
}

.option-btn.selected {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* --- 結果画面 --- */
#screen-result h2 {
  text-align: center;
  font-size: 20px;
  margin: 0 0 8px;
  color: var(--muted);
}

.result-type {
  text-align: center;
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 24px;
}

.chart-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

#radar-chart {
  width: 280px;
  height: auto;
}

.result-scores {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 24px;
}

.score-item {
  text-align: center;
}

.score-label {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
}

.score-value {
  font-size: 28px;
  font-weight: 800;
}

.result-description {
  background: var(--card);
  border: 2px solid var(--text);
  border-radius: 20px;
  padding: 24px 20px;
  margin-bottom: 32px;
  line-height: 1.8;
  box-shadow: 4px 4px 0 rgba(63, 51, 38, .1);
}

.result-description h3 {
  margin: 0 0 12px;
  font-size: 18px;
}

.result-description p {
  margin: 0 0 8px;
  font-size: 15px;
  color: var(--text);
}

.result-description ul {
  margin: 8px 0 0;
  padding-left: 20px;
  font-size: 15px;
}

.result-description li {
  margin-bottom: 4px;
}

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

.result-cta .lead {
  font-size: 16px;
  line-height: 1.8;
  margin: 0 0 20px;
  font-weight: 700;
}

/* --- フォーム --- */
#screen-contact h2 {
  font-size: 26px;
  margin: 0 0 8px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 6px;
}

.required {
  color: var(--accent);
  font-size: 12px;
}

.optional {
  color: var(--muted);
  font-size: 12px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--line);
  border-radius: 14px;
  font-size: 16px;
  font-family: inherit;
  background: var(--card);
  color: var(--text);
  transition: border-color .2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.note {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  margin-top: 12px;
}

/* --- 完了画面 --- */
.done-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 36px;
  font-weight: 800;
  margin: 0 auto 24px;
}

#screen-done h2 {
  text-align: center;
  font-size: 28px;
  margin: 0 0 12px;
}

#screen-done .lead {
  text-align: center;
  margin: 0 0 8px;
}

#screen-done p {
  text-align: center;
  color: var(--muted);
  font-size: 15px;
}

/* --- アニメーション --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

.fade-in { animation: fadeIn .3s ease; }
.slide-in { animation: slideIn .3s ease; }

/* --- レスポンシブ --- */
@media (max-width: 480px) {
  body { font-size: 16px; }
  #screen-start h1 { font-size: 26px; }
  #question-text { font-size: 19px; }
  .result-type { font-size: 28px; }
  .btn { font-size: 16px; padding: 14px 24px; }
}
