/* 결과 영상(흰 바탕·크림·연보라)과 같은 제품으로 보이도록 밝은 바탕, 남색 글자, 버튼별 강조색 하나 */
:root {
  --ground: #f4f5f8;
  --floor: #e7e9f0;
  --surface: #ffffff;
  --line: #dcdfe7;
  --ink: #141b34;
  --ink-2: #474e6b;
  --ink-3: #626984;
  --brand: #1e3a8a;
  --accent: var(--brand);
  --ease-out: cubic-bezier(.25, 1, .5, 1);
  --ease-in: cubic-bezier(.5, 0, .75, 0);
  --font: Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #d9dce4;
  font-family: var(--font);
  color: var(--ink);
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

#stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1080px;
  height: 1920px;
  -webkit-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  overflow: hidden;
  background: var(--ground);
}

[hidden] { display: none !important; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
button:focus-visible { outline: 4px solid var(--accent); outline-offset: 6px; }
.icon { display: block; flex: none; }

/* 머리·바닥 */
.topbar {
  position: absolute; left: 72px; top: 56px; z-index: 5;
  display: flex; align-items: baseline;
}
.topbar > * + * { margin-left: 16px; }
.logo { font-size: 40px; font-weight: 800; letter-spacing: -0.01em; color: var(--brand); }
.logo-sub { font-size: 24px; font-weight: 500; color: var(--ink-3); }

/* 어느 화면에서든 업체 페이지로 나갈 수 있는 작은 출구. 업체 브라우저에 뒤로가기가 없을 수 있다 */
.exits { position: absolute; right: 48px; top: 36px; z-index: 30; display: flex; }
.exits > * + * { margin-left: 12px; }
.exit {
  height: 80px; padding: 0 28px; border-radius: 40px;
  font-size: 26px; font-weight: 600; color: var(--ink-2);
  background: var(--surface); border: 2px solid var(--line);
}
.exit:active { background: #eef1f7; }
#stage[data-state="home"] #exitHome { display: none; }

.notice {
  position: absolute; left: 0; right: 0; bottom: 0; height: 96px; z-index: 20;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 500; color: var(--ink-2);
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.floor { position: absolute; left: 0; right: 0; bottom: 96px; background: var(--floor); }
.floor-home { top: 1360px; }
.floor-gen, .floor-outro { top: 1480px; }

/* 화면 전환: 화면은 조용히 바뀌고, 움직임은 생성 연출에만 쓴다 */
.screen { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: none; }
#stage[data-state="home"] .screen-home,
#stage[data-state="article"] .screen-article,
#stage[data-state="gen"] .screen-gen,
#stage[data-state="play"] .screen-play,
#stage[data-state="outro"] .screen-outro { display: block; animation: fade-in 300ms var(--ease-out) both; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

.btn {
  display: flex; align-items: center; justify-content: center;
  border-radius: 32px; font-weight: 700; letter-spacing: -0.01em;
}
.btn:active, .choice:active, .btn-back:active { transform: translateY(2px); }
.btn-primary { height: 240px; font-size: 52px; background: var(--brand); color: var(--surface); }
.btn-secondary { height: 240px; font-size: 48px; background: var(--surface); color: var(--ink); border: 2px solid var(--line); }
.btn-secondary .icon { width: 44px; height: 44px; margin-left: 20px; color: var(--ink-2); }

/* 1. 첫 화면 */
.home-title {
  position: absolute; left: 72px; right: 72px; top: 168px;
  font-size: 88px; line-height: 1.18; font-weight: 800; letter-spacing: -0.02em;
}
.home-sub { position: absolute; left: 72px; top: 400px; font-size: 36px; font-weight: 500; color: var(--ink-2); }

.choices {
  position: absolute; left: 72px; right: 72px; top: 492px;
  display: flex; flex-direction: column;
}
.choices > * + * { margin-top: 24px; }
.choice {
  height: 240px;
  display: flex; align-items: center;
  padding: 0 32px 0 48px; text-align: left;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 32px;
}
.choice:active { background: #eef1f7; border-color: var(--brand); }
.choice-body { flex: 1; min-width: 0; margin-right: 32px; display: flex; flex-direction: column; }
.choice-body > * + * { margin-top: 18px; }
.choice-text { font-size: 44px; line-height: 1.28; font-weight: 700; letter-spacing: -0.015em; }
.recipe > * + * { margin-left: 10px; }
.recipe { display: flex; align-items: center; font-size: 26px; font-weight: 500; color: var(--ink-3); white-space: nowrap; }
.recipe .recipe-icon { width: 30px; height: 30px; color: var(--ink-2); }
.recipe .recipe-arrow { width: 24px; height: 24px; }
.recipe b { font-weight: 700; color: var(--ink); }
.cta {
  flex: none; height: 104px; padding: 0 32px 0 36px;
  display: flex; align-items: center;
  border-radius: 52px; background: var(--brand); color: var(--surface);
  font-size: 34px; font-weight: 700;
}
.cta .icon { width: 34px; height: 34px; margin-left: 12px; }

/* 대기 연출: 결과를 보여 주지 않고 「자료 → 자산 → 영상」 흐름만 천천히 돈다 */
.idle-flow {
  position: absolute; left: 340px; width: 400px; top: 170px;
  display: flex; align-items: flex-start; list-style: none;
}
.idle-flow li:not(.link) {
  width: 88px; display: flex; flex-direction: column; align-items: center;
  font-size: 26px; font-weight: 600; color: var(--ink-2);
}
.idle-flow .node {
  width: 88px; height: 88px; margin-bottom: 14px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 2px solid var(--line); color: var(--ink-3);
  animation: node-on 6s var(--ease-out) infinite;
}
.idle-flow .node .icon { width: 40px; height: 40px; }
.idle-flow li:nth-child(3) .node { animation-delay: 2s; }
.idle-flow li:nth-child(5) .node { animation-delay: 4s; }
@keyframes node-on {
  0%, 30% { background: var(--brand); border-color: var(--brand); color: var(--surface); }
  40%, 100% { background: var(--surface); border-color: var(--line); color: var(--ink-3); }
}
.idle-flow .link { flex: 1; height: 2px; margin-top: 43px; background: var(--line); overflow: hidden; }
.idle-flow .link::after {
  content: ''; display: block; height: 100%; background: var(--brand);
  transform-origin: left; transform: scaleX(0);
  animation: link-on 6s linear infinite;
}
.idle-flow li:nth-child(4)::after { animation-delay: 2s; }
@keyframes link-on {
  0%, 15% { transform: scaleX(0); }
  33% { transform: scaleX(1); }
  45%, 100% { transform: scaleX(1); opacity: 0; }
}

.preview {
  position: absolute; left: 428px; top: 24px; width: 224px; height: 398px;
  border-radius: 20px; overflow: hidden;
  background: var(--surface); border: 2px solid var(--line);
}
.preview video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 2~4. 생성 연출 */
.gen-question {
  position: absolute; left: 72px; right: 72px; top: 156px;
  display: flex; align-items: center;
  font-size: 34px; font-weight: 600; color: var(--ink-2);
}
.gen-question > * + * { margin-left: 16px; }
.gen-question .icon { width: 44px; height: 44px; color: var(--accent); }

.progress { position: absolute; left: 72px; right: 72px; top: 236px; }
.progress-labels { display: flex; list-style: none; font-size: 30px; font-weight: 700; color: var(--ink-3); }
.progress-labels li { flex: 1; padding-bottom: 14px; }
.progress-track { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); }
#stage[data-state="gen"] .progress-fill { animation: fill 10000ms linear both; }
@keyframes fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
#stage[data-phase="1"] [data-step="1"],
#stage[data-phase="2"] [data-step="2"],
#stage[data-phase="3"] [data-step="3"],
#stage[data-phase="done"] [data-step="3"] { color: var(--ink); }

.phase { position: absolute; left: 72px; right: 72px; top: 380px; height: 1080px; display: none; }
#stage[data-phase="1"] .phase-1,
#stage[data-phase="2"] .phase-2,
#stage[data-phase="3"] .phase-3,
#stage[data-phase="done"] .phase-3 { display: block; }
.phase-title { font-size: 64px; font-weight: 800; letter-spacing: -0.02em; animation: rise 400ms var(--ease-out) both; }
.phase-note { position: absolute; left: 0; top: 820px; font-size: 34px; font-weight: 500; color: var(--ink-2); animation: rise 400ms 1400ms var(--ease-out) both; }

/* ① 지식을 모으는 중: 문서가 한 장씩 지식 창고로 들어가고 숫자가 올라간다 */
.intake { position: absolute; left: 0; right: 0; top: 140px; height: 760px; }
.doc {
  position: absolute; top: 0; width: 280px; height: 210px; padding: 28px;
  display: flex; flex-direction: column;
  background: var(--surface); border: 2px solid var(--line); border-radius: 20px;
  animation: drop 900ms var(--ease-in) both;
}
.doc i + i { margin-top: 12px; }
.doc i { display: block; height: 8px; border-radius: 4px; background: var(--line); }
.doc i:nth-child(2) { width: 80%; }
.doc i:nth-child(3) { width: 55%; }
.doc span { margin-top: auto; font-size: 30px; font-weight: 700; }
.doc-1 { left: 0; animation-delay: 300ms; }
.doc-2 { left: 328px; animation-delay: 900ms; }
.doc-3 { left: 656px; animation-delay: 1500ms; }
@keyframes drop {
  0%, 30% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateY(420px) scale(0.6); }
}
.tray {
  position: absolute; left: 0; right: 0; top: 380px; height: 380px; padding: 48px;
  display: flex; flex-direction: column; justify-content: space-between;
  background: var(--surface); border: 2px solid var(--line); border-radius: 32px;
}
.tray-label { font-size: 32px; font-weight: 700; color: var(--ink-2); }
.tray-list > * + * { margin-left: 32px; }
.tray-list { list-style: none; display: flex; font-size: 30px; font-weight: 600; color: var(--ink); }
.tray-list li { display: flex; align-items: center; animation: rise 300ms var(--ease-out) both; }
.tray-list .icon { width: 34px; height: 34px; margin-right: 10px; color: var(--accent); }
.tray-item-1 { animation-delay: 1150ms; }
.tray-item-2 { animation-delay: 1750ms; }
.tray-item-3 { animation-delay: 2350ms; }
.tray-count b { font-size: 132px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.tray-count small { font-size: 48px; font-weight: 700; color: var(--accent); margin-left: 12px; }

/* ② 지식을 자산으로: 카드가 차례로 놓인다 */
.asset-cards {
  position: absolute; left: 0; right: 0; top: 140px;
  display: flex; flex-wrap: wrap; justify-content: space-between;
}
.asset-cards > * { width: 456px; margin-bottom: 24px; }
.asset-card {
  height: 300px; padding: 40px;
  display: flex; flex-direction: column; justify-content: space-between;
  background: var(--surface); border: 2px solid var(--line); border-radius: 28px;
  font-size: 40px; font-weight: 700; line-height: 1.25; letter-spacing: -0.015em;
  animation: rise 500ms var(--ease-out) both;
}
.asset-card .icon { width: 64px; height: 64px; color: var(--accent); }
.card-1 { animation-delay: 150ms; }
.card-2 { animation-delay: 400ms; }
.card-3 { animation-delay: 650ms; }
.card-4 { animation-delay: 900ms; }

/* ③ 영상으로 만드는 중: 장면이 타임라인에 붙고 자막·목소리가 얹힌다 */
.timeline {
  position: absolute; left: 0; right: 0; top: 140px; height: 520px; padding: 32px;
  display: flex; flex-direction: column;
  background: var(--surface); border: 2px solid var(--line); border-radius: 32px;
}
.timeline > .track + .track { margin-top: 20px; }
.track { display: flex; align-items: center; flex: 1; }
.track-name { margin-right: 20px; }
.track-name { flex: none; width: 110px; font-size: 28px; font-weight: 600; color: var(--ink-3); }
.track-body {
  flex: 1; height: 100%; padding: 0 12px;
  display: flex; align-items: center;
  background: var(--ground); border-radius: 16px; overflow: hidden;
}
.track-body > * + * { margin-left: 10px; }
.scene {
  flex: 1; height: 104px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 2px solid var(--line); border-radius: 12px;
  animation: rise 400ms var(--ease-out) both;
}
.scene .icon { width: 48px; height: 48px; color: var(--accent); }
.scene b { font-size: 26px; font-weight: 700; color: var(--ink-2); }
.scene-1 { animation-delay: 100ms; } .scene-2 { animation-delay: 300ms; } .scene-3 { animation-delay: 500ms; }
.scene-4 { animation-delay: 700ms; } .scene-5 { animation-delay: 900ms; }
.subs i {
  flex: 1; height: 40px; border-radius: 10px; background: var(--ink);
  transform-origin: left; animation: grow-x 400ms var(--ease-out) both;
}
.subs i:nth-child(1) { animation-delay: 900ms; } .subs i:nth-child(2) { animation-delay: 1100ms; }
.subs i:nth-child(3) { animation-delay: 1300ms; } .subs i:nth-child(4) { animation-delay: 1500ms; }
@keyframes grow-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.voice > * + * { margin-left: 6px; }
.voice i {
  flex: 1; border-radius: 4px; background: var(--accent);
  animation: grow-y 400ms var(--ease-out) both;
}
@keyframes grow-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.playhead {
  position: absolute; top: 20px; bottom: 20px; left: 162px; width: 4px; border-radius: 2px;
  background: var(--ink);
  animation: sweep 2400ms 200ms linear both;
}
@keyframes sweep { from { transform: translateX(0); } to { transform: translateX(742px); } }
.done {
  position: absolute; left: 0; top: 720px; display: none;
  align-items: center;
  font-size: 88px; font-weight: 800; letter-spacing: -0.02em;
}
.done .icon { width: 88px; height: 88px; margin-right: 24px; color: var(--accent); }
#stage[data-phase="done"] .done { display: flex; animation: rise 400ms var(--ease-out) both; }

/* 5. 결과 영상: 영상이 주인공. 「시연용 예시」 표시는 영상 안에 있다 */
.player {
  position: absolute; left: 144px; top: 128px; width: 792px; height: 1408px;
  border-radius: 24px; overflow: hidden;
  background: var(--surface); border: 2px solid var(--line);
}
.player video { width: 100%; height: 100%; object-fit: contain; display: block; }
.player-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: rgba(20, 27, 52, 0.12); }
.player-progress div { height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); transition: transform 250ms linear; }
.play-actions { position: absolute; left: 144px; right: 144px; top: 1564px; height: 240px; display: flex; }
.btn-back {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  font-size: 48px; font-weight: 700; color: var(--ink);
  background: var(--surface); border: 2px solid var(--line); border-radius: 32px;
}
.btn-back .icon { width: 48px; height: 48px; margin-right: 20px; color: var(--ink-2); }

/* 6. 마무리: 방금 본 영상이 무엇으로 만들어졌는지 */
.outro-title { position: absolute; left: 72px; right: 72px; top: 200px; font-size: 80px; font-weight: 800; letter-spacing: -0.02em; }
.recap { position: absolute; left: 72px; right: 72px; top: 380px; display: flex; align-items: flex-start; }
.recap > * + * { margin-left: 20px; }
.recap-col { flex: 1; padding-top: 28px; border-top: 4px solid var(--accent); }
.recap-col h3 { font-size: 36px; font-weight: 800; margin-bottom: 20px; }
.recap-col ul { list-style: none; font-size: 28px; font-weight: 500; line-height: 1.55; color: var(--ink-2); }
.recap-arrow { width: 40px; height: 40px; margin-top: 30px; color: var(--ink-3); }
.outro-actions { position: absolute; left: 72px; right: 72px; top: 840px; display: flex; flex-direction: column; }
.outro-actions > * + * { margin-top: 24px; }

/* 캐릭터: 투명도·반전·색 변경·찌그러뜨림·회전 없이 위치(translate)만 쓴다 */
.cast { position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none; z-index: 10; }
.actor { position: absolute; left: 0; top: 0; visibility: hidden; }
.actor img { display: block; animation: bob 3s ease-in-out infinite; }
.actor-doremi img { width: 223px; }
.actor-doremi-side img { width: 204px; }
.actor-pli img { width: 278px; animation-delay: -1.5s; }
.actor::after {
  content: ''; position: absolute; left: 18%; right: 18%; bottom: -8px; height: 18px; z-index: -1;
  border-radius: 50%; background: rgba(20, 27, 52, 0.12);
}
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.carry-doc {
  position: absolute; left: 64px; top: -78px; width: 72px; height: 90px; padding: 14px 12px;
  display: flex; flex-direction: column;
  background: var(--surface); border: 2px solid var(--line); border-radius: 8px;
  animation: bob 3s ease-in-out infinite;
}
.carry-doc i + i { margin-top: 8px; }
.carry-doc i { display: block; height: 6px; border-radius: 3px; background: var(--line); }

#stage[data-state="home"] .actor-doremi { visibility: visible; transform: translate(84px, 1572px); }
#stage[data-state="home"] .actor-pli { visibility: visible; transform: translate(760px, 1436px); }

#stage[data-state="gen"][data-phase="1"] .actor-doremi-side { visibility: visible; animation: walk-in 2600ms 200ms linear both; }
@keyframes walk-in { from { transform: translate(1100px, 1568px); } to { transform: translate(600px, 1568px); } }
#stage[data-state="gen"][data-phase="2"] .actor-doremi,
#stage[data-state="gen"][data-phase="3"] .actor-doremi,
#stage[data-state="gen"][data-phase="done"] .actor-doremi { visibility: visible; transform: translate(120px, 1572px); }
#stage[data-state="gen"][data-phase="3"] .actor-pli { visibility: visible; animation: pli-in 700ms 300ms var(--ease-out) both; }
#stage[data-state="gen"][data-phase="done"] .actor-pli { visibility: visible; transform: translate(720px, 1436px); }
@keyframes pli-in { from { transform: translate(1120px, 1436px); } to { transform: translate(720px, 1436px); } }

#stage[data-state="outro"] .actor-doremi { visibility: visible; transform: translate(220px, 1572px); }
#stage[data-state="outro"] .actor-pli { visibility: visible; transform: translate(620px, 1436px); }

/* ── v2: 버튼 ① 「이슈 기사 하나, 영상 3가지」 ─────────────────────────── */

/* 1-1. 기사 넣기(v3 체험형): 바탕화면의 기사 파일 → 자료 입력 칸 → 영상 만들기 */
.article-head {
  position: absolute; left: 72px; right: 72px; top: 168px;
  font-size: 72px; line-height: 1.2; font-weight: 800; letter-spacing: -0.02em;
}

/* 안내: 왼쪽 위. 기사 한 장은 자료 칸의 오른쪽 대각선 위에 비스듬히 놓여 있다 */
.desk-hint {
  position: absolute; left: 72px; top: 420px; width: 440px;
  display: flex; align-items: flex-start;
  font-size: 32px; line-height: 1.4; font-weight: 700; color: var(--ink);
  word-break: keep-all;
}
.desk-hint small { display: block; margin-top: 8px; font-size: 26px; font-weight: 500; color: var(--ink-2); }
.desk-hint .icon { width: 40px; height: 40px; margin: 2px 14px 0 0; color: var(--accent); }

.file {
  position: absolute; left: 590px; top: 440px; width: 380px;
  cursor: grab; touch-action: none; -ms-touch-action: none;
  z-index: 25;
}
.file:focus { outline: none; }
.file:focus-visible .file-card { outline: 4px solid var(--accent); outline-offset: 6px; }
/* 기사 한 장: 신문에서 오려 낸 종이처럼 작게, 7도 기울여 둔다 */
.file-card {
  display: flex; flex-direction: column; padding: 24px 28px 22px;
  background: var(--surface); border-radius: 14px;
  box-shadow: 0 12px 28px rgba(20, 27, 52, 0.16), 0 2px 4px rgba(20, 27, 52, 0.08);
  -webkit-transform: rotate(-7deg); transform: rotate(-7deg);
  transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out);
}
.file-press {
  align-self: flex-start; height: 32px; padding: 0 10px; border-radius: 6px;
  display: flex; align-items: center;
  font-size: 18px; font-weight: 800; letter-spacing: -0.02em; color: var(--surface); background: #0b3d91;
}
.file-name {
  margin-top: 14px;
  font-size: 26px; line-height: 1.34; font-weight: 800; letter-spacing: -0.02em;
  word-break: keep-all;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.file-date { margin-top: 10px; font-size: 20px; font-weight: 500; color: var(--ink-3); }

/* 자료 칸으로 가는 길: 점선 화살표 */
.drag-path {
  position: absolute; left: 330px; top: 640px; width: 400px; height: 260px;
  fill: none; stroke: #b6bdd0; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 2 12;
  pointer-events: none;
}
#stage[data-article="in"] .drag-path { visibility: hidden; }

/* 선택(한 번 누름) */
#stage[data-selected="on"] .file-card { box-shadow: 0 0 0 5px var(--accent), 0 12px 28px rgba(20, 27, 52, 0.16); }

/* 끌 때: 들어 올리며 기울기를 거의 펴고, 놓을 자리를 가리지 않게 살짝 줄인다 */
.file.is-dragging { cursor: grabbing; z-index: 45; }
.file.is-dragging .file-card {
  -webkit-transform: rotate(-2deg) scale(0.92); transform: rotate(-2deg) scale(0.92);
  box-shadow: 0 30px 50px rgba(20, 27, 52, 0.26), 0 4px 8px rgba(20, 27, 52, 0.1);
}
.file.is-returning { transition: transform 300ms var(--ease-out); }

.file-actions {
  position: absolute; left: 72px; top: 590px; width: 360px;
  display: none; flex-direction: column;
}
#stage[data-selected="on"] .file-actions { display: flex; animation: rise 250ms var(--ease-out) both; }
.file-actions > * + * { margin-top: 20px; }
.pill {
  height: 104px; padding: 0 36px; border-radius: 52px;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 700; color: var(--ink);
  background: var(--surface); border: 2px solid var(--line);
}
.pill-strong { background: var(--accent); border-color: var(--accent); color: var(--surface); }
.pill:active { transform: translateY(2px); }

/* 기사가 칸에 들어가면 위의 기사는 사라지고 칸 안에 반듯하게 놓인다 */
#stage[data-article="in"] .file { visibility: hidden; }

/* 자료 입력 칸 */
.intake-zone {
  position: absolute; left: 72px; right: 72px; top: 900px; height: 308px; padding: 32px 40px;
  border-radius: 32px; background: var(--surface); border: 3px dashed #bcc3d4;
  transition: background 200ms var(--ease-out), border-color 200ms var(--ease-out);
}
.zone-head { display: flex; align-items: center; justify-content: space-between; }
.zone-title { font-size: 34px; font-weight: 800; letter-spacing: -0.015em; }
.zone-out { display: flex; align-items: center; font-size: 26px; font-weight: 600; color: var(--ink-3); }
.zone-out .icon { width: 28px; height: 28px; margin-right: 10px; }
.zone-empty { display: flex; align-items: center; justify-content: center; height: 188px; color: var(--ink-3); }
.zone-target .icon { width: 60px; height: 60px; margin-right: 20px; }
.zone-text { font-size: 34px; font-weight: 600; }
.zone-card { display: none; align-items: center; height: 188px; }
#stage[data-dragging="on"] .intake-zone { border-color: var(--accent); }
#stage[data-dragging="on"] .zone-empty { color: var(--accent); }
.intake-zone.is-over { background: #eef1fb; border-style: solid; }
#stage[data-article="in"] .intake-zone { border: 3px solid var(--accent); }
#stage[data-article="in"] .zone-empty { display: none; }
#stage[data-article="in"] .zone-card { display: flex; animation: rise 300ms var(--ease-out) both; }
.zone-card-icon {
  position: relative; flex: none; width: 96px; height: 120px; padding: 46px 14px 0; margin-right: 28px;
  display: flex; flex-direction: column;
  background: var(--surface); border-radius: 8px 24px 8px 8px;
  box-shadow: 0 6px 14px rgba(20, 27, 52, 0.14);
}
.mini-press {
  position: absolute; left: 10px; top: 12px; padding: 3px 7px; border-radius: 5px;
  font-size: 13px; font-weight: 800; color: var(--surface); background: #0b3d91;
}
.zone-card-icon i { display: block; height: 6px; border-radius: 3px; background: var(--line); }
.zone-card-icon i + i { margin-top: 10px; width: 70%; }
.zone-card-body { flex: 1; min-width: 0; }
.zone-card-meta { font-size: 24px; font-weight: 600; color: var(--ink-3); }
.zone-card-title {
  margin-top: 8px; font-size: 32px; line-height: 1.3; font-weight: 700; letter-spacing: -0.015em;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.zone-remove {
  flex: none; height: 88px; margin-left: 24px; padding: 0 32px; border-radius: 44px;
  font-size: 28px; font-weight: 700; color: var(--ink-2); border: 2px solid var(--line);
}
.zone-remove:active { background: #eef1f7; }

.btn-make {
  position: absolute; left: 72px; right: 72px; top: 1240px; height: 180px;
  font-size: 56px; background: var(--accent); color: var(--surface);
  transition: background 200ms var(--ease-out), color 200ms var(--ease-out);
}
.btn-make .make-off { display: none; }
.btn-make:disabled { background: #dfe2ea; color: var(--ink-3); font-size: 40px; cursor: default; }
.btn-make:disabled .make-on { display: none; }
.btn-make:disabled .make-off { display: inline; }
.btn-make:disabled:active { transform: none; }
.floor-article { top: 1460px; }
#stage[data-state="article"] .actor-doremi { visibility: visible; transform: translate(84px, 1572px); }
#stage[data-state="article"] .actor-pli { visibility: visible; transform: translate(760px, 1436px); }

/* 원문 보기: 화면 안 창. 아래 필수 문구는 가리지 않는다 */
.viewer {
  position: absolute; left: 0; right: 0; top: 0; bottom: 96px; z-index: 40; padding: 40px 32px 32px;
  display: flex; flex-direction: column;
  background: #1d2440;
  animation: fade-in 200ms var(--ease-out) both;
}
.viewer-bar { flex: none; height: 112px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.viewer-tabs { display: flex; padding: 8px; border-radius: 56px; background: rgba(255, 255, 255, 0.12); }
.viewer-tab {
  height: 88px; padding: 0 40px; border-radius: 44px;
  font-size: 30px; font-weight: 700; color: var(--surface);
}
.viewer[data-view="frame"] #tabFrame,
.viewer[data-view="card"] #tabCard { background: var(--surface); color: var(--ink); }
.viewer-hint { flex: 1; margin: 0 24px; font-size: 24px; font-weight: 500; color: #b9bfd6; text-align: center; }
.viewer[data-view="card"] .viewer-hint { visibility: hidden; }
.viewer-close {
  height: 104px; padding: 0 48px; border-radius: 52px;
  font-size: 34px; font-weight: 800; color: var(--ink); background: var(--surface);
}
.viewer-close:active, .viewer-tab:active { transform: translateY(2px); }
.viewer-frame, .viewer-card { flex: 1; min-height: 0; border-radius: 24px; background: var(--surface); overflow: hidden; }
.viewer-frame { position: relative; display: none; }
.viewer[data-view="frame"] .viewer-frame { display: block; }
/* 원문은 PC 화면 폭(1280px)으로 그리고 창에 맞춰 줄인다(1016 / 1280) */
.viewer-frame iframe {
  position: absolute; left: 0; top: 0; width: 1280px; height: 2053px; border: 0; background: var(--surface);
  transform-origin: 0 0; -webkit-transform: scale(0.79375); transform: scale(0.79375);
}
.viewer-loading {
  position: absolute; left: 0; right: 0; top: 45%; text-align: center;
  font-size: 32px; font-weight: 600; color: var(--ink-3);
}
.viewer-card { display: none; padding: 64px 64px 56px; flex-direction: column; }
.viewer[data-view="card"] .viewer-card { display: flex; }
.vc-meta { margin-top: 20px; font-size: 28px; font-weight: 600; color: var(--ink-3); }
.vc-title { font-size: 54px; line-height: 1.28; font-weight: 800; letter-spacing: -0.02em; }
.vc-summary { margin-top: 48px; padding-top: 40px; border-top: 2px solid var(--line); list-style: none; }
.vc-summary li { font-size: 36px; line-height: 1.5; font-weight: 500; color: var(--ink); }
.vc-summary li + li { margin-top: 20px; }
.vc-note { margin-top: 32px; font-size: 26px; line-height: 1.5; font-weight: 500; color: var(--ink-3); }
.vc-qr-row { margin-top: 64px; display: flex; align-items: center; padding: 40px; border-radius: 24px; background: var(--ground); }
.vc-qr { flex: none; width: 300px; height: 300px; border-radius: 12px; background: var(--surface); }
.vc-qr-side { flex: 1; min-width: 0; margin-left: 48px; }
.vc-url { font-size: 26px; font-weight: 600; color: var(--ink-2); word-break: break-all; margin-bottom: 28px; }
.vc-blocked { margin-top: 20px; font-size: 26px; font-weight: 600; color: #a33a1c; }

/* 진행 연출(버튼 ①): 기사 분석 → 대본 → 장면 생성 → 완성 */
.analyze, .scripts { display: none; }
#stage[data-kind="multi"] .intake,
#stage[data-kind="multi"] .asset-cards { display: none; }
#stage[data-kind="multi"] .analyze,
#stage[data-kind="multi"] .scripts { display: block; position: absolute; left: 0; right: 0; top: 140px; }
#stage[data-kind="multi"][data-phase="done"] [data-step="3"] { color: var(--ink-3); }
#stage[data-kind="multi"][data-phase="done"] [data-step="4"] { color: var(--ink); }

.an-doc {
  position: relative; height: 320px; padding: 44px 48px; overflow: hidden;
  background: var(--surface); border: 2px solid var(--line); border-radius: 32px;
}
.an-press {
  display: inline-block; padding: 6px 16px; border-radius: 10px;
  font-size: 26px; font-weight: 800; color: var(--surface); background: #0b3d91;
}
.an-title { margin-top: 24px; font-size: 44px; line-height: 1.3; font-weight: 800; letter-spacing: -0.02em; }
.an-date { margin-top: 12px; font-size: 26px; font-weight: 500; color: var(--ink-3); }
/* 읽는 줄: 위에서 아래로 두 번 훑는다 */
.an-scan {
  position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--accent);
  box-shadow: 0 0 0 10px rgba(42, 76, 200, 0.12);
  opacity: 0;
  animation: scan 1500ms 200ms var(--ease-out) 2;
}
@keyframes scan {
  0% { opacity: 1; transform: translateY(0); }
  85% { opacity: 1; }
  100% { opacity: 0; transform: translateY(314px); }
}
.an-label { margin-top: 56px; font-size: 32px; font-weight: 700; color: var(--ink-2); }
.an-facts { margin-top: 24px; list-style: none; display: flex; flex-wrap: wrap; justify-content: space-between; }
.an-facts li {
  width: 456px; height: 128px; margin-bottom: 24px; padding: 0 36px;
  display: flex; align-items: center;
  font-size: 38px; font-weight: 800; letter-spacing: -0.015em;
  background: var(--surface); border: 2px solid var(--line); border-radius: 24px;
  animation: rise 400ms var(--ease-out) both;
}
.an-facts .icon { width: 44px; height: 44px; margin-right: 16px; color: var(--accent); }
.fact-1 { animation-delay: 1200ms; } .fact-2 { animation-delay: 1700ms; }
.fact-3 { animation-delay: 2200ms; } .fact-4 { animation-delay: 2700ms; }

.script {
  height: 196px; padding: 36px 44px;
  display: flex; flex-direction: column; justify-content: center;
  background: var(--surface); border: 2px solid var(--line); border-radius: 28px;
  animation: rise 400ms var(--ease-out) both;
}
.script + .script { margin-top: 24px; }
.script-name { font-size: 28px; font-weight: 700; color: var(--accent); }
.script-line { margin-top: 14px; font-size: 40px; line-height: 1.3; font-weight: 700; letter-spacing: -0.015em; }
/* 대본이 왼쪽부터 써진다 */
.script-line span {
  display: inline-block;
  -webkit-clip-path: inset(0 100% 0 0); clip-path: inset(0 100% 0 0);
  animation: type 1100ms steps(18, end) both;
}
@keyframes type { to { -webkit-clip-path: inset(0 0 0 0); clip-path: inset(0 0 0 0); } }
.script-1 { animation-delay: 100ms; } .script-1 .script-line span { animation-delay: 400ms; }
.script-2 { animation-delay: 1100ms; } .script-2 .script-line span { animation-delay: 1400ms; }
.script-3 { animation-delay: 2100ms; } .script-3 .script-line span { animation-delay: 2400ms; }
#stage[data-kind="multi"] .phase-note { top: 860px; }

/* 3. 생성 연출 ③: 세 형식 막대가 동시에 차오른다(버튼 ①만) */
.formats { display: none; }
#stage[data-kind="multi"] .timeline { display: none; }
#stage[data-kind="multi"] .playhead { display: none; }
#stage[data-kind="multi"] .formats {
  position: absolute; left: 0; right: 0; top: 140px; padding: 48px;
  display: block;
  background: var(--surface); border: 2px solid var(--line); border-radius: 32px;
}
.format { display: flex; align-items: center; height: 120px; }
.format + .format { margin-top: 28px; }
.format-name { flex: none; width: 300px; font-size: 38px; font-weight: 700; letter-spacing: -0.015em; }
.format-bar { flex: 1; height: 40px; border-radius: 20px; background: var(--ground); overflow: hidden; }
.format-bar i {
  display: block; height: 100%; border-radius: 20px; background: var(--accent);
  transform-origin: left; -webkit-transform: scaleX(0); transform: scaleX(0);
}
.format-check { width: 56px; height: 56px; margin-left: 24px; color: var(--line); }
#stage[data-phase="3"] .format-bar i,
#stage[data-phase="done"] .format-bar i { animation: grow-x 2200ms 300ms linear both; }
#stage[data-phase="3"] .format-2 .format-bar i,
#stage[data-phase="done"] .format-2 .format-bar i { animation-duration: 2000ms; }
#stage[data-phase="3"] .format-3 .format-bar i,
#stage[data-phase="done"] .format-3 .format-bar i { animation-duration: 2350ms; }
#stage[data-phase="done"] .format-check { color: var(--accent); }

/* 5. 결과 3편: 위 탭으로 지금 몇 번째 형식인지, 아래에 유의 문구와 건너뛰기 */
.clip-tabs, .disclaimer, .btn-next { display: none; }
#stage[data-kind="multi"] .clip-tabs {
  position: absolute; left: 72px; right: 72px; top: 140px; height: 88px;
  display: flex; list-style: none;
}
.clip-tabs li {
  flex: 1; display: flex; align-items: center; justify-content: center;
  border-radius: 44px; border: 2px solid var(--line); background: var(--surface);
  font-size: 30px; font-weight: 700; color: var(--ink-3);
}
.clip-tabs li + li { margin-left: 16px; }
.clip-tabs .tab-check { display: none; width: 32px; height: 32px; margin-right: 10px; }
.clip-tabs li.is-on { background: var(--accent); border-color: var(--accent); color: var(--surface); }
.clip-tabs li.is-done { color: var(--ink); }
.clip-tabs li.is-done .tab-check { display: block; color: var(--accent); }
#stage[data-kind="multi"] .player { left: 216px; top: 256px; width: 648px; height: 1152px; }
#stage[data-kind="multi"] .disclaimer {
  position: absolute; left: 72px; right: 72px; top: 1428px;
  display: block; text-align: center;
  font-size: 30px; font-weight: 600; color: var(--ink-2);
}
#stage[data-kind="multi"] .play-actions { left: 72px; right: 72px; top: 1508px; height: 220px; }
#stage[data-kind="multi"] .btn-back { font-size: 44px; }
#stage[data-kind="multi"] .btn-next {
  flex: 1; margin-left: 24px;
  display: flex; align-items: center; justify-content: center;
  font-size: 44px; font-weight: 700; color: var(--surface);
  background: var(--accent); border-radius: 32px;
}
.btn-next .icon { width: 40px; height: 40px; margin-left: 16px; }
.btn-next:active { transform: translateY(2px); }

/* 6. 마무리(버튼 ①): 기사 1건, 영상 3편 + 유의 문구 */
#stage[data-kind="multi"] .outro-disclaimer { top: 760px; text-align: left; }
/* 한국어 줄바꿈을 어절 단위로(v2 새 글자만, ②·③ 화면은 그대로) */
.article-head, .zone-card-title, .vc-title, .vc-summary, .an-title, .script-line, #stage[data-kind="multi"] .recap { word-break: keep-all; }

/* v3: 버튼 ① 장면 생성 단계가 길어진 만큼 세 형식 막대도 천천히 차오른다 */
#stage[data-kind="multi"][data-phase="3"] .format-bar i,
#stage[data-kind="multi"][data-phase="done"] .format-bar i { animation-duration: 3800ms; }
#stage[data-kind="multi"][data-phase="3"] .format-2 .format-bar i,
#stage[data-kind="multi"][data-phase="done"] .format-2 .format-bar i { animation-duration: 3400ms; }
#stage[data-kind="multi"][data-phase="3"] .format-3 .format-bar i,
#stage[data-kind="multi"][data-phase="done"] .format-3 .format-bar i { animation-duration: 4100ms; }

/* 기사 보기(기본): 사이트 안 기사 화면. 인터넷 없이 동작하고 손가락으로 위아래로 넘긴다 */
.viewer[data-mode="local"] .viewer-tabs,
.viewer[data-mode="local"] .viewer-hint { display: none; }
.viewer[data-mode="local"] .viewer-bar { justify-content: flex-end; }
.viewer-local {
  display: none; flex: 1; min-height: 0; border-radius: 24px; background: var(--surface);
  overflow-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y; overscroll-behavior: contain;
}
.viewer[data-view="local"] .viewer-local { display: block; }
.la { padding: 56px 72px 64px; color: #1b1f2a; }
.la-masthead {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 20px; border-bottom: 3px solid #0b3d91;
}
.la-press { font-size: 34px; font-weight: 900; letter-spacing: -0.03em; color: #0b3d91; }
.la-section { font-size: 22px; font-weight: 600; color: var(--ink-3); }
.la-title { margin-top: 40px; font-size: 52px; line-height: 1.3; font-weight: 800; letter-spacing: -0.025em; word-break: keep-all; }
.la-meta { margin-top: 20px; padding-bottom: 32px; border-bottom: 1px solid var(--line); font-size: 24px; font-weight: 500; color: var(--ink-3); }
.la-figure { margin-top: 40px; padding: 36px 40px; border-radius: 16px; background: #f1f3f8; }
.la-figure img { display: block; width: 100%; border-radius: 10px; }
.la-figure figcaption { margin-top: 12px; font-size: 22px; color: var(--ink-3); }
.la-figure .la-fig-title { margin: 0 0 24px; font-size: 26px; font-weight: 700; color: var(--ink); }
.la-bar { display: flex; align-items: center; height: 64px; }
.la-bar-name { flex: none; width: 150px; font-size: 26px; font-weight: 700; }
.la-bar-track { flex: 1; height: 28px; border-radius: 14px; background: #dfe3ee; overflow: hidden; }
.la-bar-track i { display: block; height: 100%; border-radius: 14px; background: #0b3d91; }
.la-bar b { flex: none; width: 128px; text-align: right; font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; color: #0b3d91; }
.la-bar small { flex: none; width: 150px; text-align: right; font-size: 22px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.la-fig-src { margin-top: 16px; font-size: 20px; color: var(--ink-3); }
.la-body { margin-top: 40px; }
.la-body p { font-size: 32px; line-height: 1.75; font-weight: 400; letter-spacing: -0.01em; word-break: keep-all; }
.la-body p + p { margin-top: 28px; }
.la-foot { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); display: flex; align-items: center; }
.la-note { flex: 1; font-size: 22px; line-height: 1.6; color: var(--ink-3); word-break: keep-all; }
.la-qr { flex: none; margin-left: 40px; display: flex; flex-direction: column; align-items: center; font-size: 20px; color: var(--ink-3); }
.la-qr img { width: 168px; height: 168px; margin-bottom: 10px; }
