/* ==========================================================
   색·글꼴·크기는 아래 변수만 바꾸면 전체에 적용됩니다.
   ========================================================== */
:root {
  --ivory: #F4F0E6;   /* 바탕 */
  --ink: #1E2320;     /* 본문 */
  --moss: #4F5A45;    /* 보조 */
  --bronze: #86572A;  /* 강조 (화면당 한 곳) */
  --line: #CFC8B8;    /* 헤어라인 */
  --line-soft: #E2DCCD;
  --area: #C6CCBA;    /* 그래프 면 */
  --error: #8C2F1B;

  --serif: "Noto Serif KR", "Nanum Myeongjo", "Apple SD Gothic Neo", serif;
  --sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;

  --fs-s: 14px;       /* 보조 */
  --fs-m: 17px;       /* 본문 */
  --fs-l: 27px;       /* 제목 */
  --fs-figure: clamp(76px, 24vw, 132px); /* 결과 숫자 */

  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ivory); color: var(--ink);
  font-family: var(--sans); font-size: var(--fs-m); line-height: 1.65;
  word-break: keep-all; overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
p, h1, h2, ol, ul, dl, dd, figure, fieldset { margin: 0; padding: 0; }
fieldset { border: 0; min-width: 0; }
ol, ul { list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; border-radius: 0; -webkit-tap-highlight-color: transparent; }
input { font: inherit; color: inherit; border-radius: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

.wrap { width: 100%; max-width: 600px; margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--ivory); padding: 8px 12px; font-size: var(--fs-s); z-index: 9; }
.skip:focus { left: 8px; top: 8px; }

/* ---------- 상단 ---------- */
.top { position: sticky; top: 0; z-index: 5; background: var(--ivory); padding-top: 18px; }
.top-in { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 12px; }
.brand { font-family: var(--serif); font-weight: 500; font-size: var(--fs-s); letter-spacing: .14em; }
.prog { font-size: var(--fs-s); color: var(--moss); font-variant-numeric: tabular-nums; letter-spacing: .08em; }
.prog span { color: var(--ink); font-weight: 600; }
.prog i { font-style: normal; margin: 0 5px; }
.bar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.bar span { height: 1px; background: var(--line); position: relative; }
.bar span::after { content: ""; position: absolute; inset: 0; background: var(--ink); height: 1px; transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease); }
.bar span.on::after { transform: scaleX(1); }

/* ---------- 단계 공통 ---------- */
.step { padding: 44px 0 56px; animation: enter .55s var(--ease) both; }
@keyframes enter { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.eyebrow, .k { font-size: var(--fs-s); letter-spacing: .16em; color: var(--moss); text-transform: uppercase; }
.title { font-family: var(--serif); font-weight: 500; font-size: var(--fs-l); line-height: 1.5; letter-spacing: -.01em; margin-top: 16px; }
.title.sm { font-size: var(--fs-m); font-family: var(--sans); font-weight: 600; margin-top: 22px; letter-spacing: 0; }
.title em { font-style: normal; font-weight: 700; color: var(--bronze); white-space: nowrap; }
.lead { margin-top: 16px; color: var(--moss); }

/* ---------- 입력 ---------- */
form { margin-top: 36px; }
.q { position: relative; padding: 26px 0 22px 44px; border-top: 1px solid var(--line); }
.q.tight { padding: 16px 0 12px; }
.q:last-of-type { border-bottom: 1px solid var(--line); }
.q .no { position: absolute; left: 0; top: 29px; font-family: var(--serif); font-size: var(--fs-s); color: var(--moss); letter-spacing: .06em; }
.q > label, .q > legend { display: block; font-weight: 600; padding: 0; }
.q > legend { float: left; width: 100%; }
.q > legend + * { clear: both; }
.q .sub { display: block; font-size: var(--fs-s); color: var(--moss); margin-top: 14px; }
.hint { font-size: var(--fs-s); color: var(--moss); margin-top: 4px; }
.note { font-size: var(--fs-s); color: var(--moss); margin-top: 14px; }
.note a, .terms a, .foot a { text-underline-offset: 4px; text-decoration-thickness: 1px; }

.field { display: flex; align-items: baseline; gap: 8px; margin-top: 8px; border-bottom: 1px solid var(--ink); transition: border-color .2s; }
.field input { flex: 1; min-width: 0; width: 100%; border: 0; background: transparent; padding: 8px 0 8px; font-family: var(--serif); font-weight: 500; font-size: var(--fs-l); line-height: 1.3; font-variant-numeric: tabular-nums; }
.field input::placeholder { color: var(--line); }
.field input:focus { outline: none; }
.field:focus-within { box-shadow: 0 1px 0 0 var(--ink); }
.field .unit { font-size: var(--fs-s); color: var(--moss); flex: none; }
.q.tight .field input { font-family: var(--sans); font-size: var(--fs-m); font-weight: 500; padding: 10px 0; }
.field.bad { border-bottom-color: var(--error); box-shadow: 0 1px 0 0 var(--error); }
.err { font-size: var(--fs-s); color: var(--error); min-height: 0; }
.err:not(:empty) { margin-top: 8px; }
.form-err:not(:empty) { margin-top: 16px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }

/* 선택지: 글자와 헤어라인 */
.pick { display: grid; grid-template-columns: 1fr 1fr; margin-top: 14px; border-top: 1px solid var(--line-soft); }
.pick.three { grid-template-columns: repeat(3, 1fr); }
.pick.four { grid-template-columns: repeat(2, 1fr); }
.pick label { position: relative; cursor: pointer; }
.pick input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.pick span { display: block; padding: 13px 2px 12px; font-size: var(--fs-s); color: var(--moss); border-bottom: 1px solid var(--line-soft); transition: color .2s, border-color .2s; }
.pick span::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 10px; border: 1px solid var(--moss); transform: rotate(45deg) translateY(-1px); transition: background .2s; }
.pick input:checked + span { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); box-shadow: 0 1px 0 0 var(--ink); }
.pick input:checked + span::before { background: var(--ink); border-color: var(--ink); }
.pick input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---------- 버튼 ---------- */
.cta { display: flex; align-items: center; justify-content: space-between; gap: 20px; width: 100%; margin-top: 36px; padding: 22px 22px 22px 24px; background: var(--ink); color: var(--ivory); font-family: var(--serif); font-weight: 500; font-size: var(--fs-m); letter-spacing: .02em; text-align: left; transition: background .25s; }
.cta:hover { background: #000; }
.cta[disabled] { opacity: .55; cursor: default; }
.arrow { position: relative; flex: none; width: 44px; height: 1px; background: currentColor; transition: width .35s var(--ease); }
.arrow::after { content: ""; position: absolute; right: 0; top: -4px; width: 9px; height: 9px; border-top: 1px solid currentColor; border-right: 1px solid currentColor; transform: rotate(45deg); transform-origin: center; }
.cta:hover .arrow, .rowlink:hover .arrow { width: 64px; }
.cta.accent .arrow { color: #D9A56B; }
.rowlink { display: flex; align-items: center; justify-content: space-between; gap: 20px; width: 100%; padding: 18px 2px; border-bottom: 1px solid var(--line); text-decoration: none; font-size: var(--fs-m); text-align: left; }
.rowlink .arrow { width: 28px; color: var(--moss); }
.textlink { display: inline-block; margin-top: 22px; font-size: var(--fs-s); color: var(--moss); text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; padding: 6px 0; }

/* ---------- 결과 ---------- */
.figure { display: flex; align-items: baseline; gap: 10px; margin-top: 2px; color: var(--bronze); line-height: 1.05; }
.figure b { font-family: var(--serif); font-weight: 500; font-size: var(--fs-figure); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.figure span { font-family: var(--serif); font-size: var(--fs-l); }
.figure.none b { font-size: var(--fs-l); letter-spacing: 0; line-height: 1.5; }
.rows { margin-top: 30px; border-top: 1px solid var(--ink); }
.rows div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.rows dt { color: var(--moss); font-size: var(--fs-s); }
.rows dt small { display: block; font-size: var(--fs-s); opacity: .85; }
.rows dd { font-family: var(--serif); font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rows dd small { font-family: var(--sans); font-size: var(--fs-s); color: var(--moss); margin-left: 3px; }

.chart { margin-top: 44px; }
.chart figcaption { display: flex; justify-content: space-between; align-items: baseline; font-weight: 600; padding-bottom: 12px; border-bottom: 1px solid var(--ink); }
.chart figcaption span { font-weight: 400; font-size: var(--fs-s); color: var(--moss); }
.pchart { margin-top: 18px; }
.pchart svg { display: block; width: 100%; height: auto; overflow: visible; }
.pchart text { font-family: var(--sans); font-size: 12px; fill: var(--moss); }
.pchart text.strong { fill: var(--ink); font-weight: 600; }
.pchart text.halo { paint-order: stroke; stroke: var(--ivory); stroke-width: 5px; stroke-linejoin: round; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 12px; font-size: var(--fs-s); color: var(--moss); }
.legend li { display: flex; align-items: center; gap: 8px; }
.sw { display: inline-block; width: 18px; height: 10px; }
.sw.area { background: var(--area); }
.sw.line { height: 0; border-top: 1px dashed var(--ink); }
.sw.hatch { background: repeating-linear-gradient(135deg, var(--ink) 0 1px, transparent 1px 5px); }

.assume { margin-top: 40px; }
.assume ul { margin-top: 10px; border-top: 1px solid var(--line); }
.assume li { padding: 11px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-s); display: flex; justify-content: space-between; gap: 16px; }
.assume li b { font-weight: 600; white-space: nowrap; }
.assume li.wide { display: block; color: var(--moss); }
.notice { margin-top: 26px; font-size: var(--fs-s); padding-left: 14px; border-left: 1px solid var(--ink); }
.notice.quiet { margin-top: 12px; color: var(--moss); border-left-color: var(--line); }

/* ---------- 3단계 ---------- */
.block { margin-top: 30px; }
.lines { margin-top: 10px; border-top: 1px solid var(--ink); counter-reset: n; }
.lines li { counter-increment: n; position: relative; padding: 10px 0 10px 40px; border-bottom: 1px solid var(--line); }
.lines li::before { content: counter(n, decimal-leading-zero); position: absolute; left: 0; top: 13px; font-family: var(--serif); font-size: var(--fs-s); color: var(--moss); }
.flow { margin-top: 10px; display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--ink); counter-reset: f; }
.flow li { counter-increment: f; padding: 10px 8px 10px 0; border-bottom: 1px solid var(--line); font-weight: 600; }
.flow li::before { content: counter(f); display: block; font-family: var(--serif); font-weight: 500; font-size: var(--fs-s); color: var(--moss); }
.meta { margin-top: 12px; font-size: var(--fs-s); color: var(--moss); }
.meta.who { margin-top: 4px; }
.meta span { color: var(--ink); }

.apply { margin-top: 34px; padding-top: 24px; border-top: 1px solid var(--ink); }
.apply .k { margin-bottom: 10px; color: var(--ink); font-weight: 600; }
.apply .q.tight:first-of-type { border-top: 0; padding-top: 10px; }
.apply .q:last-of-type { border-bottom: 0; }
.checks { margin-top: 6px; border-top: 1px solid var(--line); padding-top: 8px; }
.check { display: flex; gap: 14px; align-items: flex-start; padding: 9px 0; cursor: pointer; }
.check input { appearance: none; -webkit-appearance: none; flex: none; width: 20px; height: 20px; margin: 3px 0 0; border: 1px solid var(--ink); background: transparent; position: relative; cursor: pointer; }
.check input::after { content: ""; position: absolute; inset: 4px; background: var(--ink); transform: scale(0); transition: transform .18s var(--ease); }
.check input:checked::after { transform: scale(1); }
.check small { font-size: var(--fs-s); color: var(--moss); }
.check small.blk { display: block; }
.terms { margin: 0 0 4px 34px; font-size: var(--fs-s); }
.terms summary { cursor: pointer; color: var(--moss); text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; list-style: none; padding: 4px 0; display: inline-block; }
.terms summary::-webkit-details-marker { display: none; }
.terms dl { margin-top: 10px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 76px 1fr; }
.terms dt, .terms dd { padding: 9px 0; border-bottom: 1px solid var(--line); }
.terms dt { color: var(--moss); }
.terms p { margin-top: 10px; color: var(--moss); }
#e-agree { margin-left: 34px; }
.fail { margin-top: 22px; padding: 16px 0 6px 14px; border-left: 1px solid var(--error); font-size: var(--fs-s); }
.fail .textlink { margin-top: 6px; color: var(--ink); }
.aux { margin-top: 24px; border-top: 1px solid var(--line); }
.toast { font-size: var(--fs-s); color: var(--moss); }
.toast:not(:empty) { padding-top: 12px; }

/* ---------- 완료 ---------- */
.next { margin: 30px 0 28px; border-top: 1px solid var(--ink); }
.next li { display: flex; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.next .no { flex: none; white-space: nowrap; font-family: var(--serif); font-size: var(--fs-s); color: var(--bronze); padding-top: 3px; letter-spacing: .06em; }
.next b { font-weight: 600; }
.next p { font-size: var(--fs-s); color: var(--moss); margin-top: 4px; }
.next a { color: var(--ink); text-underline-offset: 4px; text-decoration-thickness: 1px; }

.foot { padding-top: 22px; padding-bottom: 44px; font-size: var(--fs-s); color: var(--moss); }
.foot p { border-top: 1px solid var(--line); padding-top: 14px; }
.foot p + p { border: 0; padding-top: 6px; }

/* ---------- 어두운 머리 패널과 HTML 그래픽 ---------- */
:root { --bronze-light: #D9A56B; --ivory-dim: #C9C3B4; --pv: #9FA890; }
body { overflow-x: clip; }
.step.has-hero { padding-top: 0; }
.hero { background: var(--ink); color: var(--ivory); margin-inline: calc(50% - 50vw); padding: 44px calc(50vw - 50%) 38px; }
.hero.slim { padding-bottom: 34px; }
.hero .eyebrow, .hero .lead { color: var(--ivory-dim); }
.hero .title em { color: var(--bronze-light); }
.hero .figure { color: var(--bronze-light); margin-top: 6px; }
.hero :focus-visible { outline-color: var(--ivory); }
.hero + * { margin-top: 36px; }
.hero + form { margin-top: 12px; }
.hero + form .q:first-child { border-top: 0; }

.hero-art { display: block; width: 100%; max-width: 540px; margin: 30px 0 6px; overflow: visible; }
.hero-art text { font-family: var(--sans); font-size: 10.5px; fill: var(--ivory-dim); }
.hero-art text.em { fill: var(--bronze-light); font-weight: 600; paint-order: stroke; stroke: var(--ink); stroke-width: 4px; stroke-linejoin: round; }
.ha-axis { stroke: var(--ivory-dim); stroke-width: .7; }
.ha-guide { stroke: var(--ivory-dim); stroke-width: .5; stroke-dasharray: 1.5 3; }
.ha-target { stroke: var(--ivory); stroke-width: .8; stroke-dasharray: 3 3; fill: none; }
.ha-line { stroke: var(--ivory); stroke-width: 1.5; fill: none; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.7s var(--ease) .25s forwards; }
.ha-dot { fill: var(--ivory); }
.ha-hatch { opacity: 0; animation: fade .9s ease 1.4s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }

.cover { margin-top: 30px; padding-top: 20px; border-top: 1px solid #4A504A; }
.cover-h { display: flex; justify-content: space-between; align-items: baseline; font-size: var(--fs-s); color: var(--ivory-dim); }
.cover-h b { font-family: var(--serif); font-weight: 500; font-size: var(--fs-m); color: var(--ivory); }
.track { display: flex; height: 14px; margin-top: 12px; outline: 1px solid var(--ivory-dim); outline-offset: 3px; }
.track i { display: block; height: 100%; width: 0; transition: width 1.1s var(--ease); }
.track .np { background: var(--ivory); }
.track .pv { background: var(--pv); }
.track .sh { background: repeating-linear-gradient(135deg, var(--ivory-dim) 0 1px, transparent 1px 5px); }
.cover ul { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 16px; font-size: var(--fs-s); color: var(--ivory-dim); }
.cover li { display: flex; align-items: center; gap: 8px; }
.cover li b { color: var(--ivory); font-weight: 600; }
.cover li i { width: 10px; height: 10px; display: inline-block; }
.cover li i.np { background: var(--ivory); } .cover li i.pv { background: var(--pv); }
.cover li i.sh { background: repeating-linear-gradient(135deg, var(--ivory-dim) 0 1px, transparent 1px 4px); outline: 1px solid var(--ivory-dim); }

.sw.np { background: var(--moss); }
.pchart text.inv { fill: var(--ivory); font-weight: 600; }
.pchart text.tiny { font-size: 11px; }

@media (prefers-reduced-motion: reduce) {
  .ha-line { stroke-dashoffset: 0; }
  .ha-hatch { opacity: 1; }
}

/* ---------- 이미지 배경 (assets 폴더) ---------- */
:root { --panel: #151B18; }
.hero { position: relative; isolation: isolate; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--ink) center / cover no-repeat; transform-origin: 70% 40%; animation: drift 16s ease-out both; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; }
@keyframes drift { from { transform: scale(1.12); } to { transform: scale(1); } }
#step1 .hero::before { background-image: url(../assets/hero.webp); background-position: 88% 50%; }
#step1 .hero::after { background: linear-gradient(100deg, rgba(21,27,24,.95) 0%, rgba(21,27,24,.78) 50%, rgba(21,27,24,.28) 100%); }
#step2 .hero::before { background-image: url(../assets/texture.webp); }
#step2 .hero::after { background: linear-gradient(180deg, rgba(21,27,24,.62), rgba(21,27,24,.8)); }
#step3 .hero::before { background-image: url(../assets/report.webp); background-position: 60% 40%; }
#step3 .hero::after { background: linear-gradient(100deg, rgba(21,27,24,.95) 0%, rgba(21,27,24,.82) 55%, rgba(21,27,24,.5) 100%); }
#stepDone .hero::before { background-image: url(../assets/done.webp); }
#stepDone .hero::after { background: linear-gradient(100deg, rgba(21,27,24,.94) 0%, rgba(21,27,24,.74) 55%, rgba(21,27,24,.35) 100%); }
#step3 .hero.slim, #stepDone .hero.slim { padding-top: 64px; padding-bottom: 52px; }

/* ---------- 아이콘 타일 ---------- */
.bento { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.tile { background: var(--panel); color: var(--ivory); border-radius: 18px; padding: 10px 14px 16px; overflow: hidden; }
.tile img, .strip img { display: block; object-fit: cover; -webkit-mask-image: radial-gradient(closest-side, #000 58%, transparent 100%); mask-image: radial-gradient(closest-side, #000 58%, transparent 100%); }
.tile img { width: 108px; height: 108px; margin: 0 auto; transition: transform .6s var(--ease); }
.tile:hover img { transform: scale(1.06) rotate(-2deg); }
.tile .n { font-family: var(--serif); font-size: var(--fs-s); color: var(--bronze-light); letter-spacing: .06em; }
.tile p { font-size: var(--fs-s); line-height: 1.5; margin-top: 2px; }
.strip { margin-top: 12px; background: var(--panel); color: var(--ivory); border-radius: 18px; padding: 4px 16px 4px 8px; }
.strip li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #2B322D; }
.strip li:last-child { border-bottom: 0; }
.strip img { width: 72px; height: 72px; flex: none; }
.strip p { font-size: var(--fs-s); line-height: 1.5; }

/* ---------- 어두운 그래프 패널 ---------- */
.chart {
  --ink: #F4F0E6; --ivory: #161C19; --moss: #D3DAC4; --area: #7E8972; --line-soft: #333A34; --accent-chart: var(--bronze-light);
  color: #F4F0E6; margin-inline: calc(50% - 50vw); padding: 44px calc(50vw - 50%) 40px;
  background: linear-gradient(rgba(21,27,24,.66), rgba(21,27,24,.82)), #161C19 url(../assets/texture.webp) center / cover no-repeat;
}
.chart figcaption span, .chart .legend { color: #C9C3B4; }
.pchart text.acc { fill: var(--accent-chart, var(--ink)); }
.chart + .assume { margin-top: 36px; }

/* ---------- 단계 전환과 스크롤 등장 ---------- */
::view-transition-old(root) { animation: vt-out .3s ease both; }
::view-transition-new(root) { animation: vt-in .75s var(--ease) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-14px); } }
@keyframes vt-in { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
.rv [data-rv] { opacity: 0; transform: translateY(20px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.rv [data-rv].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .hero::before { transform: none; }
  .rv [data-rv] { opacity: 1; transform: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* ---------- 넓은 화면 ---------- */
@media (min-width: 720px) {
  :root { --fs-m: 18px; --fs-l: 34px; --fs-s: 15px; }
  .wrap { max-width: 680px; padding: 0 32px; }
  .top { padding-top: 28px; }
  .step { padding: 80px 0 88px; }
  .hero { padding-top: 72px; padding-bottom: 56px; }
  .hero-art text { font-size: 9px; }
  .bento { grid-template-columns: repeat(4, 1fr); }
  #step3 .hero.slim, #stepDone .hero.slim { padding-top: 96px; padding-bottom: 80px; }
  .q { padding-left: 64px; }
  .pick.four { grid-template-columns: repeat(4, 1fr); }
  .flow { grid-template-columns: repeat(4, 1fr); }
  .cta { padding: 26px 28px; }
}
@media (max-width: 360px) {
  .pair { grid-template-columns: 1fr; }
  .wrap { padding: 0 20px; }
}

/* ==========================================================
   v2: 정교화 (아이콘 선화, 인장 버튼, 분할 선택, 소개 구역, 정확도 높이기)
   ========================================================== */
:root { --accent: #A8834F; --bronze: #8A6A3A; --bronze-light: #CDAA72; --r: 3px; }
.hero, .chart, .cta, .dock { --accent: var(--bronze-light); }
html { scroll-behavior: smooth; }
#form1 { scroll-margin-top: 64px; }

/* ---------- 아이콘 (assets/icons → index.html 안의 묶음) ---------- */
.ic { display: block; flex: none; width: 56px; height: 56px; color: var(--ink); }

/* ---------- 버튼: 안쪽 이중 테두리 + 원형 인장 ---------- */
.cta { position: relative; min-height: 68px; padding: 14px 14px 14px 26px; border-radius: var(--r); text-decoration: none; box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 12px 26px -16px rgba(21,27,24,.6); transition: background .25s, transform .12s, box-shadow .25s; }
.cta::before { content: ""; position: absolute; inset: 4px; border: 1px solid rgba(244,240,230,.18); border-radius: 1px; pointer-events: none; transition: border-color .3s; }
.cta:hover { background: #121714; }
.cta:hover::before { border-color: rgba(205,170,114,.6); }
.cta:active { transform: translateY(1px); box-shadow: inset 0 1px 0 rgba(255,255,255,.07); }
.cta[disabled] { opacity: .7; }
.seal { position: relative; flex: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--accent); color: var(--ivory); transition: background .3s, color .3s, transform .35s var(--ease); }
.seal::before { content: ""; position: absolute; left: 12px; top: 50%; width: 15px; height: 1px; margin-top: -.5px; background: currentColor; }
.seal::after { content: ""; position: absolute; left: 20px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-top: 1px solid currentColor; border-right: 1px solid currentColor; transform: rotate(45deg); }
.cta:hover .seal, .dock:hover .seal, .hero-go:hover .seal { background: var(--accent); color: #151B18; transform: translateX(3px); }
.cta.busy .seal { border-right-color: transparent; animation: spin .9s linear infinite; background: none; transform: none; }
.cta.busy .seal::before, .cta.busy .seal::after { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.note.center { text-align: center; }

/* 모바일 하단 고정 버튼 (1단계에서 입력 칸이 화면 밖일 때) */
.dock { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 6; display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 560px; margin: 0 auto; padding: 10px 10px 10px 22px; background: #151B18; color: var(--ivory); border-radius: var(--r); text-decoration: none; font-family: var(--serif); font-weight: 500; box-shadow: inset 0 0 0 1px rgba(244,240,230,.14), 0 16px 32px -12px rgba(0,0,0,.55); animation: dockin .45s var(--ease) both; }
@keyframes dockin { from { opacity: 0; transform: translateY(16px); } }
@media (min-width: 720px) { .dock { display: none !important; } }

/* ---------- 1단계 머리: 영상 배경, 신뢰 문구 ---------- */
.hero-video { position: absolute; inset: 0; z-index: -2; }
.hero-video video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 88% 50%; opacity: 0; transition: opacity 1.1s linear; }
.hero-video video.on { opacity: 1; }
#step1 .hero { padding-bottom: 40px; }
#step1 .hero .lead { max-width: 30em; }
.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 12px; margin-top: 30px; padding-top: 22px; border-top: 1px solid rgba(244,240,230,.2); }
.trust li { display: flex; flex-direction: column; gap: 10px; font-size: 13px; line-height: 1.45; color: var(--ivory-dim); }
.trust .ic { width: 38px; height: 38px; color: var(--ivory); }
.trust b { display: block; color: var(--ivory); font-weight: 600; font-size: var(--fs-s); }
.hero-go { display: inline-flex; align-items: center; gap: 18px; margin-top: 30px; padding: 8px 8px 8px 20px; border: 1px solid rgba(244,240,230,.28); border-radius: var(--r); color: var(--ivory); text-decoration: none; font-family: var(--serif); font-weight: 500; transition: border-color .3s; }
.hero-go:hover { border-color: var(--accent); }

/* ---------- 입력 ---------- */
.hero + form { margin-top: 40px; }
.form-k { padding-bottom: 14px; }
.q > label small, .preset-l small { font-weight: 400; font-size: var(--fs-s); color: var(--moss); margin-left: 6px; }
.read { font-size: var(--fs-s); color: var(--bronze); font-variant-numeric: tabular-nums; }
.read:not(:empty) { margin-top: 8px; }

.seg { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; margin-top: 16px; padding: 3px; border: 1px solid var(--line); border-radius: var(--r); background: rgba(255,255,255,.4); --n: 2; --i: 0; }
.seg.three { --n: 3; } .seg.four { --n: 4; }
.seg label { position: relative; z-index: 1; cursor: pointer; text-align: center; }
.seg input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.seg span { display: block; padding: 11px 2px; font-size: var(--fs-s); color: var(--moss); white-space: nowrap; transition: color .25s; }
.seg input:checked + span { color: var(--ivory); font-weight: 600; }
.seg input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 3px; }
.seg-thumb { position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc((100% - 6px) / var(--n)); background: var(--ink); border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(244,240,230,.16), 0 4px 10px -6px rgba(21,27,24,.7); transform: translateX(calc(var(--i) * 100%)); transition: transform .38s var(--ease); }
.seg + .hint { margin-top: 10px; }

.presets { padding: 26px 0 4px; border-top: 1px solid var(--line); }
.presets .k span { margin-left: 8px; letter-spacing: 0; text-transform: none; opacity: .8; }
.preset { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0 6px; }
.preset.col { display: block; padding-top: 18px; }
.preset-l { font-weight: 600; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--ink); border-radius: var(--r); box-shadow: inset 0 0 0 3px var(--ivory), inset 0 0 0 4px var(--line-soft); }
.stepper button { position: relative; width: 46px; height: 46px; }
.stepper button i { position: absolute; left: 50%; top: 50%; width: 13px; height: 1px; margin: -.5px 0 0 -6.5px; background: var(--ink); }
.stepper button i + i { transform: rotate(90deg); }
.stepper button:active { background: var(--line-soft); }
.stepper output { min-width: 34px; text-align: right; font-family: var(--serif); font-weight: 500; font-size: 22px; font-variant-numeric: tabular-nums; }
.stepper .unit { font-size: var(--fs-s); color: var(--moss); margin: 0 6px 0 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chips label { position: relative; cursor: pointer; }
.chips input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chips span { display: flex; align-items: baseline; justify-content: center; min-height: 50px; padding: 10px 15px; line-height: 26px; border: 1px solid var(--line); border-radius: var(--r); font-size: var(--fs-s); color: var(--moss); font-variant-numeric: tabular-nums; background: rgba(255,255,255,.4); transition: color .2s, background .2s, border-color .2s; }
.chips span b { font-family: var(--serif); font-weight: 500; font-size: var(--fs-m); color: var(--ink); margin-right: 2px; transition: color .2s; }
.chips input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--ivory-dim); box-shadow: inset 0 0 0 3px var(--ink), inset 0 0 0 4px rgba(244,240,230,.2); }
.chips input:checked + span b { color: var(--ivory); }
.chips input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 3px; }
#targetCustomBox { margin-top: 12px; }

/* ---------- 소개 구역 ---------- */
.land .block { margin-top: 72px; }
.title.mid { font-size: 22px; line-height: 1.5; margin-top: 12px; }
.hero-art.on-light { margin-top: 26px; }
.hero-art.on-light text { fill: var(--moss); }
.hero-art.on-light text.em { fill: var(--bronze); stroke: var(--ivory); }
.hero-art.on-light .ha-axis, .hero-art.on-light .ha-guide { stroke: var(--moss); }
.hero-art.on-light .ha-target, .hero-art.on-light .ha-line { stroke: var(--ink); }
.hero-art.on-light .ha-dot { fill: var(--ink); }
.hero-art.on-light .ha-line { stroke-dashoffset: 0; animation: none; }
.hero-art.on-light .ha-hatch { opacity: 1; animation: none; }
.facts { margin-top: 20px; border-top: 1px solid var(--ink); }
.facts div { display: grid; grid-template-columns: 112px 1fr; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-s); }
.facts dt { color: var(--moss); }
.facts b { font-family: var(--serif); font-weight: 500; font-size: var(--fs-m); }

.plates { display: grid; gap: 10px; margin-top: 18px; }
.plate { position: relative; display: grid; grid-template-columns: 64px 1fr; column-gap: 18px; align-content: start; padding: 22px 20px; border: 1px solid var(--line); border-radius: var(--r); background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,.14)); }
.plate::before { content: ""; position: absolute; inset: 3px; border: 1px solid var(--line-soft); border-radius: 1px; pointer-events: none; }
.plate .ic { grid-row: 1 / span 3; width: 64px; height: 64px; transition: transform .6s var(--ease); }
.plate:hover .ic { transform: translateY(-3px); }
.plate .n { font-family: var(--serif); font-size: var(--fs-s); color: var(--accent); letter-spacing: .08em; }
.plate b { display: block; font-weight: 600; }
.plate p { font-size: var(--fs-s); line-height: 1.55; color: var(--moss); margin-top: 2px; }
.plates.four { grid-template-columns: 1fr 1fr; }
.plates.four .plate { display: block; padding: 18px 16px 20px; }
.plates.four .ic { width: 56px; height: 56px; margin-bottom: 12px; }
.plates.four p { color: var(--ink); }

.strip { margin-top: 12px; padding: 0; background: none; color: inherit; border-radius: 0; border-top: 1px solid var(--ink); }
.strip li { gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.strip li:last-child { border-bottom: 1px solid var(--line); }
.strip .ic { width: 46px; height: 46px; }
.strip p { font-size: var(--fs-m); line-height: 1.55; }

.flow.three { grid-template-columns: 1fr; margin-top: 18px; }
.faq { margin-top: 18px; border-top: 1px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { position: relative; padding: 17px 36px 17px 0; font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before, .faq summary::after { content: ""; position: absolute; right: 4px; top: 50%; width: 13px; height: 1px; background: var(--ink); transition: transform .3s var(--ease); }
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0); }
.faq p { font-size: var(--fs-s); color: var(--moss); padding: 0 24px 18px 0; }
.land .cta { margin-top: 36px; }

/* ---------- 2단계: 정확도 높이기 ---------- */
.refine { position: relative; margin-top: 36px; padding: 24px 20px 12px; border: 1px solid var(--line); border-radius: var(--r); background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,.14)); }
.refine::before { content: ""; position: absolute; inset: 3px; border: 1px solid var(--line-soft); border-radius: 1px; pointer-events: none; }
.refine-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.refine .k { color: var(--ink); font-weight: 600; }
.gauge { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--moss); }
.gauge i { width: 16px; height: 3px; background: var(--line); transition: background .3s; }
.gauge i.on { background: var(--accent); }
.gauge span { margin-left: 6px; font-variant-numeric: tabular-nums; }
.refine .r { position: relative; display: grid; grid-template-columns: 1fr 112px; gap: 0 14px; align-items: end; padding: 14px 0 12px; border-top: 1px solid var(--line-soft); transition: opacity .25s; }
.refine .hint + .r { margin-top: 14px; }
.refine .r label { font-weight: 600; font-size: 15px; line-height: 1.4; }
.refine .r label small { display: block; font-weight: 400; font-size: 13px; color: var(--moss); margin-top: 2px; }
.refine .r .field { margin-top: 0; }
.refine .r .field input { font-size: 21px; text-align: right; padding: 4px 0 6px; }
.refine .r .err { grid-column: 1 / -1; }
.refine .r.off { opacity: .4; }

@media (min-width: 720px) {
  .ic { width: 64px; height: 64px; }
  .title.mid { font-size: 26px; }
  .land .block { margin-top: 96px; }
  .trust { max-width: 560px; }
  .plates { grid-template-columns: repeat(3, 1fr); }
  .plates .plate { display: block; padding: 26px 22px; }
  .plates .plate .ic { margin-bottom: 16px; }
  .plates.four { grid-template-columns: repeat(4, 1fr); }
  .flow.three { grid-template-columns: repeat(3, 1fr); }
  .facts div { grid-template-columns: 180px 1fr; }
  .refine { padding: 30px 28px 16px; }
  .refine .r { grid-template-columns: 1fr 140px; }
}

/* ==========================================================
   v3: 강조와 변경 표시
   - .hl 형광 밑줄, .tag 꼬리표(추정·확인·변경됨), 바뀐 줄 번쩍임, 증감 표시
   ========================================================== */
.hl { background: linear-gradient(transparent 58%, rgba(168,131,79,.34) 58%); font-weight: 600; color: var(--ink); padding: 0 1px; }
.hero .hl { background: linear-gradient(transparent 58%, rgba(205,170,114,.38) 58%); color: var(--ivory); }
.hero .title em, .title.mid em { font-weight: 700; }
.hero .lead b { color: var(--ivory); font-weight: 600; }
.faq p b, .plate p b, .strip p b, .notice b { font-weight: 700; color: var(--ink); }
.trust b { font-size: 16px; color: var(--bronze-light); }

.tag { display: inline-block; margin-left: 8px; padding: 2px 7px 1px; border: 1px solid var(--line); border-radius: 2px; font-family: var(--sans); font-size: 12px; font-weight: 600; line-height: 1.4; letter-spacing: 0; color: var(--moss); vertical-align: 2px; white-space: nowrap; transition: background .25s, color .25s, border-color .25s; }
.tag.est { border-style: dashed; }
.tag.ok { border-color: var(--accent); color: var(--bronze); background: rgba(168,131,79,.12); }
.tag.chg { border-color: var(--bronze); background: var(--bronze); color: #fff; }

/* 입력: 지금 쓰는 칸과 다 쓴 칸 */
.q { transition: background .3s; }
.q:focus-within { background: linear-gradient(90deg, rgba(168,131,79,.1), rgba(168,131,79,0) 70%); }
.q:focus-within .no, .q.filled .no { color: var(--bronze); font-weight: 700; }
.q.filled .no::after { content: ""; position: absolute; left: 3px; top: 26px; width: 9px; height: 5px; border-left: 1.5px solid var(--bronze); border-bottom: 1.5px solid var(--bronze); transform: rotate(-45deg); }
.field:focus-within { border-bottom-color: var(--bronze); box-shadow: 0 2px 0 0 var(--bronze); }
.q.tight.filled .no::after { display: none; }
.presets .k { color: var(--ink); font-weight: 600; }

/* 결과: 핵심 줄, 꼬리표, 증감, 바뀐 줄 */
.figure b { font-weight: 700; }
.fig-delta { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin-top: 14px; padding: 8px 12px; border: 1px solid var(--bronze-light); border-radius: var(--r); background: rgba(205,170,114,.14); font-size: var(--fs-s); color: var(--ivory); }
.fig-delta s { color: var(--ivory-dim); }
.fig-delta b { font-family: var(--serif); font-size: var(--fs-m); color: var(--bronze-light); }
.rows dt { font-size: 15px; color: var(--ink); font-weight: 600; }
.rows dt small { font-weight: 400; color: var(--moss); opacity: 1; margin-top: 2px; }
.rows dd { font-size: 22px; }
.rows div { position: relative; }
.rows div.key { margin: 0 -14px; padding: 16px 14px; border: 1px solid var(--bronze); border-radius: var(--r); background: rgba(168,131,79,.1); box-shadow: inset 4px 0 0 var(--bronze); }
.rows div.key + div { border-top: 0; }
.rows div.key dt { color: var(--bronze); font-weight: 700; }
.rows div.key dd { font-size: 26px; font-weight: 700; color: var(--bronze); }
.delta { display: inline-block; margin-right: 8px; padding: 1px 6px; border-radius: 2px; background: var(--bronze); color: #fff; font-family: var(--sans); font-style: normal; font-size: 12px; font-weight: 700; vertical-align: 3px; font-variant-numeric: tabular-nums; }
.rows div.flash { animation: flash 1.6s ease-out; }
@keyframes flash { 0%, 35% { background-color: rgba(168,131,79,.38); } 100% { background-color: transparent; } }
.rows div.key.flash { animation-name: flashkey; }
@keyframes flashkey { 0%, 35% { background-color: rgba(168,131,79,.45); } 100% { background-color: rgba(168,131,79,.1); } }
.assume li b.em { color: var(--bronze); font-weight: 700; }
.notice { border-left: 3px solid var(--bronze); padding-left: 14px; }
.notice.quiet { border-left-width: 1px; }

/* 정확도 높이기: 반영된 칸과 바로 보이는 결과 */
.refine { border-color: var(--bronze); }
.refine .k { color: var(--bronze); font-weight: 700; }
.refine .r.set { box-shadow: inset 3px 0 0 var(--bronze); margin-left: -10px; padding-left: 10px; background: rgba(168,131,79,.08); }
.refine .r.set::before { content: "반영됨"; position: absolute; right: 0; top: 10px; padding: 1px 7px; border-radius: 2px; background: var(--bronze); color: #fff; font-size: 12px; font-weight: 700; line-height: 1.5; }
.refine .r.set .field { border-bottom-color: var(--bronze); }
.refine-out { position: sticky; bottom: 12px; z-index: 3; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin: 8px -8px 0; padding: 12px 14px; border-radius: var(--r); background: #151B18; color: var(--ivory); font-size: var(--fs-s); box-shadow: inset 0 0 0 1px rgba(205,170,114,.5), 0 12px 24px -14px rgba(0,0,0,.6); }
.refine-out s { color: var(--ivory-dim); }
.refine-out b { font-family: var(--serif); font-size: 20px; color: var(--bronze-light); margin: 0 2px; }
.refine-out span { color: var(--bronze-light); font-weight: 600; }
.refine-out.flash { animation: outflash 1.2s ease-out; }
@keyframes outflash { 0%, 30% { box-shadow: inset 0 0 0 2px var(--bronze-light), 0 0 0 4px rgba(205,170,114,.35); } }

/* ---------- 그래프: 계단형 꺾은선 (시안 A) ---------- */
.chart { --line-soft: #2C332E; }
.chart figcaption { font-size: var(--fs-m); }
.pchart { margin-top: 22px; }
.pchart text { font-size: 12.5px; fill: #C9C3B4; font-variant-numeric: tabular-nums; }
.pchart text.tiny { font-size: 11px; fill: #A9A493; }
.pchart text.strong { fill: var(--ink); font-weight: 600; font-size: 13px; }
.pchart text.acc { fill: var(--accent-chart); font-weight: 700; }
.pchart text.big { font-size: 17px; font-weight: 700; }
.pchart text.halo { stroke-width: 6px; }
.sw.sline { height: 0; border-top: 2px solid var(--ink); }
.chart .sw.hatch { height: 11px; background: repeating-linear-gradient(135deg, var(--accent-chart) 0 1px, transparent 1px 5px); outline: 1px solid rgba(205,170,114,.45); }
.chart .legend { margin-top: 16px; padding-top: 14px; border-top: 1px solid #2C332E; }
.chart .legend small { font-size: 12px; opacity: .8; margin-left: 2px; }

/* ---------- 예시 그래프 (1단계 소개 구역, 결과 그래프와 같은 그림) ---------- */
.chart.ex { margin-top: 28px; }
.chart.ex figcaption { display: block; }
.chart.ex figcaption span { display: block; margin-top: 6px; line-height: 1.5; }
.chart.ex .tag { margin: 0 8px 0 0; border-color: var(--accent-chart); color: var(--accent-chart); background: rgba(205,170,114,.12); }
.chart.ex + .facts { margin-top: 32px; }

/* ---------- 순서 타임라인 (진행 순서, 상담 순서) ---------- */
.tl { margin-top: 22px; }
.tl li { position: relative; display: grid; grid-template-columns: 46px 1fr; column-gap: 18px; padding-bottom: 28px; }
.tl li::before { content: ""; position: absolute; left: 22.5px; top: 50px; bottom: 4px; width: 1px; background: linear-gradient(var(--ink) 0 100%) top / 1px 100% no-repeat; opacity: .28; }
.tl li:last-child { padding-bottom: 0; }
.tl li:last-child::before { display: none; }
.tl-n { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--ink); background: var(--ivory); box-shadow: inset 0 0 0 3px var(--ivory), inset 0 0 0 4px var(--line); font-family: var(--serif); font-weight: 500; font-size: 18px; font-variant-numeric: tabular-nums; }
.tl li:first-child .tl-n { background: var(--ink); color: var(--ivory); box-shadow: inset 0 0 0 3px var(--ink), inset 0 0 0 4px rgba(205,170,114,.7); }
.tl li.end .tl-n { border-color: var(--bronze); color: var(--bronze); box-shadow: inset 0 0 0 3px var(--ivory), inset 0 0 0 4px var(--bronze); }
.tl b { display: block; padding-top: 10px; font-weight: 700; line-height: 1.4; }
.tl b .tag { vertical-align: 1px; }
.tl p { margin-top: 4px; font-size: var(--fs-s); line-height: 1.6; color: var(--moss); }
.tl + .meta { margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--line); }
@media (min-width: 720px) {
  .tl { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
  .tl li { display: block; padding: 0 22px 0 0; }
  .tl li::before { left: 58px; right: 10px; top: 23px; bottom: auto; width: auto; height: 1px; background-size: 100% 1px; }
  .tl b { padding-top: 18px; }
}

/* ---------- v4: 순서 재배치에 따른 간격 ---------- */
.hero + .chart { margin-top: 0; border-top: 1px solid #2C332E; padding-top: 34px; }
.chart + .rows { margin-top: 40px; }
.rows + .cta { margin-top: 28px; }
details.assume { margin-top: 32px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
details.assume summary { position: relative; padding: 15px 30px 15px 0; cursor: pointer; list-style: none; }
details.assume summary::-webkit-details-marker { display: none; }
details.assume summary .k { color: var(--ink); font-weight: 600; }
details.assume summary::before, details.assume summary::after { content: ""; position: absolute; right: 4px; top: 50%; width: 13px; height: 1px; background: var(--ink); transition: transform .3s var(--ease); }
details.assume summary::after { transform: rotate(90deg); }
details.assume[open] summary::after { transform: rotate(0); }
details.assume ul { margin-top: 0; }
details.assume li:last-child { border-bottom: 0; }
.chart + .assume, details.assume + .notice { margin-top: 26px; }

.plate.advisor { margin-top: 12px; }
.plate.advisor b { font-size: var(--fs-m); line-height: 1.5; margin-top: 2px; }
@media (min-width: 720px) { .plate.advisor { display: grid; } .plate.advisor .ic { margin-bottom: 0; } }

.opt { border-top: 1px solid var(--line); }
.opt summary { display: flex; align-items: baseline; gap: 10px; padding: 16px 0; cursor: pointer; list-style: none; font-weight: 600; }
.opt summary::-webkit-details-marker { display: none; }
.opt summary b { flex: 1; font-family: var(--serif); font-weight: 500; color: var(--bronze); }
.opt summary i { font-style: normal; font-weight: 400; font-size: var(--fs-s); color: var(--moss); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.opt[open] summary i { visibility: hidden; }
.opt .q.tight { border-top: 0; padding-top: 0; }
.opt .q.tight:last-of-type { border-bottom: 0; }

/* ==========================================================
   v5: 움직임과 상호작용
   ========================================================== */
/* 그래프 탐색 */
.pchart { position: relative; touch-action: pan-y; }
.pchart svg { cursor: crosshair; }
.pc-tip { position: absolute; z-index: 2; display: grid; gap: 1px; min-width: 156px; padding: 10px 13px 11px; border-radius: var(--r); background: #F4F0E6; color: #1E2320; font-size: 13px; line-height: 1.5; pointer-events: none; box-shadow: 0 0 0 1px rgba(205,170,114,.7), 0 14px 28px -12px rgba(0,0,0,.7); transition: left .12s ease-out, top .12s ease-out; }
.pc-tip b { font-family: var(--serif); font-weight: 700; font-size: 16px; }
.pc-tip em { font-style: normal; font-weight: 700; }
.pc-tip small { font-size: 12px; color: #4F5A45; }
.pc-tip .sh { margin-top: 3px; padding-top: 4px; border-top: 1px solid #CFC8B8; color: #8A6A3A; font-weight: 700; }
.pc-tip .ok { margin-top: 3px; padding-top: 4px; border-top: 1px solid #CFC8B8; color: #4F5A45; font-weight: 600; }
.pc-hint { margin-top: 12px; font-size: 12.5px; color: #A9A493; }
.pc-hint::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: var(--bronze-light); animation: blink 1.8s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; transform: scale(.7); } }

/* 조건 바꿔 보기 */
.whatif { margin-top: 26px; padding-top: 22px; border-top: 1px solid #2C332E; }
.wf-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.wf-h b { font-weight: 700; color: #F4F0E6; }
.wf-h span { flex: 1; min-width: 150px; font-size: 13px; color: #A9A493; }
.wf-reset { font-size: 13px; color: var(--bronze-light); text-decoration: underline; text-underline-offset: 4px; padding: 4px 0; }
.wf { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 6px 12px; margin-top: 20px; font-size: var(--fs-s); color: #C9C3B4; cursor: pointer; }
.wf output { font-family: var(--serif); font-weight: 500; font-size: 20px; color: var(--bronze-light); font-variant-numeric: tabular-nums; }
.wf input[type="range"] { grid-column: 1 / -1; -webkit-appearance: none; appearance: none; width: 100%; height: 30px; margin: 0; background: transparent; cursor: pointer; --p: 50%; }
.wf input[type="range"]::-webkit-slider-runnable-track { height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--bronze-light) var(--p), #3A423C var(--p)); }
.wf input[type="range"]::-moz-range-track { height: 3px; border-radius: 2px; background: #3A423C; }
.wf input[type="range"]::-moz-range-progress { height: 3px; border-radius: 2px; background: var(--bronze-light); }
.wf input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -10.5px; border-radius: 50%; background: #151B18; border: 1.5px solid var(--bronze-light); box-shadow: inset 0 0 0 5px #151B18, inset 0 0 0 12px var(--bronze-light); transition: transform .15s; }
.wf input[type="range"]::-moz-range-thumb { width: 21px; height: 21px; border-radius: 50%; background: var(--bronze-light); border: 1.5px solid var(--bronze-light); box-shadow: inset 0 0 0 5px #151B18; }
.wf input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.18); }
.wf input[type="range"]:focus-visible { outline: 2px solid var(--bronze-light); outline-offset: 2px; }

/* 평균과 비교 */
.avg { margin-top: 36px; }
.avg .k { color: var(--ink); font-weight: 700; }
.cmp { position: relative; margin-top: 14px; padding: 18px 18px 16px; border: 1px solid var(--line); border-radius: var(--r); background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,.14)); overflow: hidden; }
.cmp-t { font-size: var(--fs-s); font-weight: 600; }
.cmp-t b { font-family: var(--serif); font-weight: 700; font-size: 20px; color: var(--bronze); margin-left: 4px; }
.cmp-bar { position: relative; height: 12px; margin: 34px 0 30px; background: var(--line-soft); border-radius: 1px; }
.cmp-bar .me { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--ink); border-radius: 1px; box-shadow: inset 0 0 0 1px rgba(244,240,230,.2); transition: width .9s var(--ease); }
.cmp-bar .mk { position: absolute; top: -7px; bottom: -7px; width: 0; border-left: 1.5px dashed var(--bronze); }
.cmp-bar .mk em { position: absolute; top: calc(100% + 3px); left: 0; transform: translateX(-50%); font-style: normal; font-size: 12px; font-weight: 600; color: var(--bronze); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cmp-bar .mk.up em { top: auto; bottom: calc(100% + 3px); }
.cmp-s { font-size: var(--fs-s); color: var(--moss); }
.cmp-s b { color: var(--ink); font-weight: 700; }
.avg .src { margin-top: 10px; font-size: 12px; line-height: 1.6; color: var(--moss); }

/* 위쪽 띠: 스크롤 진행 선, 결과 화면에서 숫자가 지나가면 부족분 표시 */
.scrollbar { position: fixed; left: 0; top: 0; z-index: 10; width: 100%; height: 2px; background: var(--bronze); transform: scaleX(0); transform-origin: 0 50%; pointer-events: none; }
.top-fig { font-size: var(--fs-s); color: var(--moss); animation: enter .4s var(--ease) both; }
.top-fig b { font-family: var(--serif); font-weight: 700; font-size: var(--fs-m); color: var(--bronze); margin-left: 4px; font-variant-numeric: tabular-nums; }
.top.mini .brand { display: none; }
@supports (animation-timeline: scroll()) {
  .scrollbar { animation: grow linear both; animation-timeline: scroll(root); }
  @keyframes grow { to { transform: scaleX(1); } }
  #step1 .hero-video { animation: par linear both; animation-timeline: view(); animation-range: exit 0% exit 100%; }
  @keyframes par { to { transform: translateY(14%) scale(1.08); } }
  #step1 .hero > *:not(.hero-video) { animation: lift linear both; animation-timeline: view(); animation-range: exit 10% exit 90%; }
  @keyframes lift { to { opacity: .15; transform: translateY(-18px); } }
}

/* 마우스를 따라오는 빛 */
@media (hover: hover) {
  .plate::after, .cmp::after, .refine::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .35s; background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), rgba(168,131,79,.2), transparent 70%); }
  .plate:hover::after, .cmp:hover::after, .refine:hover::after { opacity: 1; }
  .cta, .cta:hover { background-image: radial-gradient(160px circle at var(--mx, -200px) var(--my, -200px), rgba(205,170,114,.3), transparent 70%); }
}

.rows div.key + div.key { margin-top: 10px; }
.rows div.key .tag { vertical-align: 2px; }
.rows div.key .tag.ok { background: rgba(255,255,255,.5); }

/* 3단계: 깨달음 한 줄 → 내 숫자 → 진단 내용 */
#step3 .hero.slim .title { font-size: clamp(24px, 6.6vw, 34px); line-height: 1.45; }
#step3 .hero.slim .lead { margin-top: 18px; padding-top: 18px; border-top: 1px solid rgba(244,240,230,.2); max-width: 30em; }
#step3 .hero.slim .lead + .lead { margin-top: 10px; padding-top: 0; border-top: 0; }
.recap-s { margin-top: 10px; font-size: var(--fs-s); color: var(--moss); }
.recap-s b { color: var(--ink); font-weight: 700; }
.recap + .recap-s + .plates { margin-top: 22px; }

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