/* 나의 여행 스타일 테스트 — 외부 폰트 없이 기기 기본 글꼴만 사용 */
:root {
  --bg: #FFF8F0;
  --ink: #2A2420;
  --muted: #7A6E66;
  --line: #EDE2D7;
  --card: #FFFFFF;
  --c: #3D7BF2;      /* 유형 대표색 (결과 페이지에서 덮어씀) */
  --soft: #EAF1FF;
  --radius: 18px;
  --gutter: 16px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", "Malgun Gothic", "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-tap-highlight-color: transparent;
}

.app {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}

[hidden] { display: none !important; }

/* ── 공통 화면: 내용은 위, 버튼은 엄지가 닿는 아래쪽 ── */
.screen {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding-top: max(24px, env(safe-area-inset-top));
  padding-bottom: max(20px, env(safe-area-inset-bottom));
}
.bottom { margin-top: auto; }

/* ── 버튼 ── */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 58px;
  padding: 14px 20px;
  border-radius: 16px;
  border: 0;
  font: inherit;
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
  cursor: pointer;
  transition: transform .08s ease, filter .15s ease;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--c); color: #fff; box-shadow: 0 6px 16px -8px var(--c); }
.btn-secondary { background: var(--card); color: var(--ink); border: 1.5px solid var(--line); }
.btn + .btn { margin-top: 10px; }
.btn:focus-visible, .option:focus-visible, .btn-back:focus-visible, a:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

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

/* ── 시작 화면 ── */
.start-top { text-align: center; padding-top: 8vh; }
.emoji-row { display: flex; justify-content: center; gap: 10px; font-size: 40px; }
.emoji-row span { display: inline-block; animation: bob 2.4s ease-in-out infinite; }
.emoji-row span:nth-child(2) { animation-delay: .2s; }
.emoji-row span:nth-child(3) { animation-delay: .4s; }
.emoji-row span:nth-child(4) { animation-delay: .6s; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.screen-start h1 { font-size: 34px; line-height: 1.25; margin: 20px 0 12px; letter-spacing: -0.02em; }
.lead { color: var(--muted); margin: 0; }

/* ── 질문 화면 ── */
.quiz-bar { display: flex; align-items: center; justify-content: space-between; min-height: 44px; }
.btn-back {
  min-height: 44px;
  padding: 0 12px 0 0;
  background: none;
  border: 0;
  font: inherit;
  font-size: 16px;
  color: var(--muted);
  cursor: pointer;
}
.progress-text { font-size: 15px; color: var(--muted); font-variant-numeric: tabular-nums; }
.progress { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.progress-fill { height: 100%; width: 12.5%; background: var(--c); border-radius: 99px; transition: width .3s ease; }

.question-wrap { padding: 9vh 0 24px; }
.q-num { margin: 0 0 6px; font-weight: 800; color: var(--c); font-size: 18px; }
.q-text { margin: 0; font-size: 25px; line-height: 1.4; letter-spacing: -0.01em; outline: none; }

.options { display: flex; flex-direction: column; gap: 10px; }
.option {
  width: 100%;
  min-height: 62px;
  padding: 14px 18px;
  text-align: left;
  background: var(--card);
  color: var(--ink);
  border: 1.5px solid var(--line);
  border-radius: 16px;
  font: inherit;
  font-size: 17px;
  line-height: 1.4;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .08s ease;
}
.option:active { transform: scale(.985); }
@media (hover: hover) { .option:hover { border-color: var(--c); } }
.option.picked { background: var(--soft); border-color: var(--c); font-weight: 700; }

.screen-quiz.enter .question-wrap, .screen-quiz.enter .options { animation: rise .28s ease both; }
.screen-quiz.enter .options { animation-delay: .04s; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── 결과 화면 ── */
.result { padding-top: max(12px, env(safe-area-inset-top)); padding-bottom: max(28px, env(safe-area-inset-bottom)); }
.result-head { display: flex; justify-content: center; padding: 8px 0; }
.brand { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; padding: 10px; }

.hero {
  text-align: center;
  background: var(--soft);
  border-radius: 24px;
  padding: 28px 20px 26px;
  margin-top: 4px;
}
.intro { margin: 0; color: var(--muted); font-size: 15px; }
.hero-emoji { font-size: 76px; line-height: 1.2; margin: 8px 0 4px; }
.result-name { margin: 0; font-size: 31px; line-height: 1.3; color: var(--c); letter-spacing: -0.02em; }
.summary { margin: 10px 0 0; font-size: 18px; font-weight: 600; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 14px;
}
.card h2 { margin: 0 0 12px; font-size: 17px; }

.traits { margin: 0; padding: 0; list-style: none; }
.traits li { position: relative; padding-left: 22px; margin: 8px 0; }
.traits li::before {
  content: "";
  position: absolute; left: 4px; top: .62em;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--c);
}

.mate, .other {
  display: flex; align-items: center; gap: 14px;
  padding: 14px; border-radius: 14px;
  background: var(--soft); color: var(--ink); text-decoration: none;
  min-height: 64px;
}
.mate-emoji, .other-emoji { font-size: 34px; line-height: 1; }
.mate-text, .other-text { display: flex; flex-direction: column; }
.mate-text strong, .other-text strong { color: var(--c); }
.mate-text small, .other-text small { font-size: 14px; color: var(--muted); margin-top: 2px; }

.places { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.place { display: flex; flex-direction: column; padding: 14px; border-radius: 14px; background: var(--bg); }
.place-label {
  align-self: flex-start;
  font-size: 12px; font-weight: 700;
  color: #fff; background: var(--c);
  padding: 2px 9px; border-radius: 99px;
}
.place-name { font-size: 18px; margin-top: 6px; }
.place-why { font-size: 15px; color: var(--muted); }

.actions { margin-top: 20px; }
.other-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.foot { margin-top: 20px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 440px;
  background: #2A2420;
  color: #fff;
  padding: 14px 18px;
  border-radius: 14px;
  font-size: 15px;
  text-align: center;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,.4);
  z-index: 10;
}

.noscript { padding: 24px 0; text-align: center; }

/* 작은 화면(예: 아이폰 SE)에서 질문 화면이 넘치지 않게 */
@media (max-height: 640px) {
  .question-wrap { padding-top: 4vh; }
  .q-text { font-size: 22px; }
  .option { min-height: 54px; padding: 11px 16px; font-size: 16px; }
  .start-top { padding-top: 3vh; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
