/* ============================================================
   멍BTI 스타일 — 파스텔 픽셀 동화 느낌
   색만 바꾸고 싶으면 아래 :root 변수만 고치세요.
   ============================================================ */
:root {
  --cream:      #FDF6E9;
  --cream-deep: #F7EBD4;
  --brown:      #4F2C13;
  --brown-soft: #8A6A4B;

  --pink:   #FBD5DA;  --pink-line:   #F0A2AE;
  --blue:   #CDE7F7;  --blue-line:   #7FC0E8;
  --yellow: #FBE3A8;  --yellow-line: #EFC469;
  --purple: #E4D6F2;  --purple-line: #B79FD6;
  --green:  #D6EBB4;  --green-line:  #A9CF7A;

  --cta-1: #FCE7AE;
  --cta-2: #F6CE7B;
  --cta-line: #C99A4B;

  --radius: 22px;
  --shadow: 0 4px 0 rgba(79,44,19,.15);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

html, body {
  margin: 0; padding: 0;
  background: var(--cream);
  color: var(--brown);
  font-family: 'Jua', 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* 위/아래 장식 이미지 */
.deco { position: fixed; left: 0; width: 100%; z-index: 0; pointer-events: none; user-select: none; }
.deco-top { top: 0; }
.deco-bottom { bottom: 0; }
@media (max-height: 700px) { .deco-bottom { display: none; } }

.app {
  position: relative; z-index: 1;
  max-width: 440px; margin: 0 auto;
  padding: 74px 20px 150px;
  min-height: 100vh;
}

/* ---------- 진행 바 ---------- */
.progress-wrap { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.progress { flex: 1; height: 12px; background: #fff; border: 3px solid var(--brown); border-radius: 20px; overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--blue-line), var(--green-line)); transition: width .35s ease; }
.progress-text { font-size: 13px; color: var(--brown-soft); }

/* ---------- 화면 전환 ---------- */
.screen { display: none; animation: pop .3s ease; }
.screen.active { display: block; }
@keyframes pop { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- 인트로 ---------- */
.hero-title-img { display: block; width: 100%; max-width: 400px; margin: 0 auto; mix-blend-mode: multiply; }

.speech {
  position: relative;
  margin: 6px auto 26px; max-width: 300px;
  background: #fff; border: 3px dashed var(--yellow-line);
  border-radius: 24px; padding: 12px 16px;
  text-align: center; font-size: 15px; color: var(--brown);
}
.speech::after {
  content: ''; position: absolute; left: 50%; bottom: -13px; transform: translateX(-50%);
  border: 8px solid transparent; border-top-color: var(--yellow-line);
}

.stage-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; align-items: end; margin-bottom: 6px; }
.stage { margin: 0; text-align: center; }
.stage img { width: 100%; height: auto; image-rendering: -webkit-optimize-contrast; }
.stage figcaption { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 6px; }

.chip {
  display: inline-block; font-size: 11px; line-height: 1.4;
  padding: 3px 8px; border-radius: 20px; border: 2px solid;
  white-space: nowrap;
}
.chip-blue   { background: var(--blue);   border-color: var(--blue-line); }
.chip-pink   { background: var(--pink);   border-color: var(--pink-line); }
.chip-yellow { background: var(--yellow); border-color: var(--yellow-line); }
.chip-purple { background: var(--purple); border-color: var(--purple-line); }

.stage-note { font-style: normal; font-size: 10px; }
.note-blue { color: #5C9FCB; } .note-pink { color: #DE7C8D; }
.note-yellow { color: #C99A4B; } .note-purple { color: #9179B8; }

/* ---------- 버튼 ---------- */
.btn {
  font-family: inherit; cursor: pointer; border: none;
  border-radius: 40px; font-size: 17px; padding: 14px 22px;
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:active { transform: translateY(3px); }

.btn-cta {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; margin: 22px auto 0;
  background: linear-gradient(180deg, var(--cta-1), var(--cta-2));
  border: 4px solid var(--cta-line);
  color: var(--brown); font-size: 21px; padding: 16px 20px;
  box-shadow: 0 6px 0 rgba(201,154,75,.55);
}
.btn-cta:active { box-shadow: 0 2px 0 rgba(201,154,75,.55); }
.btn-inline { width: auto; margin: 0; flex: 1; font-size: 18px; padding: 13px 20px; box-shadow: 0 5px 0 rgba(201,154,75,.5); }
.btn-sm { width: auto; margin: 0; font-size: 15px; padding: 10px 18px; box-shadow: 0 4px 0 rgba(201,154,75,.5); }
.cta-paw { font-size: 20px; }
.cta-arrow {
  width: 28px; height: 28px; border: 3px solid var(--cta-line); border-radius: 50%;
  display: grid; place-items: center; font-size: 18px; line-height: 1; padding-bottom: 3px;
}

.btn-ghost {
  background: #fff; border: 3px solid var(--cream-deep);
  color: var(--brown-soft); font-size: 15px; padding: 11px 20px;
}

.cta-note { text-align: center; font-size: 14px; color: var(--brown-soft); margin: 10px 0 0; }
.hero-disclaimer { text-align: center; font-size: 11px; color: #B79C82; margin-top: 18px; }

/* ---------- 질문 화면 ---------- */
.q-index { font-size: 13px; color: var(--yellow-line); letter-spacing: .1em; margin: 0 0 6px; }
.q-title { font-size: 26px; line-height: 1.35; margin: 0 0 8px; }
.q-help { font-size: 14px; color: var(--brown-soft); margin: 0 0 22px; }

.card { background: #fff; border: 3px solid var(--cream-deep); border-radius: var(--radius); padding: 18px; }

.field { display: block; margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.field-label { display: block; font-size: 14px; color: var(--brown-soft); margin-bottom: 6px; }
.field input {
  width: 100%; font-family: inherit; font-size: 17px; color: var(--brown);
  background: var(--cream); border: 3px solid var(--cream-deep);
  border-radius: 16px; padding: 12px 14px; outline: none;
}
.field input:focus { border-color: var(--yellow-line); background: #fff; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.input-unit { position: relative; }
.input-unit .unit { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--brown-soft); font-size: 15px; }
.input-unit input { padding-right: 40px; }

.human-age-preview {
  margin: 4px 0 0; padding: 10px 14px; border-radius: 16px;
  background: var(--blue); border: 2px solid var(--blue-line);
  font-size: 14px; text-align: center;
}
.error { color: #D9534F; font-size: 13px; margin: 8px 0 0; }

/* ---------- 선택지 ---------- */
.choices { display: flex; flex-direction: column; gap: 12px; }
.choice {
  display: flex; align-items: center; gap: 14px; text-align: left;
  width: 100%; font-family: inherit; cursor: pointer;
  background: #fff; border: 3px solid var(--cream-deep);
  border-radius: var(--radius); padding: 14px 16px;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.choice:active { transform: scale(.98); }
.choice.selected { border-color: var(--yellow-line); background: var(--yellow); }
.choice-emoji { font-size: 30px; line-height: 1; }
.choice-body { display: flex; flex-direction: column; }
.choice-body b { font-size: 17px; font-weight: normal; color: var(--brown); }
.choice-body small { font-size: 12.5px; color: var(--brown-soft); }

.nav-row { display: flex; gap: 10px; margin-top: 22px; }

/* ---------- 로딩 ---------- */
.loading { text-align: center; padding: 60px 0; }
.loading-dog { width: 130px; animation: bounce 1s infinite ease-in-out; }
@keyframes bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
.loading-text { font-size: 17px; margin: 20px 0 18px; }
.loading-bar { height: 12px; background: #fff; border: 3px solid var(--brown); border-radius: 20px; overflow: hidden; max-width: 240px; margin: 0 auto; }
.loading-bar i { display: block; height: 100%; width: 40%; background: var(--green-line); animation: slide 1.3s infinite ease-in-out; }
@keyframes slide { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }

/* ---------- 결과 ---------- */
.result-card {
  background: #fff; border: 4px solid var(--brown);
  border-radius: 28px; padding: 24px 20px; box-shadow: 0 8px 0 rgba(79,44,19,.12);
}
.result-brand { text-align: center; font-size: 13px; letter-spacing: .22em; color: var(--brown-soft); }

.type-block { text-align: center; padding: 10px 0 18px; border-bottom: 3px dashed var(--cream-deep); }
.type-emoji { font-size: 56px; line-height: 1.1; }
.type-code {
  display: inline-block; margin: 6px 0 4px; padding: 3px 14px;
  background: var(--green); border: 2px solid var(--green-line); border-radius: 20px;
  font-size: 14px; letter-spacing: .18em;
}
.type-name { font-size: 27px; margin: 4px 0 4px; }
.type-tagline { font-size: 14px; color: var(--brown-soft); margin: 0; }

.score-block { display: flex; gap: 16px; align-items: center; padding: 20px 0; border-bottom: 3px dashed var(--cream-deep); }
.gauge { position: relative; width: 118px; flex: none; }
.gauge-svg { width: 118px; height: 118px; transform: rotate(-90deg); }
.gauge-bg { fill: none; stroke: var(--cream-deep); stroke-width: 13; }
.gauge-fg { fill: none; stroke: var(--green-line); stroke-width: 13; stroke-linecap: round;
  stroke-dasharray: 326.7; stroke-dashoffset: 326.7; transition: stroke-dashoffset 1.1s ease; }
.gauge-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.gauge-center span { font-size: 38px; line-height: 1; }
.gauge-center small { font-size: 13px; color: var(--brown-soft); }

.score-side { flex: 1; min-width: 0; }
.score-label { font-size: 13px; color: var(--brown-soft); margin: 0 0 2px; }
.peer-line { font-size: 18px; margin: 0 0 8px; }
.peer-line b { color: var(--pink-line); }
.peer-bar { height: 12px; background: var(--cream-deep); border-radius: 20px; overflow: hidden; }
.peer-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--pink-line), var(--yellow-line)); transition: width 1s ease .2s; }
.peer-note { font-size: 11.5px; color: #B79C82; margin: 6px 0 0; }

.fact-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 16px 0; border-bottom: 3px dashed var(--cream-deep); }
.fact { background: var(--cream); border-radius: 16px; padding: 10px 6px; text-align: center; }
.fact-k { display: block; font-size: 11px; color: var(--brown-soft); }
.fact-v { display: block; font-size: 15px; margin-top: 2px; }

.ai-block { padding-top: 18px; }
.ai-badge {
  display: inline-block; margin: 0 0 10px; padding: 4px 12px;
  background: var(--purple); border: 2px solid var(--purple-line); border-radius: 20px; font-size: 12px;
}
.ai-headline { font-size: 20px; margin: 0 0 8px; line-height: 1.4; }
.ai-analysis { font-size: 14.5px; margin: 0 0 16px; color: #5F4227; }

.ai-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.ai-col { border-radius: 16px; padding: 12px; }
.ai-col.good { background: var(--green); }
.ai-col.warn { background: var(--pink); }
.ai-col-title { font-size: 13px; margin: 0 0 6px; }
.ai-col ul { margin: 0; padding-left: 16px; }
.ai-col li { font-size: 12.5px; margin-bottom: 4px; line-height: 1.45; }

.ai-action, .ai-tip { background: var(--cream); border-radius: 16px; padding: 12px 14px; margin-bottom: 10px; }
.ai-action-title { font-size: 12px; color: var(--brown-soft); margin: 0 0 4px; }
.ai-action p, .ai-tip p { margin: 0; font-size: 14px; }

.disclaimer { font-size: 10.5px; color: #B79C82; margin: 14px 0 0; line-height: 1.5; }

/* ---------- 리드 수집 ---------- */
.lead-box { background: var(--blue); border: 3px solid var(--blue-line); border-radius: var(--radius); padding: 18px; margin-top: 18px; }
.lead-title { font-size: 16px; margin: 0 0 4px; }
.lead-sub { font-size: 13px; color: #4E7C9B; margin: 0 0 12px; }
.lead-row { display: flex; gap: 8px; }
.lead-row input { flex: 1; min-width: 0; font-family: inherit; font-size: 15px; background: #fff; border: 3px solid #fff; border-radius: 16px; padding: 10px 12px; outline: none; color: var(--brown); }
.lead-check { display: flex; gap: 8px; align-items: flex-start; font-size: 11.5px; color: #4E7C9B; margin-top: 10px; }
.lead-check input { margin-top: 3px; }
.lead-check a { color: #2E6C93; text-underline-offset: 2px; }
.lead-msg { font-size: 13px; margin: 8px 0 0; }

.share-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.share-row .btn-cta { flex: 1 1 100%; margin: 0; }
.share-row .btn-ghost { flex: 1; }

.hero { text-align: center; padding-top: 40px; }
.hero-emoji { font-size: 64px; }
