/* 2027 정미년 사주: 색동 세계. 흰 바탕, 먹색 글씨, 채도는 색동 줄과 오행 칸에만.
   글은 Pretendard 하나로, 눈이 편하게(본문 17px, 넉넉한 줄 간격, 순검정보다 부드러운 글자색). */
:root {
  --ground: #ffffff;
  --ink: #1b1712;
  --ink-2: #3d3731;
  --ink-3: #6b6258;
  --text: #322c27;
  --line: #e4e4e0;
  --panel: #f3f3f1;

  /* 색동 줄 */
  --red: #d7372b;
  --yellow: #f2b51d;
  --green: #1f8a5b;
  --pink: #ec7aa0;
  --blue: #2f73c9;
  --indigo: #24346f;

  /* 오행 */
  --wood: var(--green);
  --fire: var(--red);
  --earth: var(--yellow);
  --metal: #ffffff;
  --water: var(--indigo);
  --wood-t: #e4f2ea;
  --fire-t: #fbe6e3;
  --earth-t: #fdf1cf;
  --metal-t: #f1f1ee;
  --water-t: #e3e7f3;

  /* 차트 색(색약 검사 통과: dataviz validate_palette) */
  --c-love: #ec7aa0;
  --c-money: #cf9a12;
  --c-work: #2f73c9;
  --c-health: #1f8a5b;
  --c-lucky: #d7372b;
  --c-caution: #4b5fa6;
  --c-normal: #a09f98;

  --hl: rgba(242, 181, 29, 0.3);
  --radius: 16px;
  --sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  --hanja: "Noto Serif KR", "Apple SD Gothic Neo", serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--ground); }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  word-break: keep-all;
  overflow-wrap: break-word;
}
::selection { background: var(--yellow); color: var(--ink); }
input { caret-color: var(--red); }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

#app { max-width: 440px; margin: 0 auto; padding: 0 20px; }
.screen { min-height: 100vh; min-height: 100dvh; }
.screen:not(.cover) { padding-bottom: max(28px, env(safe-area-inset-bottom)); }

/* 색동 줄: 온전한 줄 단위, 그라데이션 없음 */
.saekdong { display: flex; flex-direction: column; }
.saekdong i { display: block; height: 6px; }
.saekdong i:nth-child(7n+1) { background: var(--red); }
.saekdong i:nth-child(7n+2) { background: var(--yellow); }
.saekdong i:nth-child(7n+3) { background: var(--green); }
.saekdong i:nth-child(7n+4) { background: var(--pink); }
.saekdong i:nth-child(7n+5) { background: var(--blue); }
.saekdong i:nth-child(7n+6) { background: #fff; box-shadow: inset 0 1px 0 var(--line), inset 0 -1px 0 var(--line); }
.saekdong i:nth-child(7n+7) { background: var(--indigo); }

/* 버튼 */
.cta {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 58px; padding: 0 20px;
  border: 0; border-radius: var(--radius);
  background: var(--ink); color: #fff;
  font: 700 18px/1.2 var(--sans);
  cursor: pointer;
  box-shadow: 0 10px 24px -14px rgba(27, 23, 18, 0.7);
  transition: transform 0.12s, background 0.2s;
}
.cta:active { transform: scale(0.98); }
.cta:disabled { background: #d6d6d2; box-shadow: none; cursor: default; }
.ghost {
  min-height: 56px; padding: 0 18px;
  border: 1.5px solid var(--line); border-radius: var(--radius);
  background: #fff; font-weight: 700; font-size: 17px; cursor: pointer;
}
.ghost[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }

/* ───────── 표지 ───────── */
.bar { display: flex; align-items: baseline; justify-content: space-between; padding: max(18px, env(safe-area-inset-top)) 0 4px; }
.mark { font: 700 15px/1 var(--sans); }
.mark-sub { font: 900 15px/1 var(--hanja); color: var(--red); }

.cover { display: flex; flex-direction: column; min-height: 0; height: 100vh; height: 100dvh; height: var(--app-h, 100dvh); overflow: hidden; }
/* 표지에서는 스크롤 잠금(내장 브라우저에서 조금 밀리는 것 방지) */
html.lock, html.lock body { height: 100%; overflow: hidden; overscroll-behavior: none; }
.hero { position: relative; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; justify-content: center; margin: 6px -20px 0; }
.hero-sheep { flex: 0 1 auto; min-height: 0; max-height: calc(100% - 52px); width: auto; max-width: 84%; margin: 0 auto; object-fit: contain; position: relative; z-index: 1; }

.cover-title { flex: none; margin: 24px 0 0; font: 800 clamp(34px, 9.6vw, 40px)/1.22 var(--sans); letter-spacing: -0.035em; text-wrap: balance; }
.cover-actions { flex: none; display: grid; gap: 8px; margin: 22px 0 max(24px, env(safe-area-inset-bottom)); }
.cover-actions .ghost { width: 100%; }


.foot { margin-top: 28px; padding: 14px 0 6px; text-align: center; font-size: 13px; color: var(--ink-3); }

/* ───────── 질문 ───────── */
.step-bar { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: 44px 1fr; align-items: center; padding: max(8px, env(safe-area-inset-top)) 0 0; background: var(--ground); }
.back { width: 44px; height: 44px; display: grid; place-items: center; margin-left: -10px; border: 0; background: none; cursor: pointer; border-radius: 12px; }
.count { font: 600 14px/1 var(--sans); color: var(--ink-3); text-align: right; font-variant-numeric: tabular-nums; }
.progress { grid-column: 1 / -1; display: grid; grid-auto-rows: 5px; margin: 8px -20px 0; }
.progress i { display: block; position: relative; overflow: hidden; background: #fff; box-shadow: inset 0 -1px 0 var(--line); }
.progress i:first-child { box-shadow: inset 0 1px 0 var(--line), inset 0 -1px 0 var(--line); }
.progress i::after { content: ""; position: absolute; inset: 0; transform: translateX(-101%); transition: transform 0.55s var(--ease); }
.progress i:nth-child(1)::after { background: var(--red); }
.progress i:nth-child(2)::after { background: var(--yellow); }
.progress i:nth-child(3)::after { background: var(--green); }
.progress i:nth-child(4)::after { background: var(--pink); }
.progress i:nth-child(5)::after { background: var(--blue); }
.progress i.on::after { transform: none; }

.step { padding: 20px 0 0; animation: stepIn 0.45s var(--ease) both; }
@keyframes stepIn { from { opacity: 0.001; transform: translateX(14px); } }
.ask { display: grid; grid-template-columns: 50px 1fr; gap: 10px; align-items: end; margin-bottom: 18px; }
.guide { width: 50px; height: auto; margin-bottom: 2px; }
.q { margin: 0; font: 700 24px/1.35 var(--sans); letter-spacing: -0.025em; text-wrap: balance; }

.step input[type="text"] {
  width: 100%; height: 60px; padding: 0 18px;
  border: 2px solid var(--line); border-radius: var(--radius);
  background: #fff; color: var(--ink);
  font: 600 22px/1 var(--sans); letter-spacing: 0.01em;
  outline: none; transition: border-color 0.2s;
  font-variant-numeric: tabular-nums;
}
.step input[type="text"]::placeholder { color: var(--ink-3); font-weight: 500; }
.step input[type="text"]:focus { border-color: var(--ink); }
.step input[aria-invalid="true"] { border-color: var(--red); }
.hint { margin: 8px 2px 0; font-size: 15px; font-weight: 600; color: var(--red); }
.hint:empty { display: none; }
.step .cta { margin-top: 14px; }

.choices { display: grid; gap: 10px; }
.choices.two { grid-template-columns: 1fr 1fr; }
.choices.four { grid-template-columns: repeat(4, 1fr); }
.choices button {
  min-height: 70px; border: 2px solid var(--line); border-radius: var(--radius);
  background: #fff; font: 700 20px/1 var(--sans); cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
}
.choices button:active { transform: scale(0.97); }
.choices button[aria-checked="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.time-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.time-field { position: relative; display: flex; align-items: center; height: 60px; padding: 0 18px; border: 2px solid var(--line); border-radius: var(--radius); background: #fff; cursor: pointer; }
.time-field:focus-within { border-color: var(--ink); }
.time-value { font: 600 21px/1 var(--sans); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.time-field.set .time-value { color: var(--ink); }
.time-field input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; font-size: 16px; cursor: pointer; -webkit-appearance: none; appearance: none; }
.time-info { margin: 12px 0 0; padding: 12px 14px; border-radius: 14px; background: var(--panel); font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.consent { margin: 10px 0 0; text-align: center; font-size: 13px; color: var(--ink-3); }

/* 오행 칸(일주 두 글자) */
.tile {
  width: 100%; aspect-ratio: 1; max-width: var(--t, 52px);
  display: grid; place-items: center; align-content: center; border-radius: 12px;
  font: 900 calc(var(--t, 52px) * 0.5)/1 var(--hanja); color: #fff;
}
.tile small { display: block; margin-top: 3px; font: 700 10.5px/1 var(--sans); opacity: 0.92; text-align: center; }
.tile.el-earth, .tile.el-metal { color: var(--ink); }
.el-wood { background: var(--wood); }
.el-fire { background: var(--fire); }
.el-earth { background: var(--earth); }
.el-metal { background: var(--metal); }
.el-water { background: var(--water); }
.tile.el-metal, .band i.el-metal, .morph i.m-metal, .legend i.el-metal, .band-nums i.el-metal { box-shadow: inset 0 0 0 1.5px #b8b1a6; }

/* ───────── 펼치기 ───────── */
.reveal { display: grid; align-content: center; gap: 14px; padding: 40px 0; cursor: pointer; }
.reveal-title { margin: 0; text-align: center; font: 700 20px/1.4 var(--sans); letter-spacing: -0.02em; }
.morph { position: relative; height: 72px; margin: 0 -20px; }
.morph i { position: absolute; display: block; transition: left 0.9s var(--ease), top 0.9s var(--ease), width 0.9s var(--ease), height 0.9s var(--ease), background-color 0.9s var(--ease); }
.reveal .year-stripe { height: 10px; margin: -8px -20px 0; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform 0.7s var(--ease); }
.legend { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-top: 8px; }
.legend span { display: grid; gap: 2px; text-align: center; font-size: 14px; color: var(--ink-3); }
.legend i { display: block; height: 4px; border-radius: 2px; margin-bottom: 4px; }
.legend b { font: 700 18px/1 var(--sans); color: var(--ink); font-variant-numeric: tabular-nums; }
.reveal .legend { opacity: 0; transition: opacity 0.5s; }
.reveal.on-1 .year-stripe { transform: none; }
.reveal.on-1 .legend { opacity: 1; }
.reveal-art { display: grid; justify-items: center; gap: 2px; margin-top: 8px; opacity: 0; transform: translateY(14px); transition: opacity 0.6s, transform 0.7s var(--ease); }
.reveal.on-2 .reveal-art { opacity: 1; transform: none; }
.reveal-art img { width: 150px; height: 150px; }
.reveal-art p { margin: 0; }
.reveal-art b { font: 800 28px/1.2 var(--sans); letter-spacing: -0.03em; }

/* ───────── 결과 카드 ───────── */
.r-top { display: flex; justify-content: space-between; align-items: center; padding: max(16px, env(safe-area-inset-top)) 0 10px; }
.r-top .mark { color: var(--ink-2); }

.id-card { position: relative; border-radius: 16px; overflow: hidden; background: #fff; border: 1.5px solid var(--line); }
.art-wrap { display: grid; place-items: center; background: var(--tint, var(--panel)); }
.art-wrap .art { width: 52%; margin: 12px auto 6px; mix-blend-mode: multiply; }
.id-card .art-tiles { --t: 88px; display: flex; justify-content: center; gap: 10px; width: auto; margin: 0; padding: 24px 0 20px; mix-blend-mode: normal; }
.band { display: flex; height: 18px; overflow: hidden; background: var(--panel); }
.band i { display: block; min-width: 0; }
.band.mini { height: 10px; border-radius: 4px; }
.id-card .year-stripe { height: 7px; background: var(--red); }
.id-body { padding: 16px 18px 16px; }
.id-who { margin: 0; font-size: 15px; font-weight: 600; color: var(--ink-3); }
.id-name { margin: 2px 0 0; font: 800 30px/1.25 var(--sans); letter-spacing: -0.035em; }
.id-meta { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; font-size: 15px; color: var(--ink-2); }
.mini-tiles { display: inline-flex; gap: 3px; --t: 28px; }
.mini-tiles .tile { width: 28px; border-radius: 7px; }
.mini-tiles .tile small { display: none; }

.score { margin: 0; font: 800 44px/1 var(--sans); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.score small { font: 600 15px/1 var(--sans); color: var(--ink-3); letter-spacing: 0; margin-left: 2px; }
.score-line { margin: 4px 0 0; font-size: 16px; line-height: 1.5; font-weight: 600; color: var(--ink); text-wrap: pretty; }
.grade { display: inline-block; padding: 3px 9px; border-radius: 99px; font: 700 13px/1.3 var(--sans); color: #fff; background: var(--ink-2); }
.g-great, .g-good { background: var(--red); }
.g-care, .g-caution { background: var(--indigo); }


.rise { animation: rise 0.8s var(--ease) both; }
@keyframes rise { from { opacity: 0.001; transform: translateY(26px); } }

/* ───────── 읽기: 위에서 아래로 죽 읽는 풀이 ───────── */
.reading { margin-top: 10px; }
.sec { padding: 28px 0 4px; border-top: 1px solid var(--line); }
.sec:first-child { border-top: 0; }
.sec-h { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; margin: 0 0 12px; font: 700 21px/1.35 var(--sans); letter-spacing: -0.025em; color: var(--ink); }
.sec-h i { flex: none; width: 18px; height: 5px; border-radius: 2px; }
.sec-meta { font-size: 14.5px; font-weight: 600; letter-spacing: 0; color: var(--ink-3); }
.sec p { margin: 0 0 14px; font-size: 17px; line-height: 1.85; color: var(--text); text-wrap: pretty; }
.sec p b { color: var(--ink); font-weight: 700; }
.sec .aside { font-size: 15px; line-height: 1.7; color: var(--ink-3); }
.hl { font-weight: 700; color: var(--ink); background: linear-gradient(transparent 62%, var(--hl) 62%); padding: 0 1px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }


.notes { margin: 18px 0 0; padding: 14px 16px; border-radius: 14px; background: var(--panel); }
.notes p { margin: 0 0 6px; font-size: 14.5px; line-height: 1.65; color: var(--ink-3); }
.notes p:last-child { margin: 0; }
.end { margin: 28px 0 0; }
.end .ghost { width: 100%; margin-top: 8px; }

.toast { position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; padding: 12px 18px; border-radius: 99px; background: var(--ink); color: #fff; font-size: 15px; font-weight: 700; pointer-events: none; transition: opacity 0.25s, transform 0.35s var(--ease); z-index: 20; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; animation-delay: 0s !important; transition-duration: 0.001s !important; }
}

/* 아이콘 동그라미 */
.ico { display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--c); color: #fff; }
.ico svg { width: 18px; height: 18px; }
.ico.dark { color: var(--ink); }
.sec-h .ico { width: 32px; height: 32px; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 99px; font: 700 13px/1.35 var(--sans); letter-spacing: 0; color: #fff; background: var(--ink-2); }
.pill.g-great, .pill.g-good { background: var(--red); }
.pill.g-care, .pill.g-caution { background: var(--indigo); }

/* 열 칸 눈금 막대: 한 칸 10점, 점수만큼 찬다 */
.seg { display: grid; grid-template-columns: repeat(10, 1fr); gap: 2px; height: 12px; }
.seg i { display: block; border-radius: 2px; background: linear-gradient(90deg, var(--c) 0 calc(var(--f) * 100%), var(--panel) 0); }

/* 카드 점수 */
.score-block { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
.score-top { display: flex; align-items: center; gap: 12px; }
.score { font-variant-numeric: normal; }
.score-block .seg { height: 14px; margin: 12px 0 0; }
.score-block .score-line { margin: 10px 0 0; }

/* 2027 분야별 운 한눈에 */
.glance { margin: 14px 0 0; padding: 14px 16px 8px; border-radius: 16px; background: #fff; border: 1.5px solid var(--line); }
.glance-h { margin: 0 0 6px; font: 700 17px/1.35 var(--sans); letter-spacing: -0.02em; }
.g-row { display: grid; grid-template-columns: 34px 76px 1fr 32px; gap: 10px; align-items: center; width: 100%; padding: 8px 0; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; cursor: pointer; }
.g-row:first-of-type { border-top: 0; }
.g-label { font-size: 15.5px; font-weight: 700; color: var(--ink); }
.g-score { font: 700 18px/1 var(--sans); text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }
.sec-h { scroll-margin-top: 16px; }

/* 달별 운세: 열두 달 운의 흐름(선 그래프) */
.flow { margin: 4px 0 0; touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: pointer; }
.flow-svg { display: block; width: 100%; height: auto; overflow: visible; }
.flow-base { stroke: #d6d6d1; stroke-width: 1; }
.flow-area { fill: rgba(215, 55, 43, 0.08); }
.flow-line { fill: none; stroke: var(--ink-2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.flow-guide { stroke: var(--ink-3); stroke-width: 1; }
.flow-dot { stroke: #fff; stroke-width: 2; fill: var(--c-normal); }
.flow-dot.k-lucky { fill: var(--c-lucky); }
.flow-dot.k-caution { fill: var(--c-caution); }
.flow-dot.on { stroke: var(--ink); stroke-width: 2.5; }
.flow-val { font: 700 13px var(--sans); fill: var(--ink); }
.flow-axis { display: grid; grid-template-columns: repeat(12, 1fr); }
.flow-axis button { height: 34px; padding: 0; border: 0; background: none; font: 600 12.5px/1 var(--sans); color: var(--ink-3); cursor: pointer; font-variant-numeric: tabular-nums; }
.flow-axis button[aria-pressed="true"] { color: var(--ink); font-weight: 800; }
.mlegend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 10px 0 0 !important; font-size: 13.5px !important; color: var(--ink-3) !important; }
.mlegend span { display: inline-flex; align-items: center; gap: 5px; }
.mlegend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.k-lucky { background: var(--c-lucky); }
.k-caution { background: var(--c-caution); }
.k-normal { background: var(--c-normal); }
.mpanels { margin: 10px 0 8px; touch-action: pan-y; }
.mp { display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: center; padding: 14px; border-radius: 16px; background: var(--panel); animation: mpIn 0.35s var(--ease); }
.mp.m-lucky { background: var(--fire-t); }
.mp.m-caution { background: var(--water-t); }
.mp img { width: 72px; height: 72px; mix-blend-mode: multiply; }
.mp .mp-head { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; }
.mp-head b { font-size: 20px; font-weight: 800; color: var(--ink); }
.mp-kind { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; color: var(--ink-2); }
.mp-kind i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.mp-score { margin-left: auto; font-weight: 700; color: var(--ink); }
.mp .mp-sub { margin: 2px 0 6px; font-size: 13.5px; color: var(--ink-3); }
.mp .mp-text { margin: 0; font-size: 16px; line-height: 1.6; color: var(--text); }
@keyframes mpIn { from { opacity: 0.001; transform: translateX(10px); } }

/* 오행 그림 줄 */
.el-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin: 14px 0 0; }
.el { display: grid; justify-items: center; gap: 2px; text-align: center; }
.el img { width: 40px; height: 40px; }
.el b { font: 700 16px/1.1 var(--sans); color: var(--ink); font-variant-numeric: tabular-nums; }
.el small { font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.reveal .el img { width: 48px; height: 48px; }
.reveal .el b { font-size: 18px; }

/* 지난 결과 */
.saved-title { margin: 18px 0 14px; }
.saved-list { list-style: none; margin: 0 0 16px; padding: 0; }
.saved-list li { display: grid; grid-template-columns: 1fr 44px; align-items: center; border-bottom: 1px solid var(--line); }
.saved-item { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center; padding: 10px 0; border: 0; background: none; text-align: left; cursor: pointer; }
.saved-item img { width: 56px; height: 56px; }
.saved-item b { font-size: 17px; font-weight: 700; color: var(--ink); margin-right: 4px; }
.saved-item span { font-size: 15px; color: var(--ink-2); }
.saved-item small { display: block; margin-top: 2px; font-size: 13.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.saved-del { display: grid; place-items: center; width: 44px; height: 44px; border: 0; background: none; color: var(--ink-3); cursor: pointer; border-radius: 12px; }

/* 타고난 성향: 내 일간 그림 */
.me-hero { display: grid; grid-template-columns: 112px 1fr; gap: 14px; align-items: center; margin: 2px 0 16px; padding: 12px 14px; border-radius: 16px; background: var(--panel); }
.me-hero img { width: 112px; height: 112px; mix-blend-mode: multiply; }
.me-hero p { margin: 0; }
.sec .me-hero .me-k { font-size: 14px; line-height: 1.4; color: var(--ink-3); }
.me-k .hj { font-family: var(--hanja); font-weight: 900; color: var(--ink); margin-left: 2px; }
.sec .me-hero .me-t { margin-top: 2px; font-size: 22px; line-height: 1.3; font-weight: 800; letter-spacing: -0.03em; color: var(--ink); }

/* 타고난 성향: 잘 맞는·부딪히는 상징 */
.match { display: grid; gap: 14px; margin: 18px 0 16px; }
.sec .match-k { margin: 0 0 8px; font-size: 14.5px; line-height: 1.4; font-weight: 700; color: var(--ink-3); }
.sym-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sym-list li { display: grid; justify-items: center; align-content: start; gap: 4px; padding: 10px 6px 12px; border-radius: 14px; background: var(--panel); text-align: center; font-size: 13.5px; line-height: 1.35; font-weight: 600; color: var(--ink-2); word-break: keep-all; }
.sym-list img { width: 64px; height: 64px; mix-blend-mode: multiply; }

/* 결과 끝: 궁합으로 */
.pair-cta { margin: 28px 0 0; padding: 18px 16px 16px; border-radius: 16px; background: var(--panel); text-align: center; }
.pair-cta-h { margin: 0 0 12px; font: 700 19px/1.35 var(--sans); letter-spacing: -0.02em; color: var(--ink); }

/* 궁합 결과 */
.pair-art { position: relative; display: grid; grid-template-columns: 1fr 1fr; }
.pp { margin: 0; display: grid; justify-items: center; align-content: start; padding: 18px 8px 14px; background: var(--tint, var(--panel)); }
.pp img { width: 68%; max-width: 128px; mix-blend-mode: multiply; }
.pp figcaption { margin-top: 6px; text-align: center; word-break: keep-all; }
.pp figcaption b { display: block; font: 800 19px/1.3 var(--sans); letter-spacing: -0.03em; color: var(--ink); }
.pp figcaption small { display: block; margin-top: 2px; font-size: 13.5px; line-height: 1.35; font-weight: 600; color: var(--ink-2); }
.pair-mid { position: absolute; left: 50%; top: 38%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #fff; color: var(--red); box-shadow: 0 2px 8px rgba(40, 30, 20, 0.12); }
.pc-name { margin: 0; font: 800 22px/1.3 var(--sans); letter-spacing: -0.03em; word-break: keep-all; }
.give { margin: 16px 0 0; padding: 14px 16px 16px; border-radius: 16px; background: var(--panel); }
.sec .give-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 0 0 8px; font-size: 16px; line-height: 1.45; color: var(--ink-2); word-break: keep-all; }
.give-h b { color: var(--ink); }
.give-n { flex: none; font: 700 18px/1 var(--sans); font-variant-numeric: tabular-nums; }
.give .seg { height: 10px; }
.give-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.give-list li { display: grid; grid-template-columns: 36px 1fr; gap: 10px; align-items: center; font-size: 16px; line-height: 1.5; color: var(--text); word-break: keep-all; }
.give-list img, .give-list i { width: 36px; height: 36px; mix-blend-mode: multiply; }
.sec .give-k { margin: 14px 0 0; font-size: 14px; line-height: 1.4; font-weight: 700; color: var(--ink-3); }
.avoid { margin: 0 0 6px; }
.sec .avoid-s { margin: 0 0 4px; font-size: 17px; line-height: 1.5; font-weight: 700; color: var(--ink); }
.tti-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 14px; }
.tti { display: grid; grid-template-columns: 48px 1fr; column-gap: 10px; align-items: center; padding: 8px 12px 8px 8px; border-radius: 14px; background: var(--panel); }
.tti img { grid-row: span 2; width: 48px; height: 48px; mix-blend-mode: multiply; }
.tti b { font-size: 15.5px; line-height: 1.3; color: var(--ink); }
.tti small { font-size: 14px; line-height: 1.3; color: var(--ink-3); }

/* 지난 결과: 궁합 */
.saved-sub { margin: 22px 0 4px; font: 700 15px/1.3 var(--sans); color: var(--ink-3); }
.saved-item.pair { grid-template-columns: 72px 1fr; }
.pair-imgs { display: flex; }
.saved-item .pair-imgs img { width: 40px; height: 40px; mix-blend-mode: multiply; }
.pair-imgs img + img { margin-left: -8px; }

/* 공유 */
.share { margin: 28px 0 0; }
.share-h { margin: 0 0 10px; font: 700 19px/1.35 var(--sans); letter-spacing: -0.02em; color: var(--ink); text-align: center; }
.share-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 8px; }
.sh { display: grid; justify-items: center; gap: 6px; padding: 8px 4px 10px; border: 0; border-radius: 14px; background: none; font: 600 13.5px/1.3 var(--sans); color: var(--ink-2); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.sh-i { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--panel); color: var(--ink); transition: transform 0.15s var(--ease); }
.sh-i svg { width: 22px; height: 22px; }
.sh:active .sh-i { transform: scale(0.94); }
.sh:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
