:root {
  /* 테마: #4B1D24 · #7C2A35 · #A56A6C · #CBB4A7 · #EFE4DC (사용자가 고른 팔레트) */
  --bg: #fbf8f5;
  --surface: #f4ede7;
  --line: #e0d2c9;
  --line-strong: #cbb4a7;
  --ink: #260c10;
  --muted: #54373b;
  --accent: #7c2a35;
  --accent-hover: #4b1d24;
  --accent-ink: #f7f1ec;
  --accent-soft: #ead9d1;
  --rose: #a56a6c;
  --danger: #c4372f;
  --radius: 12px;
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; overflow: hidden; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  line-height: 1.6;
  letter-spacing: -.01em;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }
.aura, .pulse, .cta-arrow { display: none; }

button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
button:focus-visible, textarea:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

h1 { margin: 0 0 14px; font-size: clamp(28px, 6vw, 40px); line-height: 1.25; font-weight: 700; letter-spacing: -.03em; }
.mask, .rise-line { display: block; }
.lede { margin: 0 0 24px; color: var(--muted); font-size: 16.5px; }
.eyebrow { display: block; margin: 0 0 14px; color: var(--accent); font-size: 14px; font-weight: 600; }
.meta { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.fine { margin: 14px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.note { margin: 0; color: var(--muted); font-size: 14px; }
.note:empty, .error:empty { display: none; }
.error { margin: 8px 0 0; color: var(--danger); font-size: 13.5px; }

/* 버튼 */
.cta { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 52px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-size: 16px; font-weight: 600; text-decoration: none; transition: background .15s ease; }
.cta:hover { background: var(--accent-hover); }
.cta:active { transform: translateY(1px); }
.cta:disabled { cursor: default; opacity: .6; }.quiet { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); font-size: 13.5px; font-weight: 500; text-decoration: none; transition: border-color .15s ease, background .15s ease; }
.quiet:hover { border-color: var(--line-strong); background: var(--surface); }
.quiet:disabled { cursor: default; opacity: .6; }

/* 홈 */
.shell { position: relative; height: 100dvh; display: flex; flex-direction: column; }
.intro { height: 100dvh; overflow-y: auto; padding: 0 max(20px, calc((100% - 960px) / 2)); transition: opacity .25s ease; }
.intro.leaving, .invite.leaving { opacity: 0; }
.hero { min-height: 88dvh; display: flex; flex-direction: column; justify-content: center; padding: 48px 0; }
.hero .cta { max-width: 260px; }
.block { padding: 48px 0; border-top: 1px solid var(--line); }
.block h2 { margin: 0 0 22px; font-size: clamp(22px, 5vw, 28px); line-height: 1.35; font-weight: 700; letter-spacing: -.025em; }
.final { padding-bottom: 72px; }
.final .lede strong { color: var(--ink); font-weight: 600; }

.compare { display: grid; gap: 12px; }
.panel, .feature, .card { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.panel-ai { border-color: var(--accent); }
.tag { display: inline-block; margin: 0 0 12px; color: var(--muted); font-size: 13px; font-weight: 600; }
.tag-ai { color: var(--accent); }
.form-q { margin: 0 0 8px; font-size: 15px; font-weight: 600; }
.form-a { margin: 0; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-size: 15px; }
.result { margin: 14px 0 0; font-size: 14px; }
.muted-result { color: var(--muted); }
.demo { display: flex; flex-direction: column; gap: 8px; }
.d-bubble { max-width: 88%; margin: 0; padding: 8px 13px; border-radius: 12px; font-size: 14.5px; }
.d-ai { align-self: flex-start; background: var(--surface); }
.d-me { align-self: flex-end; background: var(--accent); color: var(--accent-ink); }
.found { display: grid; gap: 2px; padding: 12px 14px; border-radius: 10px; background: var(--accent-soft); font-weight: 600; }
.found span { color: var(--accent); font-size: 12.5px; }

.features { display: grid; gap: 12px; }
.feature h3 { margin: 0 0 6px; font-size: 16.5px; font-weight: 700; }
.feature p { margin: 0; color: var(--muted); font-size: 14.5px; }
.how { display: grid; gap: 12px; margin: 0 0 20px; padding: 0; list-style: none; }
.how li { display: flex; align-items: center; gap: 12px; font-size: 15px; }
.how b { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid var(--line-strong); border-radius: 50%; font-size: 13px; font-weight: 600; }
.soon { margin: 0; color: var(--muted); font-size: 13.5px; }
.notice { margin: 0 0 20px; padding: 14px 16px 14px 32px; border-radius: var(--radius); background: var(--surface); color: var(--muted); font-size: 14px; }
.notice li + li { margin-top: 4px; }

@media (min-width: 768px) {
  .hero h1 { font-size: 52px; }
  .hero .lede { font-size: 18px; }
  .block h2 { font-size: 30px; }
  .compare { grid-template-columns: 1fr 1fr; align-items: start; }
  .features { grid-template-columns: repeat(3, 1fr); }
  .final { max-width: 640px; }
}

/* 홈 움직임 */
.intro { overflow-x: hidden; }
.hero { position: relative; gap: 40px; }
.hero::before { content: ""; position: absolute; z-index: -1; inset: 0 -50vw; background-image: radial-gradient(#cbb4a7 1.2px, transparent 1.2px); background-size: 24px 24px; -webkit-mask-image: radial-gradient(ellipse 60% 70% at 65% 45%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse 60% 70% at 65% 45%, #000 20%, transparent 75%); pointer-events: none; }
.band { position: relative; border-top: 0; background: var(--surface); box-shadow: 0 0 0 100vmax var(--surface); clip-path: inset(0 -100vmax); }
.band .feature { background: var(--bg); }
.hero h1 .line { display: block; animation: line-up .8s cubic-bezier(.2, .7, .2, 1) both; }
.hero h1 .line + .line { animation-delay: .12s; }
.hero-copy > .lede, .hero-copy > .cta, .hero-copy > .meta { animation: fade-up .8s cubic-bezier(.2, .7, .2, 1) .25s both; }
@keyframes line-up { from { opacity: 0; transform: translateY(28px); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } }

.live { display: flex; flex-direction: column; height: 380px; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg); box-shadow: 0 1px 2px rgba(75, 29, 36, .05), 0 18px 40px -20px rgba(75, 29, 36, .25); animation: fade-up .9s cubic-bezier(.2, .7, .2, 1) .35s both; }
.live-head { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; font-weight: 600; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: beat 1.6s ease-in-out infinite; }
@keyframes beat { 50% { opacity: .25; } }
.live-log { flex: 1; min-height: 0; overflow: hidden; padding-bottom: 2px; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; transition: opacity .4s ease; }
.live-log.fading { opacity: 0; }
.lv { flex-shrink: 0; max-width: 86%; margin: 0; padding: 9px 13px; border-radius: 14px; font-size: 14.5px; line-height: 1.55; animation: pop .35s cubic-bezier(.2, .7, .2, 1) both; }
.lv-ai { align-self: flex-start; background: var(--surface); }
.lv-me { align-self: flex-end; background: var(--accent); color: var(--accent-ink); }
.lv-found { align-self: stretch; max-width: none; border: 1px dashed var(--accent); background: var(--bg); font-weight: 600; }
.lv .typing { height: 18px; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.97); } }

.story { padding: 48px 0; border-top: 1px solid var(--line); }
.story h2, .statement { letter-spacing: -.025em; }
.story h2 { margin: 0 0 22px; font-size: clamp(22px, 5vw, 30px); line-height: 1.35; font-weight: 700; }
.story-progress { display: none; }
.story.pinned { height: 280vh; padding: 0; }
.story.pinned .story-sticky { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; justify-content: center; }
.story.pinned .story-progress { display: block; height: 2px; margin-top: 28px; background: var(--line); }
.story-progress i { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.step { opacity: 0; transform: translateY(12px); transition: opacity .45s ease, transform .5s cubic-bezier(.2, .7, .2, 1); }
.step.on { opacity: 1; transform: none; }

.statement { height: 220vh; border-top: 1px solid var(--line); }
.statement-sticky { position: sticky; top: 0; height: 100dvh; display: flex; align-items: center; }
.big-words { margin: 0; font-size: clamp(30px, 6.4vw, 60px); line-height: 1.3; font-weight: 700; }
.big-line { display: block; }
.big-chunk { white-space: nowrap; }
.big-word { color: #d9c9bf; transition: color .3s ease; }
.big-word.on { color: var(--ink); }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .8s cubic-bezier(.2, .7, .2, 1); transition-delay: calc(var(--i, 0) * 110ms); }
.reveal.in { opacity: 1; transform: none; }
.num, .feature .num { margin: 0 0 14px; color: var(--accent); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.feature { transition: border-color .2s ease, transform .25s ease; }
.feature:hover { border-color: var(--accent); transform: translateY(-3px); }
.how { position: relative; padding-left: 0; }
.how::before, .how::after { content: ""; position: absolute; left: 12px; top: 13px; bottom: 13px; width: 2px; background: var(--line); }
.how::after { background: var(--accent); transform: scaleY(var(--p, 0)); transform-origin: top; }
.how li { position: relative; z-index: 1; padding: 6px 0; }
.how b { background: var(--bg); border-color: var(--accent); color: var(--accent); }

.mark { position: relative; display: inline-block; white-space: nowrap; }
/* 강조 표시는 모두 강조색(버건디)으로 */
.mark[data-mark="underline"] { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 4px; text-underline-offset: 7px; }
.mark[data-mark="circle"]:not(.big-word) { color: var(--accent); }
/* 큰 글씨 구간: 스크롤이 그 부분에 닿으면(home.js가 .hit을 붙임) 왼쪽에서 오른쪽으로 두껍게 그어진다 */
.big-word.mark[data-mark="strike"]::after { content: ""; position: absolute; left: -.04em; right: -.04em; top: 56%; height: .17em; background: var(--accent); transform: scaleX(0); transform-origin: left center; transition: transform .7s cubic-bezier(.65, 0, .2, 1); pointer-events: none; }
.big-word.mark[data-mark="strike"].hit::after { transform: scaleX(1); }
.big-word.mark[data-mark="circle"] .em { transition: color .6s ease; }
.big-word.mark[data-mark="circle"].hit .em { color: var(--accent); }
p.mark { display: grid; white-space: normal; }
/* 시작 버튼: 비행기들이 모여 설문지로 펼쳐진 뒤에 나타난다 (fish.js가 켤 때만) */
/* 조각이 모이는 동안은 배경·글씨가 투명, 검게 물들기 시작하면 글씨부터 바로 보이고, 다 물들면 배경도 버튼이 된다 */
.cta.fold-wait { transition: opacity .7s ease, transform .8s cubic-bezier(.2, .7, .2, 1), background .1s linear, color .25s ease; }
.cta.fold-wait:not(.unfolded) { background: transparent; color: transparent; }
.cta.fold-wait.labeled:not(.unfolded) { color: var(--accent-ink); }
.fish { position: fixed; inset: 0; width: 100vw; height: 100dvh; z-index: 0; pointer-events: none; transition: opacity .25s ease; } /* 화면(.intro.leaving)과 같은 속도로 사라진다 */
body.leaving .fish, body.talking .fish { opacity: 0; } /* 화면이 사라지는 것과 같은 때에, 애니메이션 프레임과 상관없이 CSS로 사라진다 */
/* 인터뷰 화면은 갑자기 나타나지 않고 부드럽게 떠오른다 */
.chat:not([hidden]) { animation: fade-up .55s cubic-bezier(.2, .7, .2, 1) both; }
.intro { position: relative; z-index: 1; }
@media (min-width: 900px) {
  .hero { flex-direction: row; align-items: center; }
  .hero-copy { flex: 1.1; }
  .live { flex: 1; }
}

/* 초대 */
.invite { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: 40px max(20px, calc((100% - 640px) / 2)); transition: opacity .25s ease; }
.invite h1 { overflow-wrap: anywhere; }
.invite .cta { margin-top: 4px; }

/* 채팅 */
.chat { --col: 720px; --gutter: max(16px, calc((100% - var(--col)) / 2)); flex: 1; min-height: 0; display: flex; flex-direction: column; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.bar-title { display: flex; align-items: center; gap: 16px; min-width: 0; }
.bar-title strong { font-size: 15px; font-weight: 650; white-space: nowrap; }
.steps { display: flex; align-items: center; gap: 10px; }
.track { width: 180px; height: 4px; overflow: hidden; border-radius: 99px; background: var(--line); }
.fill { width: 0; height: 100%; background: var(--accent); transition: width .5s ease; }
.pct { min-width: 3em; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }

.log { flex: 1; min-height: 0; overflow-y: auto; padding: 32px var(--gutter) 40px; display: flex; flex-direction: column; gap: 24px; scrollbar-width: thin; }
.bubble { font-size: 16px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; animation: appear .25s ease; }
.bubble.ai { align-self: stretch; }
.bubble.me { align-self: flex-end; max-width: min(75%, 560px); padding: 9px 16px; border-radius: 16px; background: var(--surface); }
.bubble.leaving { opacity: 0; transition: opacity .15s ease; }
@keyframes appear { from { opacity: 0; } to { opacity: 1; } }

.typing { display: inline-flex; align-items: center; gap: 5px; height: 26px; }
.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); animation: blink 1.2s ease-in-out infinite; }
.typing span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 70%, 100% { opacity: .35; } 35% { opacity: 1; } }

.summary { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); }
.summary-row { display: grid; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.summary-row:first-child { padding-top: 0; }
.summary-row strong { font-size: 15px; font-weight: 600; }
.summary-row span { color: var(--muted); font-size: 13.5px; }
.summary-actions { display: flex; gap: 8px; margin-top: 14px; }
.summary-yes { min-height: 38px; padding: 0 18px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-size: 14px; font-weight: 600; }

.usage { padding: 12px 16px; border-radius: var(--radius); background: var(--surface); color: var(--muted); font-size: 12.5px; }
.usage-title { margin: 0 0 6px; color: var(--ink); font-size: 13px; font-weight: 600; }
.usage-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; padding: 2px 0; }
.usage-total { margin: 8px 0 0; padding-top: 8px; border-top: 1px solid var(--line); color: var(--ink); font-weight: 600; }

.composer { padding: 4px var(--gutter) calc(12px + env(safe-area-inset-bottom)); }
.composer.leaving { opacity: 0; transition: opacity .2s ease; }
.composer-note { margin: 8px 0 0; color: var(--muted); font-size: 12px; text-align: center; }
.field { display: flex; align-items: flex-end; gap: 8px; min-height: 56px; padding: 8px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--bg); transition: border-color .15s ease; }
.field:focus-within { border-color: var(--accent); }
.field.shake { animation: shake .35s ease; }
@keyframes shake { 25% { translate: -4px 0; } 50% { translate: 4px 0; } 75% { translate: -2px 0; } }
textarea { flex: 1; min-width: 0; max-height: 200px; padding: 7px 4px 7px 10px; resize: none; border: 0; outline: 0 !important; background: transparent; color: var(--ink); font: inherit; font-size: 16px; line-height: 1.5; }
textarea::placeholder, input::placeholder { color: var(--muted); }
.send { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--line); color: var(--muted); transition: background .15s ease; }
.send.ready { background: var(--accent); color: var(--accent-ink); }
.send:disabled { cursor: default; opacity: .6; }

.done { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 12px var(--gutter) calc(22px + env(safe-area-inset-bottom)); }
.check { color: var(--accent); }

/* 만들기 · 결과 */
.scroll, .scroll body { height: auto; min-height: 100%; overflow: auto; }
.page { max-width: 640px; margin: 0 auto; padding: 56px 20px 80px; display: flex; flex-direction: column; gap: 18px; }
.page-wide { max-width: 820px; }
.page-head h1 { margin-bottom: 6px; }
.page-head .lede { margin-bottom: 12px; }
.form { display: flex; flex-direction: column; gap: 8px; }
.field-label { margin: 12px 0 0; font-size: 14.5px; font-weight: 600; }
.form .field-label:first-child { margin-top: 0; }
.optional { margin-left: 6px; color: var(--muted); font-size: 12.5px; font-weight: 400; }
.box { width: 100%; padding: 11px 13px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--bg); color: var(--ink); font: inherit; font-size: 15.5px; line-height: 1.5; outline: none; resize: vertical; transition: border-color .15s ease; }
.box:focus { border-color: var(--accent); }
.points { display: flex; flex-direction: column; gap: 8px; }
.points:empty { display: none; }
.point-row, .link-row, .row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.point-row .box, .link-row .box { flex: 1; min-width: 0; }
.form > .quiet { align-self: flex-start; }
.form .notice { margin: 16px 0 0; }
.form .cta { margin-top: 12px; }
#made { display: flex; flex-direction: column; gap: 8px; }
.link-box { margin-top: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.link-box .field-label { margin: 0 0 8px; }
.secret .field-label { color: var(--accent); }

.stats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.stat { padding: 4px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; font-weight: 500; }
.responses { display: flex; flex-direction: column; gap: 12px; }
.response { display: flex; flex-direction: column; gap: 6px; }
.response-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.badge { padding: 2px 9px; border-radius: 6px; background: var(--surface); color: var(--muted); font-size: 12.5px; font-weight: 600; }
.badge-complete { background: var(--accent); color: var(--accent-ink); }
.response-context { margin: 6px 0 0; font-size: 16px; font-weight: 700; }
.response-focus { margin: 0; color: var(--muted); font-size: 13.5px; }
.correction { margin: 4px 0 0; padding: 10px 12px; border-radius: 8px; background: var(--surface); font-size: 14px; }
.transcript { margin-top: 6px; font-size: 14px; }
.transcript summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.transcript p { margin: 8px 0 0; line-height: 1.6; }
.transcript b { color: var(--muted); font-size: 12px; font-weight: 700; }
.t-me b { color: var(--accent); }
.empty { margin: 0; color: var(--muted); text-align: center; }

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