:root {
  --bg-1: #2bb6c8;
  --bg-2: #5a8def;
  --card: #ffffff;
  --ink: #25303a;
  --ink-soft: #6b7785;
  --accent: #ff7a59; /* 선셋 코랄 */
  --accent-soft: #ffeee8;
  --sky: #2f8fce;
  --radius: 22px;
  --shadow: 0 22px 55px rgba(20, 60, 90, 0.32);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}

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

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  padding: 24px 16px;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 220, 150, 0.5), transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(90, 141, 239, 0.5), transparent 45%),
    linear-gradient(135deg, var(--bg-1), var(--bg-2));
}

.app { width: 100%; max-width: 460px; flex: 1; display: flex; align-items: center; justify-content: center; }

.screen { display: none; width: 100%; }
.screen.active { display: block; animation: fadeIn 0.45s ease; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 36px 26px; text-align: center; }

.emoji-float { font-size: 64px; animation: float 3s ease-in-out infinite; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

h1 {
  font-size: 26px; margin: 14px 0 10px; letter-spacing: -0.5px;
  background: linear-gradient(90deg, var(--accent), var(--sky));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.subtitle { color: var(--ink-soft); line-height: 1.6; font-size: 15px; }
.intro-meta { list-style: none; display: flex; flex-direction: column; gap: 8px; margin: 24px 0; font-size: 14px; color: var(--ink-soft); }
.disclaimer { margin-top: 18px; font-size: 11.5px; color: #a3aeb8; line-height: 1.5; }

.btn {
  border: none; border-radius: 14px; font-size: 16px; font-weight: 700; padding: 15px 22px;
  cursor: pointer; transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.2s ease;
  font-family: inherit; width: 100%;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 10px 22px rgba(255, 122, 89, 0.4); }
.btn-primary:hover { background: #f5663f; }
.btn-secondary { background: #41566a; color: #fff; margin-top: 10px; }
.btn-secondary:hover { background: #506882; }
.btn-ghost { background: transparent; color: var(--ink-soft); font-size: 14px; padding: 12px; margin-top: 10px; }
.btn-ghost:hover { color: var(--accent); }

.progress-wrap { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.progress-bar { flex: 1; height: 8px; background: var(--accent-soft); border-radius: 99px; overflow: hidden; }
.progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent), var(--sky)); border-radius: 99px; transition: width 0.4s ease; }
.progress-text { font-size: 13px; font-weight: 700; color: var(--ink-soft); white-space: nowrap; }

.question { font-size: 19px; line-height: 1.5; margin-bottom: 24px; min-height: 60px; display: flex; align-items: center; justify-content: center; letter-spacing: -0.4px; }
.options { display: flex; flex-direction: column; gap: 12px; }
.option {
  background: #f3f7fb; border: 2px solid transparent; border-radius: 14px; padding: 16px 18px;
  font-size: 15px; text-align: left; cursor: pointer; transition: all 0.15s ease; font-family: inherit;
  color: var(--ink); line-height: 1.45;
}
.option:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateX(4px); }
#btn-prev { margin-top: 22px; }

/* 결과 */
.capture { background: #fff; border-radius: 18px; padding: 6px 4px 14px; }
.result-label { color: var(--ink-soft); font-size: 14px; letter-spacing: 0.5px; }
.result-illust { margin: 10px auto 6px; width: 168px; height: 168px; animation: pop 0.5s ease; }
.result-illust svg { width: 100%; height: 100%; border-radius: 26px; box-shadow: 0 12px 28px rgba(20,60,90,0.2); }
@keyframes pop {
  0%   { transform: scale(0.3); opacity: 0; }
  70%  { transform: scale(1.12); }
  100% { transform: scale(1); opacity: 1; }
}
.result-name { font-size: 27px; letter-spacing: -0.5px; margin-top: 8px; }
.result-sub { color: var(--ink-soft); font-size: 13px; margin-top: 2px; }
.result-tagline { color: var(--accent); font-weight: 700; margin: 10px 0 16px; font-size: 15px; }
.result-desc { color: var(--ink-soft); line-height: 1.7; font-size: 14.5px; text-align: left; background: #f3f7fb; padding: 16px 18px; border-radius: 14px; }
.result-traits { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 18px 0; }
.trait-chip { background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 700; padding: 7px 14px; border-radius: 99px; }

.match-section { text-align: left; margin-top: 6px; }
.match-row { display: flex; gap: 12px; align-items: flex-start; border-radius: 14px; padding: 14px 16px; }
.match-row.next { background: #eef4fb; border: 1px solid #d8e6f2; }
.m-badge { font-size: 12px; font-weight: 800; white-space: nowrap; padding-top: 2px; color: var(--sky); }
.m-body { display: flex; flex-direction: column; gap: 4px; }
.m-name { font-weight: 800; font-size: 15px; color: var(--ink); }
.m-why { font-size: 13px; color: var(--ink-soft); line-height: 1.5; }
.result-tip { margin-top: 12px; font-size: 13.5px; color: var(--ink-soft); background: #fff6f2; border: 1px dashed #ffc9b8; border-radius: 12px; padding: 12px 14px; text-align: left; }
.result-tip::before { content: "💡 "; }

.capture-brand { margin-top: 16px; font-size: 12px; font-weight: 700; color: #b8c2cc; letter-spacing: 0.5px; }
.result-actions { display: flex; flex-direction: column; margin-top: 20px; }
.footer { margin-top: 24px; color: rgba(255, 255, 255, 0.85); font-size: 12.5px; text-align: center; }

/* 제작자 브랜드 로고 */
.brand-logo {
  position: fixed;
  top: 16px; right: 18px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 800;
  font-size: 15px;
  color: #fff;
  background: rgba(0, 0, 0, 0.22);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  padding: 8px 15px;
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  letter-spacing: 0.3px;
  text-decoration: none;
  user-select: none;
}
.brand-logo .heart { color: #ff5d7d; animation: heartbeat 1.4s ease-in-out infinite; }
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  28%      { transform: scale(1.28); }
  45%      { transform: scale(1); }
}

.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: rgba(20, 40, 55, 0.95); color: #fff; padding: 12px 22px; border-radius: 99px;
  font-size: 14px; opacity: 0; pointer-events: none; transition: all 0.3s ease; z-index: 50;
  max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
