/* やさしいベージュ系。差し色はテラコッタ（赤茶色）とくすみピンク */
:root {
  --bg: #F6EFE6;
  --card: #FFFDF9;
  --line-soft: #E6D9C8;
  --text: #4A3A2E;
  --text-sub: #8A7565;
  --accent: #C46A4E;
  --accent-dark: #A9553B;
  --pink: #D9A5A0;
  --pink-soft: #F3DEDA;
  --line-green: #06C755;
  --family-a: #7E9CB0;  /* 見えてない系 */
  --family-b: #B58A5A;  /* 動かない系 */
  --family-c: #A8879E;  /* ズレてる系 */
  --radius: 18px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", sans-serif;
  font-size: 16px;
  line-height: 1.8;
}

.wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 32px 16px 24px;
  text-align: center;
}

p { margin: 0 0 .6em; }

/* 画面の切りかえ */
.screen { display: none; }
.screen.is-active { display: block; animation: fade-in .3s ease; }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.kicker {
  color: var(--accent);
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 4px;
}

.title {
  font-size: 40px;
  font-weight: 900;
  line-height: 1.25;
  margin: 0 0 16px;
  letter-spacing: .04em;
}

.chara {
  display: block;
  width: 220px;
  height: 220px;
  margin: 0 auto 20px;
  border-radius: 28px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 20px 18px;
  margin: 0 0 20px;
  text-align: left;
}

.lead p:last-child, .body p:last-child { margin-bottom: 0; }

strong { color: var(--accent-dark); }

.meta {
  color: var(--text-sub);
  font-size: 13px;
  margin-top: 10px;
}

/* ボタン */
.btn {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 16px 20px;
  font: inherit;
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
  cursor: pointer;
  transition: transform .1s ease, background .2s ease;
}
.btn:active { transform: scale(.98); }

.btn-main {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 0 var(--accent-dark);
}
.btn-main:hover { background: var(--accent-dark); }

.btn-line {
  background: var(--line-green);
  color: #fff;
  box-shadow: 0 4px 0 #04A346;
  margin-top: 16px;
  text-align: center;
}

.btn-share {
  background: var(--card);
  color: var(--text);
  border: 2px solid var(--text);
  font-size: 16px;
  margin-bottom: 12px;
}

.btn-back {
  display: inline-block;
  margin-top: 20px;
  background: none;
  border: 0;
  color: var(--text-sub);
  font: inherit;
  font-size: 14px;
  text-decoration: underline;
  cursor: pointer;
}
.btn-back[hidden] { visibility: hidden; display: inline-block; }

/* 設問 */
.progress {
  height: 8px;
  background: var(--line-soft);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 16px;
}
.progress-bar {
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width .3s ease;
}

.q-count {
  color: var(--accent);
  font-weight: 900;
  font-size: 15px;
  margin-bottom: 4px;
}

.q-text {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.6;
  margin: 0 0 20px;
}

.options { display: grid; gap: 12px; }
.options-grid { grid-template-columns: 1fr 1fr; gap: 10px; }

.option {
  display: block;
  width: 100%;
  background: var(--card);
  color: var(--text);
  border: 2px solid var(--line-soft);
  border-radius: 14px;
  padding: 14px 16px;
  font: inherit;
  font-size: 15px;
  line-height: 1.6;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.option:hover { border-color: var(--pink); }
.option.is-selected { border-color: var(--accent); background: var(--pink-soft); }
.options-grid .option { text-align: center; padding: 14px 8px; font-size: 14px; }

/* 分析中 */
#analyzing { padding-top: 60px; }
.chara-bounce { width: 200px; height: 200px; animation: bounce .8s ease-in-out infinite alternate; }
@keyframes bounce { from { transform: translateY(0); } to { transform: translateY(-12px); } }
.analyzing-text { font-size: 20px; font-weight: 700; }
.dots span { animation: blink 1.2s infinite; }
.dots span:nth-child(2) { animation-delay: .2s; }
.dots span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }

/* 結果 */
.type-img {
  display: block;
  width: 260px;
  height: 260px;
  margin: 8px auto 16px;
  border-radius: 28px;
  box-shadow: 0 6px 18px rgba(74, 58, 46, .12);
  animation: pop .5s cubic-bezier(.3, 1.6, .5, 1);
}
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }

.family-badge {
  display: inline-block;
  padding: 2px 14px;
  border-radius: 999px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}
.family-A .family-badge { background: var(--family-a); }
.family-B .family-badge { background: var(--family-b); }
.family-C .family-badge { background: var(--family-c); }

.type-name {
  font-size: 34px;
  font-weight: 900;
  line-height: 1.3;
  margin: 0 0 8px;
}

.catch {
  font-weight: 700;
  font-size: 17px;
  margin-bottom: 20px;
}
.catch strong { color: inherit; }

.stars {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--line-soft);
}
.stars-label { font-size: 13px; color: var(--text-sub); }
.stars-value { color: var(--accent); font-size: 20px; letter-spacing: .1em; }
.stars-note { font-size: 13px; color: var(--text-sub); }

.cta {
  background: var(--pink-soft);
  border-color: var(--pink);
  text-align: center;
}

.footer {
  text-align: center;
  color: var(--text-sub);
  font-size: 12px;
  padding: 16px 16px 32px;
}
.footer p { margin: 0; }
