@font-face {
  font-family: Pretendard;
  src: url("fonts/Pretendard-Medium.otf") format("opentype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: Pretendard;
  src: url("fonts/Pretendard-SemiBold.otf") format("opentype");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: Pretendard;
  src: url("fonts/Pretendard-Bold.otf") format("opentype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: Pretendard;
  src: url("fonts/Pretendard-ExtraBold.otf") format("opentype");
  font-weight: 800;
  font-display: swap;
}

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

html { color-scheme: light; touch-action: manipulation; }

body {
  margin: 0;
  background: #D5DEEA;
  color: #191919;
  font-family: Pretendard, "Apple SD Gothic Neo", sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  font-synthesis: none;
  word-break: keep-all;
}

button, input { font: inherit; color: inherit; }
button {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
button:focus-visible, input:focus-visible {
  outline: 3px solid #191919;
  outline-offset: 2px;
}

.phone {
  width: min(440px, 100%);
  min-height: 100dvh;
  margin: 0 auto;
  background: #F3F6FB;
  position: relative;
  display: flex;
  flex-direction: column;
}

main { flex: 1; padding: 22px 20px 12px; }

h1, h2, h3, p { margin: 0; }
h1 {
  font-size: 40px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
}
h2 {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 32px 0 8px;
}
h3 { font-size: 18px; font-weight: 700; margin: 16px 0 4px; }

.muted { color: #5C6570; font-size: 13px; font-weight: 500; }
.lead { margin-top: 14px; font-size: 18px; line-height: 1.45; }
.fine { margin-top: 14px; }

.brand, .linkish {
  font-weight: 700;
  font-size: 15px;
}
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.top p { font-size: 14px; font-weight: 700; }
.top b { font-weight: 800; }

.track {
  height: 8px;
  background: #E1E6EE;
  border-radius: 99px;
  margin: 0 0 22px;
  overflow: hidden;
}
.track span {
  display: block;
  height: 100%;
  background: #191919;
  border-radius: 99px;
}

.q { font-size: 32px; margin-bottom: 8px; }
.hint { margin-bottom: 18px; }

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin-top: 18px;
}
.hero h1 { max-width: 240px; }

.mascot { width: 132px; height: auto; display: block; flex: none; object-fit: contain; }
.load .mascot { width: 180px; margin: 0 auto 8px; }

.cta, .choice, .past {
  border-radius: 18px;
}
.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  margin-top: 22px;
  padding: 13px 24px;
  background: #191919;
  color: #fff;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
  border-radius: 999px;
  box-shadow: none;
  transition: opacity 0.2s cubic-bezier(0.28, 0.11, 0.32, 1), transform 0.2s cubic-bezier(0.28, 0.11, 0.32, 1);
}
.cta:active { opacity: 0.8; transform: scale(0.97); }
.cta.ghost { background: #E6E9EF; color: #191919; }

.choice {
  display: block;
  width: 100%;
  text-align: left;
  background: #fff;
  padding: 16px 18px;
  margin-bottom: 10px;
  font-weight: 700;
  font-size: 18px;
  box-shadow: 0 8px 20px rgba(25, 25, 25, 0.05);
}
.choice small {
  display: block;
  margin-top: 2px;
  color: #5C6570;
  font-size: 13px;
  font-weight: 500;
}
.choice.is-on {
  background: #FFE14A;
  box-shadow: 0 4px 0 #191919;
}
.choice.is-on small { color: #191919; }
.choice.tall { min-height: 72px; }

.grid3, .grid7, .grid2 { display: grid; gap: 8px; }
.grid3 { grid-template-columns: repeat(3, 1fr); }
.grid7 { grid-template-columns: repeat(7, 1fr); gap: 6px; }
.grid2 { grid-template-columns: 1fr 1fr; }
.grid3 .choice, .grid7 .choice, .grid2 .choice {
  text-align: center;
  margin: 0;
  padding: 12px 4px;
}
.grid7 .choice { border-radius: 14px; min-height: 44px; font-size: 16px; }
.span2 { grid-column: 1 / -1; }

.stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin: 12px 0 4px;
}
.stepper button {
  min-width: 48px;
  min-height: 48px;
  border-radius: 14px;
  background: #fff;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(25, 25, 25, 0.05);
}
.year-input {
  width: 5.2ch;
  border: 0;
  background: transparent;
  text-align: center;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.03em;
  padding: 0;
}

.past {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  margin-top: 28px;
  padding: 14px 16px;
  background: #fff;
  text-align: left;
  box-shadow: 0 8px 20px rgba(25, 25, 25, 0.05);
}
.past span { font-size: 13px; color: #5C6570; font-weight: 600; }
.past b { font-size: 18px; }

.load { padding-top: 12vh; text-align: center; }
.load h1 { font-size: 32px; max-width: 280px; margin-left: auto; margin-right: auto; }

.kicker { font-weight: 700; margin-bottom: 6px; }
.result-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
}
.result-head .mascot { width: 112px; }
.deep-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.deep-top h1 { font-size: 32px; }
.deep-top .lead { margin-top: 6px; }
.deep-top .mascot { width: 96px; }
.poses {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
}
.poses figure {
  margin: 0;
  background: #fff;
  border-radius: 16px;
  padding: 8px 4px 10px;
  text-align: center;
  box-shadow: 0 8px 20px rgba(25, 25, 25, 0.05);
}
.poses img {
  width: 100%;
  height: 108px;
  object-fit: contain;
  display: block;
}
.poses figcaption {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 700;
  color: #5C6570;
}
.result-head h1 { font-size: 36px; max-width: 250px; }

.keys { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.keys span {
  background: #FFE14A;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 3px 0 #191919;
}
.say { margin-top: 16px; font-size: 18px; line-height: 1.45; }
.today { margin-top: 18px; font-size: 16px; }

.panel {
  margin-top: 18px;
  background: #fff;
  border-radius: 28px;
  padding: 18px 14px 16px;
  box-shadow: 0 10px 30px rgba(25, 25, 25, 0.06);
}
.panel .cap {
  font-size: 13px;
  font-weight: 700;
  color: #5C6570;
  margin-bottom: 12px;
}
.pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  text-align: center;
}
.stamp {
  width: 100%;
  max-width: 76px;
  height: 76px;
  margin: 0 auto 6px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 26px;
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.stamp.empty { background: #E7EDF5; color: #191919; font-size: 16px; }
.pcol p { font-size: 13px; font-weight: 700; }

.bars { margin-top: 16px; display: grid; gap: 8px; }
.el { display: grid; grid-template-columns: 28px 1fr 22px; gap: 8px; align-items: center; font-weight: 700; font-size: 14px; }
.el i {
  display: block;
  height: 10px;
  background: #E7EDF5;
  border-radius: 99px;
  overflow: hidden;
}
.el i b { display: block; height: 100%; border-radius: 99px; }
.el em { font-style: normal; text-align: right; }

.offer { margin-top: 18px; font-weight: 700; }

.rows, .luck, .months, .sheet ul { list-style: none; padding: 0; margin: 8px 0 0; }
.rows li, .luck li { padding: 12px 0; }
.rows b, .luck b, .months b { display: block; font-size: 16px; font-weight: 800; }
.rows span, .luck span, .months span { color: #3A424C; font-size: 15px; }
.months {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
}
.months li { padding: 8px 0; }
.months li.now {
  background: #FFE14A;
  border-radius: 14px;
  padding: 8px 10px;
}
.tally { margin-top: 8px; }

.paynote { margin-top: 8px; font-weight: 700; }

.dock {
  position: sticky;
  bottom: 0;
  padding: 10px 20px calc(14px + env(safe-area-inset-bottom));
  background: #F3F6FB;
}
.dock .cta { margin-top: 0; }
.dock-row { display: flex; justify-content: space-between; gap: 12px; margin-top: 4px; }
.dock-row .linkish { min-height: 44px; }
.dock .kakao { margin-top: 8px; }

.backdrop { position: fixed; inset: 0; z-index: 20; }
.backdrop-hit {
  position: absolute;
  inset: 0;
  background: rgba(25, 25, 25, 0.4);
  border-radius: 0;
}
.sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 86dvh;
  overflow: auto;
  background: #fff;
  border-radius: 28px 28px 0 0;
  padding: 18px 20px calc(20px + env(safe-area-inset-bottom));
}
.sheet-top { display: flex; justify-content: space-between; align-items: center; }
.sheet-top h2 { margin: 0; }
.price { font-size: 40px; font-weight: 800; letter-spacing: -0.03em; margin: 10px 0; }
.sheet li { font-weight: 700; padding: 7px 0; }
.note { margin: 12px 0; font-weight: 700; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 108px;
  transform: translateX(-50%);
  background: #191919;
  color: #fff;
  border-radius: 999px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 700;
  z-index: 40;
  width: max-content;
  max-width: calc(100% - 40px);
}

.enter { animation: rise 0.28s ease; }
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.bob { animation: bob 0.7s ease-in-out infinite; }

@media (min-width: 720px) {
  body { padding: 24px 0 32px; }
  .phone {
    min-height: calc(100dvh - 56px);
    border-radius: 32px;
    box-shadow: 0 24px 60px rgba(25, 25, 25, 0.1);
  }
  .backdrop { left: 50%; right: auto; width: 440px; transform: translateX(-50%); }
}

@media (hover: hover) {
  .choice:hover { transform: translateY(-1px); }
}

.chat { display: flex; flex-direction: column; gap: 12px; padding-bottom: 360px; }
.chat-main { padding-bottom: 8px; }
.chat .msg, .chat .typing { scroll-margin-bottom: 360px; }
.duo { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; text-align: center; }
.duo figure { margin: 0; }
.duo img { width: 100%; height: 112px; object-fit: contain; }
.duo figcaption { font-size: 12px; font-weight: 700; color: #5C6570; }
.duo b { display: block; margin-top: 2px; font-size: 15px; color: #191919; }
.pill {
  background: #FFE14A;
  color: #191919;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
  border-radius: 999px;
  padding: 8px 10px;
  box-shadow: 0 3px 0 #191919;
}
.duo-save { grid-column: 1 / -1; justify-self: center; margin-top: 4px; }
.orbit { position: relative; height: 300px; }
.orbit svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.orbit line { stroke: #191919; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.node {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 76px;
  text-align: center;
  background: transparent;
}
.node img { width: 52px; height: 60px; object-fit: contain; }
.node b { display: block; font-size: 12px; font-weight: 800; }
.node small { display: block; font-size: 10px; font-weight: 700; color: #5C6570; line-height: 1.25; }
.name-row { display: flex; gap: 8px; align-items: center; }
.name-row input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: #fff;
  border-radius: 999px;
  padding: 10px 14px;
  font: inherit;
  font-weight: 700;
  box-shadow: 0 3px 0 #191919;
}
.msg { display: flex; gap: 8px; align-items: flex-end; max-width: 100%; }
.msg.me { justify-content: flex-end; }
.ava { width: 42px; height: 52px; object-fit: contain; flex: none; }
.bubble, .card-bubble {
  max-width: calc(100% - 50px);
  background: #fff;
  border-radius: 18px;
  border-bottom-left-radius: 6px;
  padding: 12px 14px;
  box-shadow: 0 8px 20px rgba(25, 25, 25, 0.05);
  font-size: 16px;
  line-height: 1.45;
}
.bubble { white-space: pre-wrap; }
.msg.me .bubble {
  background: #191919;
  color: #fff;
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 6px;
  box-shadow: none;
}
.card-bubble { flex: 1; min-width: 0; }
.hero-card { text-align: center; }
.hero-card .mascot { width: 148px; margin: 0 auto 4px; }
.hero-name { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.compare figure { margin: 0; text-align: center; }
.compare img { width: 100%; height: 128px; object-fit: contain; }
.compare figcaption { font-size: 12px; font-weight: 700; color: #5C6570; }
.compare b { display: block; margin-top: 2px; font-size: 16px; color: #191919; }
.compare small { display: block; font-size: 12px; font-weight: 700; }
.card-bubble .poses { margin-top: 0; }
.dots { display: flex; gap: 5px; align-items: center; min-width: 48px; }
.dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #191919;
  animation: blink 1s infinite;
}
.dots i:nth-child(2) { animation-delay: 0.15s; }
.dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes blink {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 1; }
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  background: #fff;
  color: #191919;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  box-shadow: none;
  transition: opacity 0.2s cubic-bezier(0.28, 0.11, 0.32, 1), transform 0.2s cubic-bezier(0.28, 0.11, 0.32, 1);
}
.chip:active { opacity: 0.8; transform: scale(0.97); }
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .enter, .bob, .dots i { animation: none; }
  .cta:active, .choice:hover, .chip:active { transform: none; }
}

/* 이메일 게이트(총평 열기 시트) */
.gate p { margin-top: 10px; }
.gate input[type="email"] {
  width: 100%;
  border: 0;
  background: #F3F6FB;
  border-radius: 14px;
  padding: 14px 16px;
  margin-top: 14px;
  font-size: 17px;
  font-weight: 600;
}
.gate input[type="email"]::placeholder { color: #8A939E; font-weight: 500; }
.chk-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; }
.chk { display: flex; align-items: center; gap: 10px; min-height: 32px; font-size: 15px; font-weight: 600; cursor: pointer; }
.chk input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: #191919; cursor: pointer; }
.chk.ad { margin-top: 8px; }
.more { flex: none; min-height: 32px; font-size: 14px; font-weight: 700; color: #5C6570; text-decoration: underline; text-underline-offset: 3px; }
.policy { margin-top: 8px; background: #F3F6FB; border-radius: 14px; padding: 12px 14px; font-size: 13px; line-height: 1.5; color: #3A424C; }
.policy dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; }
.policy dt { font-weight: 700; color: #191919; }
.policy dd { margin: 0; }
.policy p { margin-top: 8px; }
.err { margin: 10px 0 0; color: #E10600; font-size: 14px; font-weight: 700; }
.gate .cta { margin-top: 16px; }
.gate .cta:disabled { opacity: 0.6; cursor: default; }
