/* 색은 명함 뒷면(명함/뒷면/make_back.py)과 같은 값 */
:root {
  --navy-d: #000a28;
  --navy: #001c54;
  --royal: #063ea8;
  --cyan: #00b4dc;
  --sky: #96e2f8;
  --red: #e5483a;
  --ink: #0b1533;
  --sub: #56617d;
  --faint: #a9b2c6;
  --line: #dde3ee;
  --bg: #f4f6fb;
  --card: #fff;
  --hero: linear-gradient(160deg, #000a28 0%, #001c54 42%, #063ea8 82%, #0096d0 100%);
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    "Noto Sans KR", "Malgun Gothic", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--navy-d);
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, p, ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }

#app {
  max-width: 480px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
}
.noscript { padding: 40px 24px; color: #fff; text-align: center; }

.screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  animation: enter .28s ease both;
}
@keyframes enter { from { opacity: 0; transform: translateY(10px); } }

/* ---------- 위쪽 줄: 뒤로 · 진행 ---------- */
.top {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  padding: 0 20px 0 8px;
}
.back {
  flex: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink);
}
.back:active { background: rgba(0, 28, 84, .08); }
.back svg { width: 24px; height: 24px; }
.steps { flex: 1; display: flex; gap: 5px; }
.steps i { flex: 1; height: 4px; border-radius: 2px; background: var(--line); transition: background .3s; }
.steps i.on { background: var(--navy); }
.step-n { flex: none; font-size: 13px; font-weight: 600; color: var(--sub); font-variant-numeric: tabular-nums; }

/* ---------- 질문 ---------- */
.body { padding: 20px 24px 28px; }
.title {
  font-size: 26px;
  line-height: 1.34;
  font-weight: 750;
  letter-spacing: -.025em;
  white-space: pre-line;
}
.hint { margin-top: 10px; font-size: 15px; line-height: 1.55; color: var(--sub); }

.field { margin-top: 36px; }
.label { display: block; margin-top: 30px; font-size: 14px; font-weight: 700; color: var(--sub); }
.label + .field { margin-top: 6px; }
.input {
  display: block;
  width: 100%;
  padding: 6px 0 12px;
  border: 0;
  border-bottom: 2px solid var(--line);
  border-radius: 0;
  background: none;
  font-size: 21px;
  line-height: 1.45;
  font-weight: 600;
  letter-spacing: -.015em;
  resize: none;
  overflow: hidden;
  outline: none;
  transition: border-color .2s;
}
.input::placeholder { color: var(--faint); font-weight: 500; }
.input:focus { border-color: var(--royal); }
.field.bad .input { border-color: var(--red); }
.field-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-height: 22px;
  margin-top: 8px;
  font-size: 13.5px;
}
.err { flex: 1; color: var(--red); font-weight: 600; }
.count { flex: none; margin-left: auto; color: var(--faint); font-variant-numeric: tabular-nums; }
.count.short { color: var(--sub); }

/* ---------- 아래 단추 ---------- */
.bar {
  position: sticky;
  bottom: 0;
  margin-top: auto;
  padding: 14px 20px calc(18px + env(safe-area-inset-bottom));
  display: grid;
  gap: 10px;
  background: linear-gradient(to top, var(--bg) 72%, rgba(244, 246, 251, 0));
}
.btn {
  width: 100%;
  min-height: 56px;
  padding: 0 20px;
  border: 0;
  border-radius: 16px;
  background: var(--navy);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.01em;
  transition: transform .1s, background .2s, opacity .2s;
}
.btn:active { transform: scale(.985); }
.btn.dim { background: #c5cddd; }
.btn.light { background: #fff; color: var(--navy); }
.btn.ghost { background: none; color: var(--navy); box-shadow: inset 0 0 0 1.5px var(--line); }
.link {
  justify-self: center;
  padding: 10px 12px;
  border: 0;
  background: none;
  color: var(--sub);
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- 시작 화면 ---------- */
.hero {
  position: relative;
  padding: 34px 28px 58px;
  color: #fff;
  background: var(--hero);
  overflow: hidden;
}
.hero::before {    /* CORE.TODAY 로고의 점 무늬 */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, .26) 2.4px, transparent 2.9px) 0 0 / 24px 24px;
  -webkit-mask-image: linear-gradient(115deg, transparent 38%, #000 100%);
  mask-image: linear-gradient(115deg, transparent 38%, #000 100%);
}
.hero > * { position: relative; }
.event { font-size: 14px; font-weight: 700; letter-spacing: .02em; color: var(--sky); }
.hero h1 {
  margin-top: 14px;
  font-size: 46px;
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -.035em;
}
.hero .lead { margin-top: 16px; font-size: 16.5px; line-height: 1.55; color: rgba(255, 255, 255, .82); }

.sheet {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-top: -28px;
  padding: 28px 24px calc(22px + env(safe-area-inset-bottom));
  border-radius: 28px 28px 0 0;
  background: var(--bg);
  position: relative;
}
.how { display: grid; gap: 14px; }
.how li { display: flex; align-items: center; gap: 14px; font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.how b {
  flex: none;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}
.consent {
  margin-top: 22px;
  padding: 18px;
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 1px 0 var(--line);
}
.consent h2 { font-size: 15px; font-weight: 700; }
.consent dl { margin-top: 12px; display: grid; grid-template-columns: auto 1fr; gap: 7px 14px; font-size: 13.5px; line-height: 1.5; }
.consent dt { color: var(--sub); font-weight: 600; white-space: nowrap; }
.agree {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 15.5px;
  font-weight: 700;
}
.agree input { position: absolute; opacity: 0; }
.agree .box {
  flex: none;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 2px solid var(--faint);
  color: transparent;
  transition: all .15s;
}
.agree .box svg { width: 16px; height: 16px; }
.agree input:checked + .box { border-color: var(--navy); background: var(--navy); color: #fff; }
.agree input:focus-visible + .box { outline: 2px solid var(--cyan); outline-offset: 2px; }
.start-foot { margin-top: auto; padding-top: 18px; display: grid; gap: 16px; }
.logos { display: flex; justify-content: center; align-items: center; gap: 22px; opacity: .9; }
.logos img { height: 15px; width: auto; }
.logos img.ct { height: 22px; }
.mock {
  justify-self: center;
  padding: 5px 12px;
  border-radius: 99px;
  background: #fff3cd;
  color: #7a5b00;
  font-size: 12.5px;
  font-weight: 600;
}

.hero .back { margin: -12px 0 6px -12px; color: #fff; }

/* 안내 · 동의 화면: 표지에 큰 제목이 있으니 머리는 얇게, 단추는 화면 아래에 붙인다 */
.hero.slim { padding: 22px 24px 50px; }
.hero.slim h1 { margin-top: 8px; font-size: 34px; }
.hero.slim .lead { margin-top: 10px; font-size: 15px; }
.intro .sheet { padding-bottom: 0; }
.intro .start-foot {
  position: sticky;
  bottom: 0;
  margin: auto -24px 0;
  padding: 14px 24px calc(18px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 72%, rgba(244, 246, 251, 0));
}


.hero .back:active { background: rgba(255, 255, 255, .12); }
.link.light { color: rgba(255, 255, 255, .78); }

/* ---------- 표지 ---------- */
.cover {
  position: relative;
  padding: 26px 28px calc(26px + env(safe-area-inset-bottom));
  color: #fff;
  background: var(--hero);
  overflow: hidden;
}
.cover::before {    /* .hero 와 같은 점 무늬 */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, .26) 2.4px, transparent 2.9px) 0 0 / 24px 24px;
  -webkit-mask-image: linear-gradient(160deg, transparent 45%, #000 100%);
  mask-image: linear-gradient(160deg, transparent 45%, #000 100%);
}
.cover > * { position: relative; }
.cover-top { display: flex; justify-content: space-between; align-items: center; }
.cover-top img { height: 19px; width: auto; }
.cover-top span { font-size: 11.5px; font-weight: 700; letter-spacing: .16em; color: rgba(255, 255, 255, .8); }
.cover-main { margin: auto 0; padding: 48px 0 40px; }
.cover h1 { margin-top: 16px; font-size: 64px; line-height: 1.02; font-weight: 800; letter-spacing: -.045em; }
.cover .lead { margin-top: 20px; font-size: 17px; line-height: 1.55; color: rgba(255, 255, 255, .84); }
.gets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.gets li {
  padding: 7px 14px;
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, .26);
  background: rgba(255, 255, 255, .1);
  font-size: 14px;
  font-weight: 600;
}
.cover-foot { display: grid; gap: 12px; }
.cover-ct { justify-self: center; height: 22px; width: auto; margin-top: 10px; opacity: .85; }

/* ---------- 아이템이 없을 때 ---------- */
.noidea {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin-top: 28px;
  padding: 16px 18px;
  border: 0;
  border-radius: 18px;
  background: #e8eefb;
  text-align: left;
}
.noidea:active { background: #dbe4f8; }
.noidea .spark { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--royal); color: #fff; }
.noidea .spark svg { width: 22px; height: 22px; }
.noidea strong { display: block; font-size: 16px; font-weight: 700; color: var(--navy); }
.noidea span { display: block; margin-top: 3px; font-size: 13.5px; line-height: 1.45; color: var(--sub); }
.noidea .arrow { flex: none; margin-left: auto; color: var(--royal); }
.noidea .arrow svg { width: 20px; height: 20px; }

.chips { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 28px; }
.chip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 0 16px;
  border: 0;
  border-radius: 16px;
  background: var(--card);
  box-shadow: inset 0 0 0 1.5px var(--line);
  font-size: 16.5px;
  font-weight: 650;
  text-align: left;
  transition: all .15s;
}
.chip .emo { font-size: 20px; }
.chip[aria-pressed="true"] { background: var(--navy); color: #fff; box-shadow: none; }
.note { margin-top: 14px; font-size: 13.5px; color: var(--sub); }
.note.flash { color: var(--red); font-weight: 600; }

.cands { display: grid; gap: 12px; margin-top: 24px; }
.cand {
  position: relative;
  width: 100%;
  padding: 18px 48px 18px 18px;
  border: 0;
  border-radius: 18px;
  background: var(--card);
  box-shadow: inset 0 0 0 1.5px var(--line);
  text-align: left;
  transition: box-shadow .15s, background .15s;
}
.cand strong { display: block; font-size: 17.5px; line-height: 1.42; font-weight: 700; letter-spacing: -.015em; }
.cand .goal { display: block; margin-top: 8px; font-size: 14.5px; line-height: 1.5; color: var(--sub); }
.cand .who {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 10px;
  border-radius: 99px;
  background: var(--bg);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--sub);
}
.cand .tick {
  position: absolute;
  top: 18px;
  right: 16px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px var(--line);
  color: transparent;
}
.cand .tick svg { width: 14px; height: 14px; }
.cand[aria-pressed="true"] { background: #eef3ff; box-shadow: inset 0 0 0 2px var(--royal); }
.cand[aria-pressed="true"] .tick { background: var(--royal); box-shadow: none; color: #fff; }
.cand[aria-pressed="true"] .who { background: #fff; }
.more { display: grid; gap: 6px; margin-top: 20px; }
.banner {
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #fff3cd;
  color: #7a5b00;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 600;
}

/* ---------- 확인 · 고치기 ---------- */
.form { display: grid; gap: 14px; margin-top: 24px; }
.row { padding: 16px 18px 10px; border-radius: 18px; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); }
.row label { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; color: var(--sub); }
.row .tag { padding: 2px 8px; border-radius: 99px; background: #e8eefb; color: var(--royal); font-size: 11.5px; font-weight: 700; }
.row .tag.mine { background: #e6f6ee; color: #0a7d4f; }
.row .field { margin-top: 8px; }
.row .input { padding: 2px 0 8px; border-bottom-width: 1.5px; font-size: 17px; font-weight: 600; }
.row .field-foot { min-height: 6px; margin-top: 6px; }
.row .err:empty { display: none; }
.row .step-tag { display: block; margin-top: 12px; font-size: 12px; font-weight: 700; color: var(--royal); }
.row .step-tag + .field { margin-top: 2px; }
.row .sentence { display: grid; }
.row .link.small { justify-self: end; padding: 2px 0; font-size: 12.5px; color: var(--sub); }
.row .link.small.add { display: block; margin: 8px 0 4px; color: var(--royal); font-weight: 700; }

/* ---------- 기다리는 화면 ---------- */
.wait { flex: 1; display: grid; place-content: center; justify-items: center; gap: 26px; padding: 40px 28px; text-align: center; }
.dots { display: flex; gap: 10px; }
.dots i { width: 14px; height: 14px; border-radius: 50%; background: var(--royal); animation: bob 1.1s ease-in-out infinite; }
.dots i:nth-child(2) { background: var(--cyan); animation-delay: .15s; }
.dots i:nth-child(3) { background: var(--red); animation-delay: .3s; }
@keyframes bob { 0%, 70%, 100% { transform: translateY(0); } 35% { transform: translateY(-12px); } }
.wait p { font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.wait small { font-size: 14.5px; color: var(--sub); }

/* ---------- 끝 화면 ---------- */
.hero.done { padding: 40px 24px 64px; text-align: center; }
.hero.done h1 { margin-top: 12px; font-size: 27px; line-height: 1.32; letter-spacing: -.025em; }
.code { display: flex; justify-content: center; gap: 10px; margin-top: 26px; }
.code span {
  width: 60px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #fff;
  color: var(--navy);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 40px;
  font-weight: 800;
}
.hero.done .lead { margin-top: 20px; font-size: 15px; }
.alert { padding: 16px 18px; border-radius: 16px; background: #fdecea; color: #8f2318; font-size: 14.5px; line-height: 1.55; font-weight: 600; }
.alert + .answers { margin-top: 18px; }
.answers { display: grid; gap: 16px; }
.answers dt { font-size: 13px; font-weight: 700; color: var(--sub); }
.answers dd { margin-top: 4px; font-size: 16.5px; line-height: 1.5; font-weight: 600; letter-spacing: -.01em; }
.answers dd.empty { color: var(--faint); font-weight: 500; }
.done-foot { margin-top: 26px; display: grid; gap: 6px; }
.fine { font-size: 13px; line-height: 1.5; color: var(--sub); text-align: center; }

/* ---------- 도움 안내 ---------- */
.care { margin-top: 24px; padding: 20px; border-radius: 18px; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); font-size: 15.5px; line-height: 1.65; }
.care a { display: block; margin-top: 14px; padding: 14px; border-radius: 12px; background: #e8eefb; color: var(--navy); font-weight: 700; text-align: center; text-decoration: none; }

.examples { display: grid; gap: 10px; margin-top: 24px; }
.examples button {
  width: 100%;
  padding: 16px 18px;
  border: 0;
  border-radius: 16px;
  background: var(--card);
  box-shadow: inset 0 0 0 1.5px var(--line);
  font-size: 16px;
  line-height: 1.45;
  font-weight: 650;
  text-align: left;
}
.examples button:active { background: #eef3ff; }

@media (prefers-reduced-motion: reduce) {
  .screen, .dots i { animation: none; }
}

/* ---------- 낮은 화면 (맨 끝에 둬야 위 규칙을 덮어요) ---------- */
/* 주소창 · 아래 메뉴 때문에 보이는 높이가 낮은 휴대폰 */
@media (max-height: 720px) {
  .hero.slim { padding: 16px 24px 44px; }
  .hero.slim h1 { font-size: 30px; }
  .hero.slim .lead { display: none; }
  .how { gap: 10px; }
  .consent { margin-top: 16px; padding: 15px 16px; }
  .cover h1 { font-size: 56px; }
  .cover-main { padding: 28px 0 24px; }
  .gets { margin-top: 20px; }
}
@media (max-height: 660px) {
  .cover { padding-top: 20px; }
  .cover h1 { font-size: 48px; }
  .cover .lead { margin-top: 14px; font-size: 15.5px; }
  .cover-main { padding: 16px 0 12px; }
  .gets { margin-top: 14px; }
  .cover-ct { margin-top: 2px; }
  .hero.slim { padding: 12px 24px 40px; }
  .hero.slim h1 { font-size: 28px; }
  .how li { font-size: 15px; }
  .chips { margin-top: 20px; }
  .chip { min-height: 50px; }
  .intro .sheet { padding-top: 22px; }
  .how { gap: 8px; }
  .consent { margin-top: 12px; }
  .agree { margin-top: 12px; padding-top: 12px; }
}
/* 폭이 좁은 화면 (폴드 바깥 화면 · 작은 휴대폰) */
@media (max-width: 360px) {
  .sheet { padding-left: 18px; padding-right: 18px; }
  .intro .start-foot { margin-left: -18px; margin-right: -18px; padding-left: 18px; padding-right: 18px; }
  .hero.slim h1 { font-size: 30px; }
  .how li { font-size: 15px; }
  .consent { padding: 14px; }
  .consent dl { gap: 6px 10px; font-size: 13px; }
  .body { padding-left: 20px; padding-right: 20px; }
  .title { font-size: 24px; }
  .chip { padding: 0 12px; font-size: 15.5px; }
}
/* 아주 낮은 화면 (작은 휴대폰 · 세로 600px 미만). 다 들어가지 않으니 스크롤하되 단추는 아래에 붙어 있다 */
@media (max-height: 600px) {
  .body { padding-top: 12px; }
  .field { margin-top: 24px; }
  .noidea { margin-top: 18px; padding: 12px 14px; }
  .chips { margin-top: 14px; gap: 8px; }
  .chip { min-height: 42px; }
}
/* 가로로 눕힌 휴대폰: 높이가 400px 안팎이라 스크롤한다. 표지 제목만 줄인다 */
@media (max-height: 440px) and (orientation: landscape) {
  .cover h1 { font-size: 40px; }
  .cover-main { padding: 12px 0; }
  .gets { display: none; }
}
/* 화면이 두 개인 기기 (듀얼스크린 · 펼친 폴더블의 두 화면 모드): 접힌 선에 걸치지 않게 왼쪽 화면에만 */
@media (horizontal-viewport-segments: 2) {
  #app { margin-left: 0; max-width: min(480px, env(viewport-segment-width 0 0, 480px)); }
}
