/* 개념 모션(::: preview <kind>, src/motions.mjs) — 560 × 300 무대 하나에 부품을 px 로 놓는다. 좁은 화면은 통째로 줄인다.
   styles.css 와 따로 둔다: 같은 파일을 여러 세션이 고치다 블록이 덮인 적이 있다. */
.mo .mo-stage { width: 560px; max-width: none; background: var(--tint-2); font-size: 12px; line-height: 17px; color: var(--tint-12); }
@media (max-width: 600px) { .mo { zoom: 0.75; } .mo .pv-steps { zoom: 1.4; } }
@media (max-width: 460px) { .mo { zoom: 0.6; } }
.mo-stage > div, .mo-abs { position: absolute; }
.mo-win, .mo-phone, .mo-panel, .mo-node, .mo-card, .mo-note, .mo-lane, .mo-branch, .mo-track, .mo-timer, .mo-days, .mo-cal, .mo-week, .mo-steps { box-sizing: border-box; border: 1px solid var(--tint-6); border-radius: var(--radius); background: #fff; }
.mo-win, .mo-phone { overflow: hidden; }
.mo-phone { border-radius: 20px; border-color: var(--tint-7); }
.mo-bar { position: relative; display: flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; background: var(--tint-3); border-bottom: 1px solid var(--tint-6); }
.mo-bar > i { width: 7px; height: 7px; border-radius: 50%; background: var(--tint-7); }
.mo-win .mo-url { position: absolute; left: 44px; right: 8px; }
.mo-phone .mo-url { position: absolute; left: 8px; right: 8px; text-align: center; }
.mo-url { font-size: 10px; line-height: 16px; color: var(--tint-9); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mo-body { position: absolute; inset: 26px 0 0; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.mo-pg { position: absolute; inset: 0; padding: 12px; display: flex; flex-direction: column; gap: 6px; background: #fff; }
.mo-center { align-items: center; justify-content: center; text-align: center; gap: 8px; }
.mo-center em, .mo-node em, .mo-card em, .mo-mark em { font-style: normal; color: var(--tint-9); font-size: 11px; }
.mo-modal { background: var(--tint-2); }
.mo-dark { background: var(--tint-12); color: #fff; }
.mo-dark em { color: var(--tint-7); }
.mo-app { background: #eef1f6; }
.mo-blank { background: #fff; }
.mo-block { font-size: 26px; line-height: 30px; color: var(--tint-8); }
.mo-panel { padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.mo-title, .mo-lane-title, .mo-branch p { margin: 0; font-size: 11px; line-height: 16px; font-weight: 600; color: var(--tint-11); }
.mo-log { display: block; padding: 5px 8px; border-radius: 6px; background: var(--tint-3); font-family: var(--font-mono); font-size: 11px; line-height: 15px; word-break: keep-all; }
.mo-muted { color: var(--tint-9); background: transparent; border: 1px dashed var(--tint-7); }
.mo-tag { display: inline-flex; align-items: center; align-self: flex-start; padding: 2px 9px; border-radius: var(--radius-pill); background: var(--tint-3); color: var(--tint-11); font-size: 11px; line-height: 18px; font-weight: 600; white-space: nowrap; }
.mo-center .mo-tag { align-self: center; }
.mo-ok { background: var(--green-4); color: var(--text-brand); }
.mo-bad { background: #fdecec; color: #c5303a; }
.mo-warn { background: #fff4dc; color: #8a5a00; }
.mo-mono { font-family: var(--font-mono); font-weight: 500; }
.mo-node { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-align: center; }
.mo-node b, .mo-card b { font-size: 13px; }
.mo-stack { position: relative; display: block; height: 18px; min-width: 120px; }
.mo-stack > * { position: absolute; left: 0; right: 0; }
.mo-node .mo-stack > * { text-align: center; }
.mo-stack-2 { height: 34px; margin-top: 4px; }
.mo-big { height: 26px; font-size: 20px; line-height: 26px; font-weight: 700; }
.mo-btn { display: flex; align-items: center; justify-content: center; height: 34px; margin-top: auto; border-radius: var(--radius-sm); background: var(--button-bg); color: #fff; font-weight: 600; }
.mo-node .mo-btn { height: 26px; margin-top: 4px; padding: 0 12px; font-size: 11px; }
.mo-row, .mo-field { display: flex; align-items: center; height: 30px; padding: 0 10px; border: 1px solid var(--tint-6); border-radius: var(--radius-sm); background: #fff; }
.mo-field { color: var(--tint-9); }
.mo-h { font-size: 13px; }
.mo-who { align-self: flex-end; padding: 1px 8px; border-radius: var(--radius-pill); background: var(--green-4); color: var(--text-brand); font-size: 11px; font-weight: 600; }
.mo-order { display: flex; gap: 10px; align-items: center; }
.mo-thumb { flex: none; width: 34px; height: 34px; border-radius: var(--radius-sm); background: var(--tint-4); }
.mo-lines { display: flex; flex-direction: column; }
.mo-lines em { font-style: normal; color: var(--tint-9); }
.mo-acct, .mo-code { font-family: var(--font-mono); font-size: 11px; }
.mo-code { display: block; line-height: 15px; }
.mo-console { position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 10px; background: #fdecec; color: #c5303a; font-family: var(--font-mono); font-size: 10px; line-height: 14px; }
.mo-arrow { height: 0; border-top: 2px dashed var(--tint-8); }
.mo-arrow::after { content: ""; position: absolute; right: -2px; top: -6px; border: 5px solid transparent; border-left: 7px solid var(--tint-8); border-right: 0; }
.mo-arrow span { position: absolute; left: 0; right: 0; bottom: 4px; text-align: center; font-size: 10px; line-height: 14px; color: var(--tint-9); white-space: nowrap; }
.mo-packet { display: flex; align-items: center; justify-content: center; border-radius: var(--radius-pill); background: var(--tint-12); color: #fff; font-size: 10px; font-weight: 600; opacity: 0; }
.mo-coin { display: flex; align-items: center; justify-content: center; border-radius: var(--radius-pill); background: #ffd66b; color: #5a3d00; font-size: 11px; font-weight: 700; }
.mo-axis { height: 0; border-top: 2px solid var(--tint-7); }
.mo-axis-label { color: var(--tint-11); font-size: 11px; }
.mo-dot { border-radius: 50%; background: var(--tint-8); }
.mo-note { padding: 10px 12px; color: var(--tint-11); font-size: 12px; }
.mo-note em { font-style: normal; color: var(--tint-9); }
.mo-cap { color: var(--tint-11); font-size: 11px; font-weight: 600; }
.mo-lane { padding: 8px 12px; background: var(--tint-2); }
.mo-mark { display: flex; flex-direction: column; align-items: center; text-align: center; }
.mo-needle { border-left: 2px solid #2b6cf6; }
.mo-cal, .mo-week, .mo-steps, .mo-days { display: flex; gap: 6px; padding: 8px; background: var(--tint-2); }
.mo-cal > span, .mo-week > span, .mo-days > span { position: relative; flex: 1; display: flex; flex-direction: column; gap: 4px; padding: 8px; border: 1.5px solid var(--tint-6); border-radius: var(--radius-sm); background: #fff; }
.mo-cal i { position: absolute; left: 8px; right: 8px; top: 32px; font-style: normal; font-size: 11px; font-weight: 600; opacity: 0; }
.mo-cal i.ok { color: var(--text-brand); }
.mo-cal i.bad { color: #c5303a; }
.mo-cal i.wait { color: #8a5a00; }
.mo-days > span { font-weight: 600; }
.mo-days em { font-style: normal; font-weight: 400; color: var(--tint-9); font-size: 11px; }
.mo-steps > span { flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; border-radius: var(--radius-sm); font-size: 11px; line-height: 14px; font-weight: 600; }
.mo-track { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; }
.mo-track > span { flex: 1; display: flex; align-items: center; justify-content: center; height: 34px; border: 1px solid var(--tint-6); border-radius: var(--radius-sm); font-weight: 600; }
.mo-track em { flex-basis: 100%; font-style: normal; font-size: 11px; color: var(--tint-9); }
.mo-bar-wrap { position: relative; border-radius: var(--radius-sm); background: var(--tint-4); overflow: hidden; }
.mo-bar-wrap .fill { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; background: var(--green-7); }
.mo-bar-wrap .cut { position: absolute; right: 0; top: 0; bottom: 0; width: 30%; display: flex; align-items: center; justify-content: center; background: repeating-linear-gradient(45deg, #fdecec, #fdecec 6px, #fff 6px, #fff 12px); color: #c5303a; font-size: 11px; font-weight: 600; }
.mo-bar-wrap .amt { position: absolute; left: 12px; top: 11px; font-size: 13px; }
.mo-stbox { display: flex; align-items: center; justify-content: space-between; padding: 0 12px; border: 1px solid var(--tint-6); border-radius: var(--radius-sm); background: #fff; }
.mo-stbox > span:first-child { color: var(--tint-9); font-size: 11px; }
.mo-stbox .mo-stack { min-width: 24px; height: 22px; font-size: 18px; line-height: 22px; }
.mo-stbox .mo-stack > * { text-align: right; }
.mo-stbox > b { font-size: 18px; }
.mo-timer { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; }
.mo-timer em, .mo-card em { font-style: normal; color: var(--tint-9); font-size: 11px; }
.mo .tbar { display: block; height: 6px; border-radius: 3px; background: var(--tint-4); overflow: hidden; }
.mo .tbar i { display: block; height: 100%; width: 100%; background: var(--green-9); }
.mo-card { display: flex; flex-direction: column; gap: 6px; padding: 12px; }
.mo-card .new { color: var(--text-brand); }
.mo-card u { text-decoration: none; color: var(--text-brand); }
.mo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.mo-grid span { display: flex; flex-direction: column; gap: 4px; font-size: 11px; }
.mo-grid i { height: 52px; border-radius: var(--radius-sm); background: var(--tint-4); }
.mo-branch { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; }
.mo-branch span { padding: 4px 10px; border-radius: var(--radius-sm); background: var(--tint-3); font-size: 11px; }
.mo-span { height: 0; border-top: 2px solid var(--green-9); }
.mo-cursor { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: rgba(43, 108, 246, 0.35); border: 2px solid #2b6cf6; opacity: 0; z-index: 5; }
.mo-stack > .mo-tag { right: auto; }
.mo-dot-ok { background: var(--green-9); }
.mo-card-bad { border-color: #e5484d; }
/* 시연 무대는 560px 고정 — 본문 폭 맞춤은 client.js 가 zoom 으로 한다 */
.pv .pv-screen { width: 560px; max-width: none; }
.pv .pv-steps { max-width: none; }
/* 단계 칩 = 버튼. 누르면 그 장면에서 멈춘다(client.js) */
.pv-steps { align-items: center; }
.pv .pv-step { border: 0; font: inherit; font-size: 12px; line-height: 20px; cursor: pointer; }
.pv .pv-step:hover { box-shadow: inset 0 0 0 1px var(--tint-8); }
.pv-play { position: relative; flex: none; width: 24px; height: 24px; padding: 0; border: 1px solid var(--tint-6); border-radius: 50%; background: #fff; cursor: pointer; }
.pv-play i, .pv-play i::after { position: absolute; top: 7px; width: 3px; height: 8px; border-radius: 1px; background: var(--tint-11); }
.pv-play i { left: 8px; }
.pv-play i::after { content: ""; top: 0; left: 5px; }
.pv.is-paused .pv-play i { left: 9px; width: 0; height: 0; border-radius: 0; background: none; border-style: solid; border-width: 5px 0 5px 8px; border-color: transparent transparent transparent var(--tint-11); }
.pv.is-paused .pv-play i::after { display: none; }
/* 결제 흐름 모션의 결제 상태 칸 — 제목 왼쪽 · 상태 칩 오른쪽 한 줄 */
.mo-pg-confirm .st { flex-direction: row; align-items: center; justify-content: space-between; }
.mo-pg-confirm .st .mo-stack { flex: 1; min-width: 0; height: 22px; }
.mo-pg-confirm .st .mo-stack > .mo-tag { left: auto; right: 0; }
/* 헤드리스 시연(cm-headless) — 왼쪽 상품 데이터 · 오른쪽 템플릿 네 벌. 템플릿마다 --ac 하나로 색을 바꾼다 */
.mo-cm-headless .d { display: flex; justify-content: space-between; align-items: center; padding: 5px 8px; border: 1.5px solid var(--tint-6); border-radius: 6px; background: #fff; font-size: 11px; line-height: 15px; }
.mo-cm-headless .d em { font-style: normal; color: var(--tint-9); font-family: var(--font-mono); }
.mo-cm-headless .dsub { margin-top: -2px; color: var(--tint-9); font-size: 10px; }
.mo-cm-headless .mo-ai { display: flex; flex-direction: column; gap: 4px; max-width: 220px; padding: 10px 12px; border-radius: 12px; background: var(--tint-3); font-size: 12px; }
.mo-cm-headless .mo-ai b { color: var(--text-brand); font-size: 11px; }
.mo-cm-headless .t { --ac: #1f1f1f; }
.mo-cm-headless .tB { --ac: #8a5a3c; font-family: Georgia, "Nanum Myeongjo", serif; }
.mo-cm-headless .tC { --ac: #e0301e; }
.mo-cm-headless .tD { --ac: #2b6cf6; }
.mo-cm-headless .g3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.mo-cm-headless .pc { display: flex; flex-direction: column; gap: 2px; padding: 3px; border: 1.5px solid transparent; border-radius: 6px; font-size: 10px; line-height: 13px; }
.mo-cm-headless .pc i, .mo-cm-headless .lr i, .mo-cm-headless .mag i { display: block; border-radius: 4px; background: color-mix(in srgb, var(--ac) 16%, var(--tint-3)); }
.mo-cm-headless .pc i { height: 64px; }
.mo-cm-headless .sm .pc i { height: 42px; }
.mo-cm-headless .pc em, .mo-cm-headless .lr em { font-style: normal; font-weight: 700; color: var(--ac); }
.mo-cm-headless .hx { display: flex; flex-direction: column; justify-content: flex-end; height: 72px; padding: 10px 12px; border-radius: 6px; background: color-mix(in srgb, var(--ac) 8%, #fff); border: 1px solid var(--tint-4); }
.mo-cm-headless .hx span, .mo-cm-headless .mag span { font-size: 9px; letter-spacing: .14em; font-weight: 700; color: var(--ac); }
.mo-cm-headless .hx b { font-size: 15px; }
.mo-cm-headless .mag { display: flex; gap: 10px; height: 92px; }
.mo-cm-headless .mag i { flex: 1.2; }
.mo-cm-headless .mag div { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.mo-cm-headless .mag b { font-size: 15px; line-height: 19px; }
.mo-cm-headless .bn { display: flex; gap: 6px; height: 52px; }
.mo-cm-headless .bn span { flex: 1; display: flex; align-items: flex-end; padding: 8px; border-radius: 6px; background: var(--ac); color: #fff; font-size: 11px; font-weight: 700; }
.mo-cm-headless .bn span + span { background: var(--tint-12); }
.mo-cm-headless .ttl { margin: 2px 0 0; font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.mo-cm-headless .car { display: flex; align-items: center; gap: 4px; }
.mo-cm-headless .car .g3 { flex: 1; }
.mo-cm-headless .car s { text-decoration: none; color: var(--tint-8); font-size: 16px; }
.mo-cm-headless .hd { display: flex; align-items: center; height: 30px; margin: -12px -12px 2px; padding: 0 12px; background: var(--tint-12); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .24em; }
.mo-cm-headless .lr { display: flex; align-items: center; gap: 10px; padding: 4px 0; border-bottom: 1px solid var(--tint-4); font-size: 11px; }
.mo-cm-headless .lr i { flex: none; width: 34px; height: 34px; }
.mo-cm-headless .lr em { margin-left: auto; }
.mo-cm-headless .tD .mo-btn { background: var(--ac); }
.mo-cm-headless .api .mo-log { font-family: inherit; }
.mo-cm-headless .pk { z-index: 3; }
.mo-cm-headless .lst { height: 25px; min-width: 0; }
/* 화면 영상(::: preview rec-*) */
.rv-frame { overflow: hidden; border: 1px solid var(--tint-6); border-radius: var(--radius-lg); background: var(--tint-2); }
.rv video { display: block; width: 100%; height: auto; }
.rv-mobile .rv-frame { width: 300px; max-width: 100%; margin: 0 auto; border-radius: 28px; border: 6px solid var(--tint-12); }
.rv-mobile .pv-steps { justify-content: center; }
/* 데스크톱 녹화는 바깥 .pv 틀이 테두리를 맡는다. 휴대폰 목업은 폰 테두리가 틀이라 바깥 틀 없이 아래에 칩 */
.pv.rv:not(.rv-mobile) > .rv-frame { border: 0; border-radius: 0; }
.pv.rv-mobile { width: auto; overflow: visible; border: 0; border-radius: 0; background: none; }
.pv.rv-mobile > .pv-steps { margin-top: 10px; padding: 0; border-top: 0; background: none; }
.rv .pv-step.is-on { background: var(--green-4); color: var(--text-brand); }
/* 실제 화면 조각 — 영상에서 뽑은 이미지를 화면 칸에 맞춘다 */
.mo-pg-shot { padding: 0; background: #fff; }
.mo-shot { display: block; width: 100%; height: 100%; object-fit: contain; object-position: top center; }
.mo-shot-tall .mo-shot { object-position: center top; background: var(--tint-12); }
.mo-pg-shot.mo-shot-tall { background: #5a5a58; }
.mo-gates { position: absolute; left: 8px; right: 8px; bottom: 8px; display: flex; gap: 4px; flex-wrap: wrap; }
.mo-gates .mo-tag { box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.mo-pg-shot { display: block; }
.mo-pg-shot .mo-shot { min-height: 0; }
.mo-shot-tall .mo-shot { object-fit: cover; object-position: center top; }
/* 본문 이미지 규칙(.doc img — 높이 auto · 테두리 · 확대 커서)이 화면 조각에 걸리지 않게 */
.doc .mo .mo-shot { width: 100%; height: 100%; max-width: none; border: 0; border-radius: 0; cursor: default; }
/* 본문 p 규칙(margin-top)이 모션 제목에 걸리지 않게 */
.mo .mo-title, .mo .mo-lane-title, .mo .mo-branch p { margin: 0; }
/* 좁은 화면 — 무대를 0.85배로 두고 옆으로 밀어 본다(client.js) */
.pv-scroller { overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; border-radius: var(--radius-lg); }
