/* Fashion Lab — 여정형 쇼룸(2026-11-01). 결말(가상 피팅)을 맨 위에, 그 아래 다섯 장의 여정.
   uyai Warm Editorial: 종이색 바탕 · 코발트 강조 하나. 4장(재다)만 어두운 막간. */
:root {
  --paper: oklch(95.7% .012 93); --surface: oklch(98.4% .008 93); --paper-deep: oklch(91.7% .015 93);
  --ink: oklch(24% .018 263); --ink-2: oklch(38% .018 263); --muted: oklch(48% .012 263); --subtle: oklch(62% .012 263);
  --cobalt: oklch(47% .19 265); --cobalt-soft: oklch(92% .04 265);
  --line: oklch(24% .018 263 / .12); --line-strong: oklch(24% .018 263 / .7);
  --night: oklch(23% .04 265); --on-night: oklch(96% .012 93); --night-muted: oklch(80% .018 265); --night-accent: oklch(80% .11 265);
  --sans: 'Pretendard Variable', Pretendard, -apple-system, 'Apple SD Gothic Neo', sans-serif;
  --serif: Georgia, 'Times New Roman', serif; --mono: ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --ease: cubic-bezier(.16,1,.3,1);
  --gutter: clamp(16px, 4.4vw, 76px); --wide: 1760px;
  --rail: 46px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 16px; scrollbar-width: thin; scrollbar-color: #a5a8ac var(--paper); }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.65 var(--sans); letter-spacing: -.02em; word-break: keep-all; overflow-wrap: break-word; -webkit-font-smoothing: antialiased; }
::selection { background: oklch(47% .19 265 / .18); }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 4px; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, figure, dl, dd, ol { margin: 0; }
h1, h2 { text-wrap: balance; }
code { font-family: var(--mono); letter-spacing: 0; }
.shell { width: min(100%, var(--wide)); padding-inline: var(--gutter); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 10px; left: 16px; z-index: 100; padding: 12px 20px; background: var(--cobalt); color: var(--surface); transform: translateY(-160%); }
.skip-link:focus { transform: none; }

/* 머리글 */
.site-header { min-height: 72px; display: flex; gap: 20px; align-items: center; justify-content: space-between; padding-inline: var(--gutter); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 18px; min-height: 44px; }
.brand img { width: 76px; }
.brand > span { padding-left: 18px; border-left: 1px solid var(--line); font-size: .66rem; letter-spacing: .12em; font-weight: 650; }
.back-link { display: flex; gap: 12px; align-items: center; min-height: 44px; font-size: .84rem; font-weight: 550; }
.back-link:hover { color: var(--cobalt); }

/* 그림 확대 단추 공통 */
.zoom { position: relative; display: block; width: 100%; overflow: hidden; background: var(--surface); }
.zoom img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform 600ms var(--ease); }
@media (hover: hover) { .zoom:hover img { transform: scale(1.025); } }
.tag, .f-cap { position: absolute; left: 10px; bottom: 10px; max-width: calc(100% - 20px); padding: 3px 9px; font-size: .7rem; font-weight: 650; line-height: 1.45; letter-spacing: -.01em; background: oklch(98.4% .008 93 / .93); color: var(--ink); pointer-events: none; text-align: left; }
.tag-on { background: var(--cobalt); color: var(--surface); }

/* ── 결말(히어로) ── */
.hero { display: grid; grid-template-columns: minmax(0,5fr) minmax(0,7fr); grid-template-areas: "copy formula" "route route"; align-items: center; gap: clamp(24px, 2.4vw, 40px) clamp(32px, 4vw, 80px); padding-block: clamp(26px, 2.8vw, 52px) 0; }
.hero-copy { grid-area: copy; }
.kicker { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; font-size: 1.05rem; font-weight: 650; letter-spacing: -.03em; }
.kicker em { font-family: var(--serif); font-weight: 400; font-style: italic; color: var(--cobalt); }
.kicker span { font-size: .76rem; font-weight: 550; letter-spacing: 0; color: var(--muted); }
.hero h1 { margin-top: clamp(14px, 1.6vw, 26px); font-size: clamp(2.5rem, 4.9vw, 5.6rem); line-height: 1.04; letter-spacing: -.065em; font-weight: 650; }
.hero h1 .accent { color: var(--cobalt); }
.hero-sub { margin-top: clamp(14px, 1.4vw, 22px); max-width: 30em; font-size: clamp(.98rem, 1.15vw, 1.12rem); line-height: 1.7; color: var(--ink-2); }
.hero-stats { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px clamp(22px, 2.4vw, 40px); margin-top: clamp(20px, 2.2vw, 36px); padding-top: 16px; border-top: 1px solid var(--line-strong); }
.hero-stats dt { font-size: .74rem; font-weight: 650; letter-spacing: .01em; color: var(--muted); }
.hero-stats dt span { display: block; font-weight: 500; color: var(--subtle); }
.stat-main dd { display: flex; align-items: baseline; gap: .18em; margin-top: 2px; font-size: clamp(2.4rem, 3.5vw, 4.4rem); font-weight: 300; line-height: 1; letter-spacing: -.06em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat-main dd b { font-weight: 450; color: var(--subtle); }
.stat-main dd b.now { font-weight: 650; color: var(--ink); }
.stat-main .to { color: var(--cobalt); margin-inline: .06em; }
.stat-main small { font-size: .34em; font-weight: 500; letter-spacing: -.02em; color: var(--muted); }
.stat-side { padding-left: clamp(16px, 1.8vw, 28px); border-left: 1px solid var(--line); }
.stat-side dd { margin-top: 4px; font-size: 1.2rem; font-weight: 450; letter-spacing: -.03em; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--muted); }
.stat-side dd b { font-weight: 650; color: var(--cobalt); }

/* 사람 + 옷 → 가상 피팅. 입력 둘을 쌓고, 이어지는 선 뒤에 결과를 두 배 크기로.
   결과 칸은 원래 사람 사진 위에 입힌 결과를 겹쳐 두고, 훑는 선이 지나간 곳부터 보여 준다(app.js). JS · 움직임이 없으면 결과가 바로 보인다 */
.formula { grid-area: formula; justify-self: end; }
.formula-grid { --u: clamp(118px, 15vw, 270px); --g: clamp(18px, 1.6vw, 26px); --op: clamp(46px, 4.4vw, 76px);
  list-style: none; padding: 0; display: grid; grid-template-columns: var(--u) var(--op) calc(var(--u) * 2 + var(--g)); grid-template-rows: var(--u) var(--u); row-gap: var(--g); }
.formula-grid > li { position: relative; min-width: 0; }
.f-person { grid-column: 1; grid-row: 1; } .f-garment { grid-column: 1; grid-row: 2; }
.f-person img, .f-garment img { width: 100%; height: 100%; aspect-ratio: 1; object-fit: cover; background: var(--surface); }
.f-cap span { display: block; font-size: .62rem; font-weight: 600; color: var(--muted); }
.f-link { grid-column: 2; grid-row: 1 / span 2; }
.f-link svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.f-link path { fill: none; stroke: var(--cobalt); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.f-link .l-v { display: none; }
.f-arrow { position: absolute; right: -2px; top: 50%; transform: translateY(-50%); font-size: 1.3rem; line-height: 1; color: var(--cobalt); }
.f-result { grid-column: 3; grid-row: 1 / span 2; }
.tryon { height: 100%; box-shadow: 0 0 0 2px var(--cobalt); }
.tryon img { position: absolute; inset: 0; width: 100%; height: 100%; }
.tryon .t-after { z-index: 1; }
.t-scan { position: absolute; inset: 0; z-index: 2; opacity: 0; pointer-events: none; }
.t-scan::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--surface); box-shadow: 0 0 0 1px var(--cobalt), 0 0 22px 5px oklch(80% .11 265 / .75); }
.t-scan::after { content: ''; position: absolute; left: 0; right: 0; bottom: 100%; height: 22%; background: linear-gradient(to bottom, oklch(80% .11 265 / 0), oklch(80% .11 265 / .22)); }
.f-result .f-cap { z-index: 3; font-size: .78rem; padding: 6px 12px; }
.f-result .f-cap span { color: var(--cobalt); }
.t-timer { position: absolute; left: 10px; top: 10px; z-index: 3; padding: 5px 10px; background: oklch(23% .04 265 / .82); color: var(--on-night); font-size: .74rem; font-weight: 600; letter-spacing: 0; font-variant-numeric: tabular-nums; pointer-events: none; }
.t-sec { font-weight: 700; font-family: var(--mono); margin-right: 1px; }
.t-run { display: none; }
.t-replay { position: absolute; right: 10px; top: 10px; z-index: 3; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 12px; background: oklch(98.4% .008 93 / .94); font-size: .76rem; font-weight: 650; }
.t-replay:hover { color: var(--cobalt); }
.t-replay[hidden] { display: none; }
/* 재생 상태(app.js 가 붙인다) */
.formula.is-anim .f-person, .formula.is-anim .f-garment { opacity: 0; transform: translateX(-18px); transition: opacity 600ms var(--ease), transform 600ms var(--ease); }
.formula.is-anim .f-garment { transition-delay: 160ms; }
.formula.is-anim .f-link path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 700ms var(--ease) 380ms; }
.formula.is-anim .f-arrow { opacity: 0; transition: opacity 300ms ease 950ms; }
.formula.is-anim .t-after { clip-path: inset(0 0 100% 0); }
.formula.is-anim .t-run { display: inline; }
.formula.is-anim .t-done { display: none; }
.formula.is-in .f-person, .formula.is-in .f-garment { opacity: 1; transform: none; }
.formula.is-in .f-link path { stroke-dashoffset: 0; }
.formula.is-in .f-arrow { opacity: 1; }
.formula.is-done .t-run { display: none; }
.formula.is-done .t-done { display: inline; }

/* 여정 안내 */
.route { grid-area: route; display: flex; flex-wrap: wrap; align-items: center; gap: 10px clamp(20px, 3vw, 56px); padding-block: clamp(16px, 1.6vw, 24px); border-top: 1px solid var(--line-strong); }
.route-lead { font-size: .98rem; font-weight: 650; letter-spacing: -.03em; }
.route-lead span { color: var(--cobalt); margin-left: 4px; }
.route ol { flex: 1; display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); list-style: none; padding: 0; position: relative; }
.route ol::before { content: ''; position: absolute; left: 14px; right: 14px; top: 50%; height: 1px; background: var(--line-strong); }
.route a { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding-right: 12px; background: var(--paper); font-size: .9rem; font-weight: 600; }
.route a span { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--paper); font-size: .7rem; font-weight: 650; font-variant-numeric: tabular-nums; transition: background 250ms, color 250ms, border-color 250ms; }
.route li:last-child a span { background: var(--cobalt); border-color: var(--cobalt); color: var(--surface); }
.route-oss { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: .84rem; font-weight: 650; text-decoration: underline; text-underline-offset: 5px; }
.route-oss span { color: var(--cobalt); }
@media (hover: hover) { .route a:hover, .route-oss:hover { color: var(--cobalt); } .route a:hover span { border-color: var(--cobalt); } }

/* ── 여정 ── 왼쪽 세로선 하나가 다섯 장을 꿴다 */
.journey { position: relative; width: min(100%, var(--wide)); margin-inline: auto; padding-inline: var(--gutter); }
.journey::before { content: ''; position: absolute; top: 0; bottom: 0; left: calc(var(--gutter) + var(--rail) / 2); width: 1px; background: var(--line-strong); opacity: .35; }
.chapter { position: relative; display: grid; grid-template-columns: var(--rail) minmax(0,5fr) minmax(0,6fr); grid-template-areas: ". head media" ". story media" ". next media"; grid-template-rows: auto auto 1fr; align-items: start; column-gap: clamp(24px, 3.4vw, 64px); padding-block: clamp(26px, 2.5vw, 44px); border-top: 1px solid var(--line); }
.ch-flip { grid-template-columns: var(--rail) minmax(0,6fr) minmax(0,5fr); grid-template-areas: ". media head" ". media story" ". media next"; }
.ch-head { grid-area: head; }
.ch-no { display: flex; align-items: center; gap: 10px; font-size: .76rem; font-weight: 650; letter-spacing: .03em; color: var(--muted); }
.node { position: absolute; left: 0; top: clamp(26px, 2.5vw, 44px); display: grid; place-items: center; width: var(--rail); height: var(--rail); border-radius: 50%; background: var(--paper); border: 1px solid var(--line-strong); font-size: .82rem; font-weight: 650; letter-spacing: 0; color: var(--ink); font-variant-numeric: tabular-nums; z-index: 2; }
.ch-final .node { background: var(--cobalt); border-color: var(--cobalt); color: var(--surface); }
.ch-head h2 { margin-top: 0; font-size: clamp(2.2rem, 3.4vw, 3.6rem); line-height: 1.02; letter-spacing: -.07em; font-weight: 650; }
/* 장마다 쓴 모델 · 기술 — 모델 이름은 크게, 만든 곳 · 라이선스는 작은 꼬리표 */
.ch-chips { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: flex; flex-direction: column; gap: 0; padding: 5px 11px 6px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--cobalt); }
.chip b { font-size: .92rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.3; }
.chip span { font-size: .66rem; font-weight: 550; letter-spacing: 0; line-height: 1.4; color: var(--muted); }
.chip-tech { background: transparent; border: 1px solid var(--line-strong); border-left-width: 1px; }
.chip-tech b::before { content: '기술 · '; font-size: .7rem; font-weight: 600; color: var(--muted); }
.chip-muted { background: transparent; border: 1px dashed var(--line-strong); }
.chip-muted b { color: var(--ink-2); }
.ch-story { grid-area: story; margin-top: clamp(10px, 1vw, 16px); }
.ch-story, .ch-story > p { font-size: clamp(.96rem, 1.02vw, 1.03rem); line-height: 1.72; color: var(--ink-2); max-width: 36em; }
.ch-stat { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.ch-stat b { font-size: clamp(1.5rem, 2.2vw, 2.1rem); font-weight: 600; letter-spacing: -.045em; color: var(--cobalt); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ch-stat span { flex: 1 1 14em; font-size: .78rem; line-height: 1.55; color: var(--muted); }
.ch-next { grid-area: next; align-self: end; margin-top: clamp(12px, 1.1vw, 18px); padding: 12px 0 0 0; border-top: 1px solid var(--line-strong); font-size: .92rem; line-height: 1.65; font-weight: 550; color: var(--ink); max-width: 34em; }
.ch-next > span { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-size: .7rem; font-weight: 650; letter-spacing: .04em; color: var(--muted); }
.ch-next > span::after { content: '↘'; color: var(--cobalt); font-size: .9rem; }
.ch-end > span::after { content: '↑'; }
.ch-media { grid-area: media; min-width: 0; width: 100%; max-width: 560px; justify-self: end; align-self: center; }
.ch-flip .ch-media { justify-self: start; }
.ch-wide .ch-media { max-width: 640px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.triple { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.ch-media.triple { max-width: 640px; }
.pair-arrow { gap: clamp(30px, 3vw, 46px); }
.pair-arrow .zoom:last-child { overflow: visible; }
.pair-arrow .zoom:last-child::before { content: '→'; position: absolute; top: 50%; left: calc(clamp(30px, 3vw, 46px) * -.5); transform: translate(-50%,-50%); font-size: 1.6rem; font-weight: 300; color: var(--cobalt); }
.pair-arrow .zoom:last-child img { box-shadow: 0 0 0 2px var(--cobalt); }

/* 3장 — 그림 한 장 + 다시 쓴 캡션 */
.caption-media { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 10px; align-items: stretch; }
.rewrite { display: flex; flex-direction: column; gap: 12px; padding: clamp(14px, 1.4vw, 22px); background: var(--surface); border: 1px solid var(--line); }
.rw-k { font-size: .72rem; font-weight: 650; letter-spacing: .03em; color: var(--muted); }
.rewrite p:not(.rw-k) { display: grid; grid-template-columns: 1.7em minmax(0,1fr); gap: 8px; }
.rw-label { display: grid; place-items: center; height: 1.7em; font-size: .68rem; font-weight: 650; border: 1px solid var(--line-strong); }
.rw-new .rw-label { background: var(--cobalt); border-color: var(--cobalt); color: var(--surface); }
.rewrite code { font-size: .74rem; line-height: 1.7; color: var(--ink-2); overflow-wrap: anywhere; }
.rewrite s { color: var(--subtle); text-decoration-thickness: 1px; }
.rw-new { margin-top: auto; }
.rw-new code { color: var(--ink); font-weight: 600; }

/* 4장 — 어두운 막간. 기준 사진 위 번호와 여섯 항목 */
.ch-interlude { border-top: 0; color: var(--on-night); background: var(--night); margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); grid-template-columns: var(--rail) minmax(0,5fr) minmax(0,6fr); }
.ch-interlude::before { content: ''; position: absolute; top: 0; bottom: 0; left: calc(var(--gutter) + var(--rail) / 2); width: 1px; background: var(--on-night); opacity: .25; }
.ch-interlude .node { left: var(--gutter); background: var(--night); border-color: oklch(96% .012 93 / .5); color: var(--on-night); }
.ch-interlude .ch-no { color: var(--night-muted); }
.ch-interlude .chip { background: oklch(96% .012 93 / .06); border-color: oklch(96% .012 93 / .18); border-left-color: var(--night-accent); }
.ch-interlude .chip-tech { background: transparent; border-left-width: 1px; border-color: oklch(96% .012 93 / .4); }
.ch-interlude .chip span, .ch-interlude .chip-tech b::before { color: var(--night-muted); }
.ch-interlude .ch-no { margin-bottom: 4px; }
.ch-interlude .ch-story { color: var(--night-muted); }
.ch-interlude .ch-next { color: var(--on-night); border-top-color: oklch(96% .012 93 / .3); }
.ch-interlude .ch-next > span { color: var(--night-muted); }
.ch-interlude .ch-next > span::after { color: var(--night-accent); }
.ch-interlude :focus-visible { outline-color: var(--night-accent); }
.check { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: clamp(16px, 2vw, 32px); align-items: center; }
.pins { position: relative; }
.pins img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.pin { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%,-50%); display: grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; background: var(--cobalt); color: var(--surface); font-size: .7rem; font-weight: 700; letter-spacing: 0; box-shadow: 0 0 0 3px oklch(98% .01 93 / .85); }
.check-k { font-size: .74rem; font-weight: 650; letter-spacing: .03em; color: var(--night-accent); margin-bottom: 8px; }
.check-list { list-style: none; padding: 0; counter-reset: c; }
.check-list li { counter-increment: c; display: grid; grid-template-columns: 1.6em 12px minmax(0,1fr); align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid oklch(96% .012 93 / .12); font-size: .92rem; color: var(--on-night); }
.check-list li::before { content: counter(c); font-size: .72rem; font-weight: 700; color: var(--night-accent); font-variant-numeric: tabular-nums; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--night-accent); }

/* ── 크레딧: 이 실험에 쓴 오픈소스 ── */
.oss { padding-block: clamp(26px, 2.4vw, 44px) clamp(14px, 1.4vw, 24px); border-top: 1px solid var(--line-strong); }
.oss-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 8px 32px; margin-bottom: clamp(14px, 1.6vw, 22px); }
.oss-head h2 { font-size: clamp(1.5rem, 2.2vw, 2.2rem); line-height: 1.15; letter-spacing: -.055em; font-weight: 600; }
.oss-head h2 span { display: block; margin-bottom: 6px; font-size: .76rem; font-weight: 650; letter-spacing: .04em; color: var(--cobalt); }
.oss-head p { max-width: 36em; font-size: .86rem; line-height: 1.6; color: var(--muted); }
.oss-grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); column-gap: clamp(16px, 2vw, 32px); border-top: 2px solid var(--ink); }
.oss-card { display: grid; grid-template-columns: minmax(0,1fr) auto; grid-template-areas: "role use" "name name" "meta meta"; align-items: baseline; gap: 1px 12px; padding: 9px 0 10px; border-bottom: 1px solid var(--line); }
.oss-card b { grid-area: name; font-size: 1.08rem; font-weight: 700; letter-spacing: -.03em; color: var(--ink); }
.o-role { grid-area: role; font-size: .72rem; font-weight: 650; color: var(--muted); }
.o-use { grid-area: use; font-size: .72rem; font-weight: 650; }
.o-ok { color: var(--cobalt); } .o-eval { color: var(--muted); } .o-no { color: var(--subtle); }
.o-meta { grid-area: meta; font-size: .8rem; line-height: 1.5; color: var(--ink-2); }
.oss-key { position: relative; }
.oss-key::before { content: ''; position: absolute; inset: 0 -10px; z-index: -1; background: var(--cobalt-soft); }
.oss-key b { color: var(--cobalt); }

/* ── 에필로그 ── */
.epilogue { padding-block: clamp(26px, 2.4vw, 44px) clamp(20px, 2vw, 32px); border-top: 1px solid var(--line-strong); }
.epilogue h2 { font-size: clamp(1.5rem, 2.2vw, 2.2rem); line-height: 1.15; letter-spacing: -.055em; font-weight: 600; }
.epilogue h2 span { display: block; margin-bottom: 6px; font-size: .76rem; font-weight: 650; letter-spacing: .04em; color: var(--cobalt); }
.lessons { list-style: none; padding: 0; counter-reset: l; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: clamp(16px, 2.4vw, 44px); margin-top: clamp(14px, 1.6vw, 24px); }
.lessons li { counter-increment: l; display: flex; flex-direction: column; gap: 4px; padding-top: 12px; border-top: 2px solid var(--ink); }
.lessons li::before { content: counter(l, decimal-leading-zero); font-size: .76rem; font-weight: 700; color: var(--cobalt); font-variant-numeric: tabular-nums; }
.lessons b { font-size: 1.06rem; font-weight: 650; letter-spacing: -.035em; line-height: 1.4; }
.lessons span { font-size: .9rem; line-height: 1.65; color: var(--ink-2); }
.honest { margin-top: clamp(14px, 1.4vw, 22px); font-size: .78rem; line-height: 1.7; color: var(--muted); }

/* 바닥글 · 확대 창 */
.site-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 25px; padding-block: 24px; border-top: 1px solid var(--line); font-size: .72rem; letter-spacing: .06em; }
.site-footer a:last-child { min-height: 44px; display: inline-flex; align-items: center; }
.footer-brand { font-size: 1.6rem; font-weight: 700; letter-spacing: -.07em; }
.footer-brand span { display: block; font-size: .72rem; letter-spacing: -.02em; font-weight: 400; color: var(--muted); margin-top: 6px; }
dialog { border: 0; padding: 18px; background: var(--paper); color: var(--ink); width: min(95vw, 880px); max-height: 94svh; }
dialog::backdrop { background: oklch(15% .03 265 / .8); backdrop-filter: blur(5px); }
.dialog-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 14px; }
.dialog-top h2 { font-size: .88rem; font-weight: 600; }
.dialog-top button { min-height: 44px; padding: 8px; font-size: .84rem; flex-shrink: 0; }
.dialog-top button > span { font-size: 1.2rem; margin-left: 8px; }
#dialog-image { margin-inline: auto; max-height: 76svh; width: auto; max-width: 100%; object-fit: contain; }

/* ── 화면 폭 ── */
@media (max-width: 1099px) {
  .oss-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .hero { grid-template-columns: 1fr; grid-template-areas: "copy" "formula" "route"; }
  .formula { justify-self: start; }
  .formula-grid { --u: clamp(118px, 26vw, 250px); }
  .chapter, .ch-flip, .ch-interlude { grid-template-columns: var(--rail) minmax(0,1fr); grid-template-areas: ". head" ". story" ". media" ". next"; grid-template-rows: none; }
  .ch-media { margin-top: 20px; max-width: 760px; }
  .lessons { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .route ol { flex-basis: 100%; }
  .route a { flex-direction: column; gap: 4px; padding: 0; font-size: .76rem; background: none; }
  .route ol::before { top: 22px; }
  .route li { display: flex; justify-content: center; }
  .route li:first-child { justify-content: flex-start; } .route li:last-child { justify-content: flex-end; }
}
/* 폰: 입력 둘을 나란히, 결과는 아래 전체 폭 */
/* 아주 좁은 화면(320 ~ 400px) — 단계 이름을 명사형으로 바꾼 뒤(2026-11-02) 'LoRA 학습'과 '캡션 다시 쓰기'가 붙었다. 글자를 줄이고 낱말 단위로만 꺾는다 */
@media (max-width: 400px) {
  .route a { font-size: .68rem; line-height: 1.3; text-align: center; word-break: keep-all; }
  .route li { padding-inline: 2px; }
  .route li:first-child a { text-align: left; } .route li:last-child a { text-align: right; }
}
@media (max-width: 639px) {
  .oss-grid { grid-template-columns: 1fr; }
  :root { --rail: 34px; }
  .site-header { min-height: 64px; }
  .brand { gap: 12px; } .brand > span { padding-left: 12px; font-size: .58rem; } .brand img { width: 64px; }
  .back-link { font-size: .78rem; gap: 6px; }
  .formula, .formula-grid { width: 100%; }
  .formula-grid { grid-template-columns: 1fr 1fr; grid-template-rows: auto 48px auto; gap: 0 12px; }
  .f-person { grid-column: 1; grid-row: 1; } .f-garment { grid-column: 2; grid-row: 1; }
  .f-link { grid-column: 1 / -1; grid-row: 2; }
  .f-link .l-h { display: none; } .f-link .l-v { display: inline; }
  .f-arrow { right: auto; left: 50%; top: auto; bottom: -4px; transform: translateX(-50%) rotate(90deg); }
  .f-result { grid-column: 1 / -1; grid-row: 3; }
  .tryon { height: auto; }
  .tryon .t-after { position: relative; height: auto; aspect-ratio: 1; }
  .formula.is-anim .f-person, .formula.is-anim .f-garment { transform: translateY(-12px); }
  .stat-side { padding-left: 0; border-left: 0; }
  .chapter { column-gap: 14px; }
  .node { font-size: .72rem; }
  .ch-head h2 { font-size: clamp(2rem, 10vw, 2.6rem); }
  .caption-media, .check { grid-template-columns: 1fr; }
  .check .pins { max-width: 340px; }
  .site-footer > .footer-brand { flex-basis: 100%; }
  dialog { padding: 14px; } .dialog-top h2 { font-size: .8rem; }
}

/* ── 움직임 ── 결말이 먼저 나타나고, 아래로 읽을수록 세로선이 채워진다 */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: enter 800ms var(--ease) both; }
  .hero-copy > :nth-child(2) { animation-delay: 60ms; } .hero-copy > :nth-child(3) { animation-delay: 140ms; } .hero-copy > :nth-child(4) { animation-delay: 220ms; }
  .chapter.pending { opacity: 0; transform: translateY(26px); }
  .chapter { transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
}
@keyframes enter { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .journey-fill { position: absolute; top: 0; bottom: 0; left: calc(var(--gutter) + var(--rail) / 2 - 1px); width: 3px; background: var(--cobalt); transform-origin: top; animation: fill linear both; animation-timeline: view(); animation-range: cover 0% cover 100%; z-index: 1; pointer-events: none; }
  }
}
@keyframes fill { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.journey-fill { display: none; }
@supports (animation-timeline: view()) { @media (prefers-reduced-motion: no-preference) { .journey-fill { display: block; } } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
