/* Cue Maker 공개 페이지
   레이아웃: 무대감독의 프롬프트 북. 본문 왼쪽에 큐 여백(margin rail)을 두고, 조항 번호를 큐 태그처럼 그 여백에 적는다.
   첫 화면의 머리 띠는 앱 화면처럼 두 테마 모두 어둡게(무대 뒤 조명), 나머지는 테마를 따른다.
   색은 앱 아이콘(검은 다이얼, 호박색 진행 호, 흰 바탕)에서 왔다.
   외부 폰트 없음: Apple 기기에서는 SF·Apple SD Gothic Neo·SF Mono로 보인다. */
:root {
  /* 테마를 따르는 색 */
  --paper: #f7f8fa;
  --sheet: #ffffff;
  --ink: #111827;
  --ink-2: #374151;
  --ink-3: #6b7280;
  --rule: #e3e6eb;
  --rule-strong: #c9ced6;
  --amber: #b86e00;        /* 글자로 쓰는 호박색. 흰 바탕 대비 4.5:1 이상 */
  --amber-fill: #f59e0b;   /* 칠하는 호박색: 아이콘의 진행 호 */
  --amber-wash: #fff4dc;
  --link: #1d4ed8;
  --blank-bg: #fde047;
  --blank-ink: #422006;

  /* 두 테마 공통: 무대 띠와 앱 화면 그림 */
  --stage: #0b0f17;
  --stage-2: #111827;
  --stage-3: #1f2937;
  --stage-ink: #e5e7eb;
  --stage-dim: #9ca3af;
  --go: #22c55e;
  --standby: #f59e0b;
  --rec: #dc2626;
  --dept-light: #f59e0b;
  --dept-sound: #3b82f6;
  --dept-fly: #10b981;
  --dept-video: #a855f7;

  --font-sans: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "D2Coding", monospace;

  --t-xs: 0.75rem;
  --t-sm: 0.875rem;
  --t-md: 1rem;
  --t-lg: 1.1875rem;
  --t-xl: 1.5rem;
  --t-2xl: 2.25rem;
  --t-3xl: clamp(2.5rem, 6.4vw, 4.75rem);

  --rail: 6.5rem;          /* 큐 여백 폭 */
  --measure: 40rem;        /* 본문 한 줄 폭 */
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0d1118;
    --sheet: #141a24;
    --ink: #eef0f4;
    --ink-2: #c9ced8;
    --ink-3: #8f98a8;
    --rule: #242c3a;
    --rule-strong: #364152;
    --amber: #fbbf24;
    --amber-fill: #f59e0b;
    --amber-wash: #2a1f08;
    --link: #8ab4ff;
    --blank-bg: #854d0e;
    --blank-ink: #fef9c3;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0d1118;
  --sheet: #141a24;
  --ink: #eef0f4;
  --ink-2: #c9ced8;
  --ink-3: #8f98a8;
  --rule: #242c3a;
  --rule-strong: #364152;
  --amber: #fbbf24;
  --amber-fill: #f59e0b;
  --amber-wash: #2a1f08;
  --link: #8ab4ff;
  --blank-bg: #854d0e;
  --blank-ink: #fef9c3;
  color-scheme: dark;
}

/* ---------- 기본 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--t-md);
  line-height: 1.75;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--amber-fill); outline-offset: 3px; border-radius: 4px; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 12px; z-index: 5; background: var(--sheet); padding: 6px 10px; }

.wrap {
  max-width: 72rem;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

/* 아직 정하지 않은 값. 배포 전에 모두 없어야 합니다 */
.blank {
  background: var(--blank-bg); color: var(--blank-ink);
  padding: 0 0.35em; border-radius: 3px; font-weight: 650;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}

/* ---------- 머리글 ---------- */
.top { border-bottom: 1px solid var(--rule); background: var(--paper); }
.top .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px 24px; padding-block: 14px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none; font-weight: 750; font-size: 1.0625rem; letter-spacing: -0.01em;
}
.brand img { width: 30px; height: 30px; border-radius: 7px; box-shadow: 0 0 0 1px var(--rule); }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 18px; font-size: var(--t-sm); }
.nav a { color: var(--ink-2); text-decoration: none; padding-block: 4px; }
.nav a:hover { color: var(--ink); text-decoration: underline; }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 650; box-shadow: inset 0 -2px 0 var(--amber-fill); }
.nav .lang {
  font-family: var(--font-mono); font-size: var(--t-xs); letter-spacing: 0.06em;
  border: 1px solid var(--rule-strong); border-radius: 999px; padding: 2px 10px; color: var(--ink-2);
}

/* 첫 화면은 머리글이 무대 띠 위에 얹힙니다 */
.home .top { background: var(--stage); border-bottom-color: #1c2331; }
.home .brand { color: var(--stage-ink); }
.home .brand img { box-shadow: none; }
.home .nav a { color: var(--stage-dim); }
.home .nav a:hover { color: var(--stage-ink); }
.home .nav .lang { border-color: #374151; color: var(--stage-dim); }

/* ---------- 첫 화면: 무대 띠 ---------- */
.stage {
  background: var(--stage);
  color: var(--stage-ink);
  background-image:
    radial-gradient(60rem 28rem at 78% -10%, rgba(245, 158, 11, 0.16), transparent 60%),
    radial-gradient(40rem 22rem at 8% 110%, rgba(59, 130, 246, 0.10), transparent 60%);
}
.stage .wrap {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 48px; align-items: center; padding-block: 72px 88px;
}
/* 첫 화면 사진: 무대 옆에서 콜하는 무대감독의 뒷모습. 글자가 놓이는 왼쪽은 어둡게 덮습니다 */
.stage.photo { background: #05070b; }
/* 사진은 오른쪽 칸에만 깔고, 무대감독 뒷모습이 글자에 가리지 않게 사진의 왼쪽(무대감독)을 기준으로 맞춥니다. 무대 쪽이 잘립니다 */
.hero-photo {
  position: absolute; z-index: 0; top: 0; bottom: 0; right: 0; width: 60%;
  background: url("/img/stage-wings.jpg") 22% center / cover no-repeat;
}
.hero-photo::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, #05070b 0%, rgba(5, 7, 11, 0.55) 18%, transparent 40%),
    linear-gradient(0deg, rgba(5, 7, 11, 0.8) 0%, transparent 28%);
}
.stage.photo .wrap { min-height: min(46rem, 88vh); grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); }

/* 장면 사진 띠 */
.scene { margin: 0; position: relative; background: var(--stage); }
.scene img { display: block; width: 100%; height: auto; max-height: 34rem; object-fit: cover; }
.scene figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 48px max(16px, calc((100% - 72rem) / 2)) 18px;
  background: linear-gradient(0deg, rgba(5, 7, 11, 0.85), transparent);
  color: var(--stage-ink); font-size: var(--t-sm);
}
.eyebrow {
  font-family: var(--font-mono); font-size: var(--t-xs); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--standby); margin: 0 0 18px;
}
.stage h1 {
  font-size: var(--t-3xl); line-height: 1.08; letter-spacing: -0.045em; font-weight: 800;
  margin: 0 0 20px; text-wrap: balance;
}
.stage h1 .sub { display: block; color: var(--stage-dim); font-weight: 700; }
.stage .lead { font-size: var(--t-lg); color: #cbd2dc; max-width: 30em; margin: 0 0 28px; line-height: 1.7; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.facts li {
  font-family: var(--font-mono); font-size: var(--t-xs); letter-spacing: 0.04em;
  border: 1px solid #2b3445; color: var(--stage-dim); border-radius: 999px; padding: 4px 12px;
}

/* 화면 예시 그림 (정지) */
.device {
  position: relative; background: #05070b; border-radius: 28px; padding: 14px;
  box-shadow: 0 0 0 1px #262f3f, 0 40px 80px -30px rgba(0, 0, 0, 0.8);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 10px; min-width: 0;
}
.panel {
  background: var(--stage-2); border-radius: 16px; padding: 12px; display: grid; gap: 10px; align-content: start; min-width: 0;
}
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--stage-3); border-radius: 10px; overflow: hidden; font-size: var(--t-xs); text-align: center; }
.tabs span { padding: 6px 0; color: var(--stage-dim); }
.tabs .on { background: #2563eb; color: #fff; font-weight: 700; }
.call {
  border-radius: 12px; padding: 16px 12px 14px; text-align: center; color: #111827;
  background: var(--standby);
}
.call b { display: block; white-space: nowrap; font-family: var(--font-mono); font-size: clamp(1.05rem, 1.9vw, 1.6rem); letter-spacing: 0.04em; line-height: 1.1; }
.call span { display: block; font-size: var(--t-xs); margin-top: 6px; font-weight: 600; }
.call.go { background: var(--go); }
.clock { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: var(--t-xs); color: var(--stage-dim); padding: 0 2px; }
.clock b { color: var(--stage-ink); font-weight: 600; }
.cues { display: grid; gap: 6px; }
.cue {
  display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center;
  background: var(--stage-3); border-radius: 8px; padding: 7px 10px; font-size: var(--t-xs); color: var(--stage-ink);
}
.cue .t { font-family: var(--font-mono); color: var(--stage-dim); font-variant-numeric: tabular-nums; }
.cue > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cue.done { opacity: 0.55; }
.cue.done .t { color: var(--go); }
.cue.next { box-shadow: inset 3px 0 0 var(--standby); }

.page {
  background: #fff; color: #111; border-radius: 6px; padding: 16px 14px 18px; min-width: 0;
  font-size: 0.625rem; line-height: 1.5; font-family: Helvetica, Arial, var(--font-sans);
}
.page .head { font-weight: 700; margin-bottom: 8px; letter-spacing: 0.02em; }
.line { display: grid; grid-template-columns: 5.4em minmax(0, 1fr) auto; gap: 6px; align-items: baseline; padding-block: 2px; }
.line .who { font-weight: 700; font-size: 0.625rem; white-space: nowrap; }
.line .tags { display: flex; gap: 3px; }
.tag {
  font-family: var(--font-sans); font-size: 0.5625rem; font-weight: 700; color: #fff; border-radius: 3px; padding: 0 4px; white-space: nowrap;
}
.tag.light { background: var(--dept-light); }
.tag.sound { background: var(--dept-sound); }
.tag.fly { background: var(--dept-fly); }
.hl-fly { background: rgba(16, 185, 129, 0.35); }
.hl-light { background: rgba(245, 158, 11, 0.45); }
.hl-sound { background: rgba(59, 130, 246, 0.35); }
.line.now { background: rgba(34, 197, 94, 0.14); margin-inline: -6px; padding-inline: 6px; border-radius: 3px; }
.pencil { display: block; margin: 2px 0 0 5.4em; width: 60%; height: 18px; }
.caption { font-family: var(--font-mono); font-size: var(--t-xs); color: var(--stage-dim); margin: 14px 0 0; text-align: right; }

/* ---------- 첫 화면: 흐름 ---------- */
.flow { padding-block: 88px 24px; }
.section-head { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); gap: 0 24px; margin-bottom: 40px; }
.section-head .mark { font-family: var(--font-mono); font-size: var(--t-xs); letter-spacing: 0.12em; color: var(--amber); padding-top: 12px; text-transform: uppercase; }
.section-head h2 { font-size: var(--t-2xl); line-height: 1.2; letter-spacing: -0.03em; margin: 0 0 10px; text-wrap: balance; }
.section-head p { margin: 0; color: var(--ink-2); max-width: var(--measure); font-size: var(--t-lg); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--rule-strong); }
.step {
  display: grid; grid-template-columns: var(--rail) minmax(0, 1fr) minmax(0, 1fr); gap: 16px 24px;
  padding-block: 36px; border-bottom: 1px solid var(--rule);
}
.step .no { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.step .no b { display: block; font-size: var(--t-xl); color: var(--ink); font-weight: 700; letter-spacing: -0.02em; }
.step .no span { font-size: var(--t-xs); color: var(--ink-3); letter-spacing: 0.08em; text-transform: uppercase; }
.step h3 { font-size: var(--t-xl); line-height: 1.3; margin: 0 0 8px; letter-spacing: -0.02em; text-wrap: balance; }
.step p { margin: 0 0 10px; color: var(--ink-2); }
.step ul { margin: 0; padding-left: 1.1em; color: var(--ink-2); }
.step li + li { margin-top: 4px; }
.step .shot { min-width: 0; }

/* 흐름 안의 작은 그림 (정지) */
.mini {
  background: var(--stage-2); color: var(--stage-ink); border-radius: 14px; padding: 14px; font-size: var(--t-sm);
  box-shadow: 0 0 0 1px var(--rule);
}
.mini .row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.mini .runtime { font-family: var(--font-mono); font-size: 1.75rem; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
.mini .recbtn { width: 44px; height: 44px; border-radius: 10px; background: var(--rec); display: grid; place-items: center; flex: none; }
.mini .recbtn::after { content: ""; width: 16px; height: 16px; border-radius: 50%; background: #fff; }
.mini .label { font-size: var(--t-xs); color: var(--stage-dim); }
.mini .cues { margin-top: 10px; }
.mini .hint { margin-top: 10px; font-size: var(--t-xs); color: var(--stage-dim); border-top: 1px solid #263042; padding-top: 8px; }
.mini.paper { background: #fff; color: #111; }
.mini.paper .line { font-size: 0.75rem; }

.dept { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; padding: 0; list-style: none; }
.dept li { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-xs); color: var(--ink-2); }
.dept li::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--c); }

/* 큐시트 표 그림 */
.sheet-scroll { overflow: hidden; border-radius: 12px; box-shadow: 0 0 0 1px var(--rule); }
.sheet { border-collapse: collapse; width: 100%; background: var(--stage-2); color: var(--stage-ink); font-size: var(--t-xs); }
.sheet th { background: var(--stage-3); color: var(--stage-dim); font-weight: 600; text-align: left; padding: 8px 8px; white-space: nowrap; }
.sheet td { padding: 8px 8px; border-top: 1px solid #263042; vertical-align: top; word-break: keep-all; }
.sheet td:first-child, .sheet th:first-child { text-align: center; font-family: var(--font-mono); }
.sheet tr.done td { color: var(--stage-dim); }
.sheet tr.done td:first-child { color: var(--go); }
.sheet tr.cur td { background: rgba(245, 158, 11, 0.12); }
.sheet tr.cur td:first-child { box-shadow: inset 3px 0 0 var(--standby); }
.watch { display: flex; justify-content: space-between; align-items: baseline; background: var(--stage-3); color: var(--stage-ink); padding: 10px 12px; }
.watch b { font-family: var(--font-mono); font-size: 1.25rem; font-variant-numeric: tabular-nums; }

/* ---------- 첫 화면: 약속과 문서 ---------- */
.promise { padding-block: 64px 88px; }
.promise-grid { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr) minmax(0, 20rem); gap: 24px; align-items: start; }
.promise h2 { font-size: var(--t-2xl); line-height: 1.2; letter-spacing: -0.03em; margin: 0 0 12px; text-wrap: balance; }
.promise p { color: var(--ink-2); max-width: var(--measure); margin: 0 0 10px; }
.docs { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.docs li { border-bottom: 1px solid var(--rule-strong); }
.docs a {
  display: grid; grid-template-columns: 2.5rem 1fr auto; gap: 10px; align-items: baseline;
  padding-block: 14px; color: var(--ink); text-decoration: none; font-weight: 650;
}
.docs a .q { font-family: var(--font-mono); font-size: var(--t-xs); color: var(--amber); font-weight: 600; }
.docs a .en { font-size: var(--t-xs); color: var(--ink-3); font-weight: 400; }
.docs a:hover { color: var(--link); }
.docs a:hover .en { color: var(--link); }

/* ---------- 문서 페이지 ---------- */
.doc { padding-block: 56px 88px; }
.doc-grid { display: grid; grid-template-columns: 14rem minmax(0, 1fr); gap: 24px; align-items: start; }
.doc-head { grid-column: 2; padding-left: var(--rail); }
.doc-head .eyebrow { color: var(--amber); }
.doc-head h1 { font-size: var(--t-2xl); line-height: 1.2; letter-spacing: -0.035em; margin: 0 0 12px; text-wrap: balance; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--ink-3); font-size: var(--t-sm); margin: 0; font-variant-numeric: tabular-nums; }

.toc { position: sticky; top: 24px; grid-row: 1 / span 2; font-size: var(--t-sm); }
.toc details { border-top: 2px solid var(--ink); }
.toc summary {
  list-style: none; cursor: pointer; padding: 10px 0; font-family: var(--font-mono); font-size: var(--t-xs);
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); display: flex; justify-content: space-between;
}
.toc summary::-webkit-details-marker { display: none; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li { border-top: 1px solid var(--rule); }
.toc a { display: grid; grid-template-columns: 2.6rem 1fr; gap: 6px; padding: 7px 0; color: var(--ink-2); text-decoration: none; line-height: 1.45; }
.toc a .q { font-family: var(--font-mono); font-size: var(--t-xs); color: var(--ink-3); padding-top: 1px; }
.toc a:hover { color: var(--ink); }
.toc a:hover .q { color: var(--amber); }

.prose { grid-column: 2; max-width: calc(var(--measure) + var(--rail)); padding-left: var(--rail); min-width: 0; }
.prose > section { position: relative; padding-top: 28px; margin-top: 28px; border-top: 1px solid var(--rule); }
.prose > section:first-of-type { border-top: 0; margin-top: 8px; padding-top: 0; }
.prose > .intro + section, .prose > .summary + section { margin-top: 36px; }
.prose h2 { font-size: var(--t-lg); line-height: 1.4; letter-spacing: -0.015em; margin: 0 0 10px; text-wrap: balance; }
/* 조항 번호를 큐 태그처럼 왼쪽 여백에 적습니다 */
.prose h2 .q {
  position: absolute; left: calc(-1 * var(--rail)); width: calc(var(--rail) - 20px); text-align: right;
  font-family: var(--font-mono); font-size: var(--t-xs); font-weight: 600; color: var(--amber); letter-spacing: 0.04em; padding-top: 4px;
}
.prose p, .prose ul, .prose ol { margin: 0 0 12px; color: var(--ink-2); }
.prose strong { color: var(--ink); font-weight: 650; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 6px; }
.prose li::marker { color: var(--ink-3); }
.prose .intro { font-size: var(--t-lg); color: var(--ink); line-height: 1.7; }

.summary {
  background: var(--amber-wash); border-radius: 4px; padding: 18px 22px; margin: 0 0 8px;
  border-left: 3px solid var(--amber-fill);
}
.summary .label { font-family: var(--font-mono); font-size: var(--t-xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--amber); margin: 0 0 8px; }
.summary ul { margin: 0; color: var(--ink); }

.table-scroll { overflow-x: auto; margin: 4px 0 16px; }
.prose table { border-collapse: collapse; width: 100%; font-size: var(--t-sm); }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule); color: var(--ink-2); }
.prose thead th { color: var(--ink-3); font-weight: 600; border-bottom: 1px solid var(--rule-strong); font-family: var(--font-mono); font-size: var(--t-xs); letter-spacing: 0.06em; }
.prose tbody th { color: var(--ink); font-weight: 600; white-space: nowrap; width: 7rem; }
.prose td:first-child { color: var(--ink); font-weight: 600; white-space: nowrap; }

.contact {
  display: grid; grid-template-columns: auto 1fr; gap: 6px 20px; align-items: baseline;
  border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule-strong); padding-block: 16px; margin: 0 0 14px;
}
.contact dt { font-family: var(--font-mono); font-size: var(--t-xs); letter-spacing: 0.08em; color: var(--ink-3); text-transform: uppercase; }
.contact dd { margin: 0; color: var(--ink); }
.contact .addr { font-size: var(--t-xl); font-weight: 700; letter-spacing: -0.01em; user-select: all; }

.faq details { border-bottom: 1px solid var(--rule); }
.faq details:first-of-type { border-top: 1px solid var(--rule); }
.faq summary {
  cursor: pointer; list-style: none; padding: 14px 0; font-weight: 650; color: var(--ink);
  display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: baseline;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-mono); color: var(--amber); font-size: var(--t-lg); line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding: 0 0 14px; }
.faq details > div > :last-child { margin-bottom: 0; }

/* ---------- 바닥글 ---------- */
footer { border-top: 1px solid var(--rule); background: var(--paper); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block: 24px 40px; font-size: var(--t-sm); color: var(--ink-3); }
footer nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
footer a { color: var(--ink-2); }

/* ---------- 404 ---------- */
.is-404 { background: var(--stage); }
.lost { background: var(--stage); color: var(--stage-ink); min-height: 70vh; }
.lost .wrap { padding-block: 72px 96px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 22rem); gap: 48px; align-items: center; }
.lost h1 { font-size: var(--t-3xl); line-height: 1.08; letter-spacing: -0.045em; margin: 0 0 16px; }
.lost p { color: #cbd2dc; margin: 0 0 8px; font-size: var(--t-lg); }
.lost .call { background: var(--stage-3); color: var(--stage-ink); }
.lost .call b { font-size: 2.25rem; color: var(--standby); }
.lost .docs { border-top-color: var(--stage-ink); margin-top: 32px; }
.lost .docs li { border-bottom-color: #2b3445; }
.lost .docs a { color: var(--stage-ink); }
.lost .docs a .en { color: var(--stage-dim); }
.lost .docs a .q { color: var(--standby); }
.lost .docs a:hover { color: #fff; }

/* ---------- 좁은 화면 ---------- */
@media (max-width: 900px) {
  .stage .wrap, .stage.photo .wrap { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-block: 48px 56px; }
  .hero-photo { width: 100%; bottom: auto; height: 46vh; background-position: 30% center; }
  .hero-photo::after { background: linear-gradient(0deg, #05070b 0%, rgba(5, 7, 11, 0.4) 35%, transparent 70%); }
  .stage.photo .wrap { min-height: 0; padding-top: 38vh; }
  .scene img { max-height: 22rem; }
  .step { grid-template-columns: minmax(0, 1fr); gap: 14px; padding-block: 28px; }
  .step .no { display: flex; gap: 10px; align-items: baseline; }
  .step .no b { display: inline; font-size: var(--t-lg); }
  .section-head, .promise-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .section-head .mark { padding-top: 0; }
  .doc-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .doc-head, .prose { grid-column: 1; padding-left: 0; }
  .toc { position: static; grid-row: auto; }
  .prose h2 .q { position: static; display: inline-block; width: auto; text-align: left; margin-right: 10px; padding: 0; }
  .lost .wrap { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .device { grid-template-columns: minmax(0, 1fr); border-radius: 22px; padding: 10px; }
  .device .page { order: -1; }
  .flow { padding-block: 56px 8px; }
  .section-head h2, .promise h2 { font-size: 1.75rem; }
  .doc { padding-block: 32px 64px; }
  .contact { grid-template-columns: minmax(0, 1fr); }
}

/* ==========================================================
   움직임: 글자와 페이지에만 씁니다. 화면 예시 그림은 움직이지 않습니다.
   html.motion은 움직임 줄이기를 켜지 않은 경우에만 붙고, 그 밖에는 위의 정지 화면이 그대로입니다.
   ========================================================== */

/* 1. 막이 오를 때: 객석 조명이 꺼지고 무대 조명이 들어옵니다 (강한 연출은 여기 한 곳) */
.stage { position: relative; overflow: hidden; }
.stage > .wrap { position: relative; z-index: 1; }
.stage::after {
  content: ""; position: absolute; z-index: 0; pointer-events: none;
  width: 56rem; height: 56rem; right: -14rem; top: -30rem; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(245, 158, 11, 0.16), transparent 70%);
}
html.motion .stage::before {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: #000;
  animation: house-out 1.8s ease-in 0.05s both;
}
html.motion .stage::after { animation: spot-in 2.6s ease-out 0.6s both, drift 26s ease-in-out 3.2s infinite alternate; }
@keyframes house-out { 0% { opacity: 0.92; } 100% { opacity: 0; } }
@keyframes spot-in { from { opacity: 0; transform: scale(0.7); } to { opacity: 1; transform: none; } }
@keyframes drift { from { transform: translate(0, 0); } to { transform: translate(-14rem, 6rem); } }

/* 2. 제목은 콜처럼 한 박자씩 */
html.motion .stage .eyebrow { animation: rise 0.8s ease-out 0.9s both; }
html.motion .beat { display: inline-block; animation: call 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
html.motion .beat:nth-child(1) { animation-delay: 1.3s; }
html.motion .beat:nth-child(2) { animation-delay: 1.95s; }
html.motion .stage h1 .sub { animation: rise 0.9s ease-out 2.6s both; }
html.motion .stage .lead { animation: rise 0.9s ease-out 2.9s both; }
html.motion .stage .facts { animation: rise 0.9s ease-out 3.05s both; }
html.motion .hero-figure { animation: rise 1.2s ease-out 3.1s both; }
@keyframes call {
  0% { opacity: 0; transform: translateY(0.18em); filter: blur(6px); }
  60% { opacity: 1; filter: blur(0); }
  100% { opacity: 1; transform: none; filter: none; }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* 3. 스크롤: 섹션 제목이 핀 조명을 받듯 밝아집니다. 맨 위 가는 막대가 읽은 정도를 보여 줍니다 */
.spot { position: relative; }
html.motion-ready .spot { transition: opacity 0.9s ease, text-shadow 0.9s ease; }
html.motion-ready .spot:not(.lit) { opacity: 0.22; }
html.motion-ready .spot.lit { text-shadow: 0 0 28px rgba(245, 158, 11, 0.28); }
.progress {
  position: fixed; left: 0; right: 0; top: 0; height: 2px; z-index: 20; pointer-events: none;
  background: var(--amber-fill); transform-origin: 0 50%; transform: scaleX(0);
}

/* 4. 404: 글자가 하나씩 켜지고, 핀 조명이 제목 위에서 멈춥니다 */
.lost { position: relative; overflow: hidden; }
.lost > .wrap { position: relative; z-index: 1; }
html.motion .letters .ch { display: inline-block; animation: ch-on 0.45s ease-out both; animation-delay: calc(0.35s + var(--i) * 0.07s); }
@keyframes ch-on { 0% { opacity: 0; } 40% { opacity: 1; } 55% { opacity: 0.35; } 100% { opacity: 1; } }
html.motion .lost::after {
  content: ""; position: absolute; z-index: 0; pointer-events: none; width: 34rem; height: 34rem; border-radius: 50%;
  left: 0; top: -6rem; background: radial-gradient(closest-side, rgba(245, 158, 11, 0.14), transparent 70%);
  animation: sweep 3.4s cubic-bezier(0.3, 0.6, 0.2, 1) 0.2s both;
}
@keyframes sweep { from { opacity: 0; transform: translateX(60vw); } to { opacity: 1; transform: translateX(-6rem); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .progress { display: none; }
}
