/* 이음보 — "성씨로 보는 내 조상 기질" 프로토타입
   토큰·기본 버튼은 site-v7/styles-v7.css 와 같은 값을 그대로 가져왔다. */

:root {
  --bg: #ffffff;
  --face: #f6f6f4;
  --line: #e6e6e2;
  --ink: #141414;
  --ink-2: #5c5c57;
  --accent: #b6452c;

  --yellow: #fff5d1;
  --pink: #fde7ee;
  --sky: #e1f0ff;
  --violet: #efe8fb;
  --mint: #e2f4ea;

  --r-board: 32px;
  --r-card: 28px;
  --wrap: 640px;
  --gutter: 20px;

  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Apple SD Gothic Neo", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

.back-link {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  text-decoration: none;
  margin-bottom: 4px;
}
.back-link:hover { color: var(--ink); }

.hub-card {
  display: block;
  text-decoration: none;
  color: var(--ink);
  transition: transform .12s ease;
}
.hub-card:hover { transform: translateY(-2px); }
.hub-card-icon { width: 48px; height: 48px; object-fit: contain; margin-bottom: 10px; }
.hub-card-title { font-size: 19px; font-weight: 800; margin: 0 0 6px; }
.hub-card-deck { font-size: 14px; color: var(--ink-2); margin: 0; line-height: 1.5; }

/* 열두 띠 캐릭터 줄 — site/assets/guardians-row.css 의 .zodiac-row 를 그대로 가져왔다.
   자축인묘진사오미신유술해 순서로 오른쪽에서 왼쪽으로 천천히 흐른다. */
.zodiac-row {
  position: relative;
  width: 100%;
  height: clamp(150px, 19vw, 300px);
  overflow: hidden;
  pointer-events: none;
  margin-top: 8px;
}
.zodiac-track {
  display: flex;
  width: max-content;
  height: 100%;
  animation: zodiac-flow 90s linear infinite;
}
.zodiac-set { display: flex; align-items: flex-end; height: 100%; }
.zodiac-set img {
  height: 118%;
  width: auto;
  margin: 0 -1.2vw;
  transform: translateY(17%);
  flex: none;
}
@keyframes zodiac-flow {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .zodiac-track { animation: none; transform: translateX(-12%); }
}
.zodiac-caption {
  margin: 12px auto 0;
  padding: 0 20px;
  text-align: center;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-2);
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 32px var(--gutter) 80px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.board {
  border-radius: var(--r-board);
  padding: 28px 24px;
}
.board--face { background: var(--face); }

/* 1. 입구 */
.intro-title { font-size: 26px; font-weight: 800; margin: 0 0 10px; }
.intro-deck { font-size: 16px; color: var(--ink-2); margin: 0 0 22px; line-height: 1.5; }
.quiz-form label { display: block; font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.optional-label { margin-top: 16px; }
.optional-label span { font-weight: 400; color: var(--ink-2); font-size: 13px; }
.quiz-input-row { margin-bottom: 4px; }
.quiz-input-row input {
  width: 100%;
  height: 52px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font: inherit;
  font-size: 17px;
  color: var(--ink);
}
.quiz-input-row input:focus { outline: 2px solid var(--ink); outline-offset: 1px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  margin-top: 18px;
}
.btn--primary { background: var(--ink); color: #fff; }
.btn--primary:hover { background: #2e2e2c; }

/* 2~4. 결과 카드 */
.retry-top-link {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  text-decoration: none;
  margin-bottom: 12px;
  text-align: left;
}
.retry-top-link:hover { color: var(--ink); }
.result-board { text-align: center; position: relative; transition: outline-color .2s ease; outline: 3px solid transparent; outline-offset: 4px; }
.result-board.is-matched { outline-color: var(--accent); }
.personal-greet {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
  padding: 6px 14px;
  margin: 0 0 12px;
}
.result-eyebrow {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  margin: 0 0 16px;
}
.result-badge {
  width: 128px;
  height: 128px;
  margin: 0 auto 10px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.result-badge img {
  width: 92px;
  height: 92px;
  object-fit: contain;
}
.result-guardian {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  margin: 0 0 16px;
}
.result-type { font-size: 22px; font-weight: 800; margin: 0 0 14px; }
.result-body {
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: #fff;
  border-radius: var(--r-card);
  padding: 18px 20px;
  margin: 0 0 20px;
  text-align: left;
}
.result-peer {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: var(--r-card);
  padding: 12px 16px;
  margin: 0 0 16px;
  text-align: left;
}
.result-peer strong { font-weight: 700; }
.tool-title { font-size: 20px; font-weight: 800; margin: 0 0 8px; }
.tool-deck { font-size: 14px; color: var(--ink-2); line-height: 1.5; margin: 0 0 18px; }
#zodiacCalcForm .quiz-input-row { display: flex; gap: 8px; }
#zodiacCalcForm input { flex: 1; }
select {
  width: 100%;
  height: 52px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
}
.zodiac-calc-out, .gen-estimate-out { margin-top: 16px; }
.zodiac-calc-out:empty, .gen-estimate-out:empty { margin-top: 0; }
.zodiac-calc-img { width: 64px; height: 64px; object-fit: contain; display: block; margin: 0 auto 8px; }
.zodiac-calc-out p { text-align: center; font-size: 16px; margin: 0 0 6px; }
.zodiac-calc-caveat, .gen-estimate-caveat { font-size: 13px; color: var(--ink-2); text-align: center; }
.gen-estimate-out p:first-child { font-size: 16px; margin: 0 0 6px; }
.gen-estimate-detail { font-size: 14px; color: var(--ink-2); margin: 0 0 8px; }
.quip-icon { width: 22px; height: 22px; flex: none; }
.ancestor-quip {
  font-size: 17px;
  font-weight: 700;
  font-style: italic;
  line-height: 1.5;
  color: var(--accent);
  background: var(--face);
  border-radius: var(--r-card);
  padding: 14px 16px;
  margin: 0 0 16px;
  text-align: left;
}
.quip-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.quip-label {
  font-size: 12px;
  font-weight: 700;
  font-style: normal;
  letter-spacing: 0.08em;
  color: var(--ink-2);
}
.quip-text { display: block; }
.result-facts {
  display: flex;
  gap: 8px;
  margin: 0 0 14px;
}
.fact {
  flex: 1;
  background: #fff;
  border-radius: var(--r-card);
  padding: 12px 8px;
  text-align: center;
}
.fact-num { display: block; font-size: 19px; font-weight: 800; }
.fact-label { display: block; font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.result-celebs {
  font-size: 14px;
  color: var(--ink-2);
  margin: 0 0 16px;
  text-align: left;
}
.result-celebs strong { color: var(--ink); font-weight: 600; }
.result-hangryeol { font-size: 14px; color: var(--ink-2); margin: 0 0 14px; text-align: left; }
.result-hangryeol strong { color: var(--ink); font-weight: 700; }

.saju-out { margin-top: 18px; }
.saju-out:empty { margin-top: 0; }
.saju-pillars { display: flex; gap: 8px; margin-bottom: 12px; }
.saju-pillar { flex: 1; background: #fff; border-radius: var(--r-card); padding: 10px 4px; text-align: center; }
.saju-pillar-label { display: block; font-size: 12px; color: var(--ink-2); margin-bottom: 4px; }
.saju-pillar-value { display: block; font-size: 15px; font-weight: 700; }
.saju-caveat { font-size: 13px; color: var(--ink-2); margin: 8px 0 14px; }
.saju-daymaster { font-size: 16px; margin: 0 0 16px; }
.saju-section { margin-bottom: 18px; }
.saju-section h3 { font-size: 16px; font-weight: 800; margin: 0 0 4px; }
.saju-section > p { font-size: 13px; color: var(--ink-2); margin: 0 0 10px; }
.saju-block { background: #fff; border-radius: var(--r-card); padding: 14px 16px; margin-bottom: 8px; text-align: left; }
.saju-block-title { font-size: 13px; font-weight: 700; color: var(--ink-2); margin: 0 0 6px; }
.saju-block p { font-size: 15px; line-height: 1.6; margin: 0; }
.saju-block ul { margin: 6px 0 0; padding-left: 18px; }
.saju-block li { font-size: 14px; line-height: 1.6; }
.result-share {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.btn--kakao {
  flex: 1.4;
  min-height: 52px;
  border: 0;
  border-radius: 999px;
  background: #fee500;
  color: #191919;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}
.kakao-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #191919;
  display: inline-block;
}
.btn--ghost {
  flex: 1;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
.result-cta {
  display: block;
  margin: 4px 0 14px;
  padding: 16px 20px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--r-card);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}
.result-caption {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.5;
  margin: 0 0 10px;
}
.retry-link {
  display: block;
  margin: 0 auto;
  background: none;
  border: 0;
  color: var(--ink-2);
  font: inherit;
  font-size: 14px;
  text-decoration: underline;
  cursor: pointer;
}

.quiz-note { font-size: 13px; line-height: 1.5; color: var(--ink-2); margin: 14px 0 0; }
.quiz-note a { color: inherit; text-decoration: underline; }
