/* =========================================================
   BAREE STUDIO 현장 접수 — 고객 화면
   홈페이지와 같은 팔레트(아이보리·로즈 클레이·세이지·차콜)
   ========================================================= */
:root {
  --bg: #F8F2EA;          /* Cream (레퍼런스 톤) */
  --bg-2: #F0E8DC;        /* Oat (보조 배경) */
  --card: #FDFAF5;
  --ink: #2F2725;         /* Charcoal */
  --ink-2: #4A3F3C;
  --mut: #76655F;
  --line: rgba(47, 39, 37, .14);
  --hair: rgba(47, 39, 37, .62);   /* 레퍼런스의 또렷한 가는 선 */
  --line-2: rgba(47, 39, 37, .3);
  --rose: #9E6363;        /* Rose Clay */
  --rose-dark: #874F50;
  --rose-soft: #F5E1DF;
  --rose-mist: #FBF0EE;
  --sage-ink: #4E6A4C;
  --sage-soft: #E4EDE1;
  --err: #A33B36;
  --err-soft: #FBE9E6;
  --radius: 12px;
  --radius-lg: 14px;
  --bar-h: 84px;
  --f-brand: "Cormorant Garamond", "Times New Roman", serif;
  --f-body: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  color-scheme: light;
}
/* 일본어·중국어는 해당 언어 글꼴을 먼저 (한자 모양이 언어마다 다름) */
html[lang="ja"] { --f-body: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", Meiryo, "Pretendard Variable", sans-serif; }
html[lang="zh-Hans"] { --f-body: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", "Pretendard Variable", sans-serif; }
html[lang="zh-Hant"] { --f-body: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", "Pretendard Variable", sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; min-height: 100dvh;
  font-family: var(--f-body); font-size: 17px; line-height: 1.6; color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; overflow-wrap: anywhere; -webkit-tap-highlight-color: transparent;
}
html[lang="ko"] body { word-break: keep-all; overflow-wrap: break-word; }
html[lang="ja"] body, html[lang^="zh"] body { line-break: strict; }
h1, h2, p, dl, dd, ul { margin: 0; }
ul { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; touch-action: manipulation; }
svg { width: 1.15em; height: 1.15em; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 3px solid rgba(158, 99, 99, .45); outline-offset: 2px; }
[tabindex="-1"]:focus { outline: none; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 56px; padding: 0 22px; border-radius: 999px; font-weight: 600; font-size: 17px;
  transition: background .15s, transform .1s, box-shadow .15s;
}
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--rose); color: #fff; box-shadow: 0 6px 16px -8px rgba(158, 99, 99, .7); }
.btn--primary:hover { background: var(--rose-dark); }
.btn--primary:disabled { opacity: .55; cursor: default; }
.btn--ghost { background: transparent; color: var(--ink-2); border: 1.5px solid var(--line-2); }
.btn--ghost:hover { background: rgba(47, 39, 37, .04); }
.btn--lg { min-height: 62px; font-size: 18px; }
.btn--block { width: 100%; }
.link { color: var(--rose-dark); font-weight: 600; font-size: 15px; padding: 8px 4px; min-height: 44px; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 시작 화면 (레퍼런스: 얇은 테두리 액자 · 가는 선 목록 · 동그란 화살표 버튼) ---------- */
.welcome { min-height: 100dvh; padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom)); display: flex; }
.frame { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: calc(100dvh - 20px); }
.frame__l { position: absolute; background: var(--hair); pointer-events: none; }
.frame__l--t, .frame__l--b { left: 0; right: 0; height: 1px; }
.frame__l--l, .frame__l--r { top: 0; bottom: 0; width: 1px; }
.frame__l--t { top: 0; transform-origin: left; } .frame__l--b { bottom: 0; transform-origin: right; }
.frame__l--r { right: 0; transform-origin: top; } .frame__l--l { left: 0; transform-origin: bottom; }
.wtop { position: relative; display: grid; place-items: center; padding: 18px 16px 16px; text-align: center; }
.wtop::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--hair); transform-origin: center; }
.wtop__logo { font-family: var(--f-brand); font-weight: 500; font-size: 17px; letter-spacing: .32em; margin-right: -.32em; line-height: 1.1; }
.wtop__logo small { display: block; font-style: italic; font-weight: 400; font-size: 12px; letter-spacing: .06em; margin-right: 0; color: var(--rose); margin-top: 4px; }
.welcome__in { flex: 1; width: 100%; max-width: 480px; margin: 0 auto; padding: 40px 22px 30px; display: flex; flex-direction: column; justify-content: center; }
.eyebrow { display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 12px; font-weight: 500; letter-spacing: .26em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 20px; text-align: center; }
.welcome__title { font-size: 25px; font-weight: 400; line-height: 1.35; letter-spacing: -.02em; }
.welcome__lead { color: var(--mut); margin-top: 8px; font-size: 16px; line-height: 1.55; }
.langs { margin: 40px 0 34px; display: grid; text-align: left; }
.langs__label { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--mut); padding-bottom: 10px; }
.lang {
  position: relative; display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; align-items: center; column-gap: 0;
  min-height: 64px; padding: 10px 2px; text-align: left; background: none; transition: color .2s;
}
.lang::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--hair); transform-origin: left; }
.langs .lang:last-child::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--hair); transform-origin: left; }
.lang__no { grid-column: 1; grid-row: 1 / 3; font-family: var(--f-brand); font-size: 15px; color: var(--mut); margin-right: 18px; font-variant-numeric: lining-nums; }
.lang__name { grid-column: 2; grid-row: 1; font-size: 18px; font-weight: 500; }
.lang__sub { grid-column: 2; grid-row: 2; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--mut); line-height: 1.4; }
.lang__dot { grid-column: 3; grid-row: 1 / 3; margin-left: 12px; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--hair); display: grid; place-items: center; color: transparent; transition: background .2s, border-color .2s; }
.lang__dot svg { width: 14px; height: 14px; stroke-width: 2.4; }
.lang:hover .lang__name { color: var(--rose-dark); }
.lang[aria-checked="true"] .lang__name, .lang[aria-checked="true"] .lang__no { color: var(--rose-dark); }
.lang[aria-checked="true"] .lang__dot { background: var(--rose); border-color: var(--rose); color: #fff; }
/* 시작 버튼: 글 ─── ( → ) */
.cta { display: flex; align-items: center; gap: 16px; width: 100%; min-height: 72px; text-align: left; }
.cta__t { font-size: 16px; font-weight: 600; letter-spacing: .04em; white-space: nowrap; }
.cta__line { flex: 1; height: 1px; background: var(--hair); transform-origin: left; }
.cta__c { position: relative; width: 68px; height: 68px; flex-shrink: 0; display: grid; place-items: center; color: var(--ink); transition: color .2s; }
.cta__c svg:first-child { position: absolute; inset: 0; width: 100%; height: 100%; stroke: var(--hair); stroke-width: 1.5; fill: transparent; transition: fill .25s, stroke .25s; }
.cta__c > svg:last-child { position: relative; width: 22px; height: 22px; stroke-width: 1.4; transition: transform .25s; }
.cta:hover .cta__c, .cta:active .cta__c { color: #fff; }
.cta:hover .cta__c svg:first-child, .cta:active .cta__c svg:first-child { fill: var(--rose); stroke: var(--rose); }
.cta:hover .cta__c > svg:last-child { transform: translateX(3px); }
.wfoot { position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 18px; padding: 14px 18px 16px; font-size: 13px; color: var(--mut); }
.wfoot::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--hair); transform-origin: center; }
.wfoot span { display: inline-flex; align-items: center; gap: 6px; }
.wfoot svg { width: 15px; height: 15px; stroke-width: 1.5; }
@media (max-height: 880px) { .welcome__in { padding: 26px 20px 18px; } .langs { margin: 30px 0 22px; } }

/* 처음 한 번만 (.is-intro): 선이 그어지는 순서 → 글 → 언어 줄 → 시작 버튼 */
.is-intro .frame__l--t { animation: drawX .7s cubic-bezier(.7, 0, .3, 1) 0s both; }
.is-intro .frame__l--r { animation: drawY .7s cubic-bezier(.7, 0, .3, 1) .2s both; }
.is-intro .frame__l--b { animation: drawX .7s cubic-bezier(.7, 0, .3, 1) .4s both; }
.is-intro .frame__l--l { animation: drawY .7s cubic-bezier(.7, 0, .3, 1) .6s both; }
.is-intro .wtop::after, .is-intro .wfoot::before { animation: drawX .9s cubic-bezier(.7, 0, .3, 1) .5s both; }
.is-intro .wtop__logo { animation: brandIn 1.1s cubic-bezier(.2, .7, .2, 1) .3s both; }
.is-intro .eyebrow { animation: rise .8s cubic-bezier(.2, .7, .2, 1) .7s both; }
.is-intro .langs__label { animation: fade .6s ease 1.05s both; }
.is-intro .lang > span { animation: rise .6s cubic-bezier(.2, .7, .2, 1) both; }
.is-intro .lang::before, .is-intro .langs .lang:last-child::after { animation: drawX .8s cubic-bezier(.7, 0, .3, 1) both; }
.is-intro .lang:nth-child(2)::before, .is-intro .lang:nth-child(2) > span { animation-delay: 1.05s; }
.is-intro .lang:nth-child(3)::before, .is-intro .lang:nth-child(3) > span { animation-delay: 1.12s; }
.is-intro .lang:nth-child(4)::before, .is-intro .lang:nth-child(4) > span { animation-delay: 1.19s; }
.is-intro .lang:nth-child(5)::before, .is-intro .lang:nth-child(5) > span { animation-delay: 1.26s; }
.is-intro .lang:nth-child(6)::before, .is-intro .lang:nth-child(6) > span, .is-intro .langs .lang:last-child::after { animation-delay: 1.33s; }
.is-intro .cta__t { animation: rise .7s cubic-bezier(.2, .7, .2, 1) 1.4s both; }
.is-intro .cta__line { animation: drawX .9s cubic-bezier(.7, 0, .3, 1) 1.45s both; }
.is-intro .cta__c svg:first-child { stroke-dasharray: 1; animation: drawCircle 1s cubic-bezier(.6, 0, .3, 1) 1.6s both; }
.is-intro .cta__c > svg:last-child { animation: slideIn .6s cubic-bezier(.2, .7, .2, 1) 2s both; }
.is-intro .wfoot span { animation: fade .8s ease 1.7s both; }
/* 늘 (아주 천천히): 별이 돌아가고, 시작 버튼 화살표가 가끔 살짝 앞으로 */
.cta__c > svg:last-child { animation: nudge 4s ease-in-out 3s infinite; }
/* 언어를 바꿨을 때 */
.welcome:not(.is-intro) .cta__t { animation: soft .35s ease both; }
.welcome:not(.is-intro) .lang[aria-checked="true"] .lang__dot { animation: pop .35s cubic-bezier(.3, 1.6, .5, 1) both; }

@keyframes drawX { from { transform: scaleX(0); } }
@keyframes drawY { from { transform: scaleY(0); } }
@keyframes drawCircle { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes brandIn { from { opacity: 0; letter-spacing: .6em; margin-right: -.6em; filter: blur(5px); } }
@keyframes spinIn { from { opacity: 0; transform: rotate(-120deg) scale(.3); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(-14px); } }
@keyframes nudge { 0%, 70%, 100% { transform: translateX(0); } 80% { transform: translateX(5px); } 90% { transform: translateX(0); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes soft { from { opacity: 0; transform: translateY(4px); } }
@keyframes pop { from { transform: scale(.6); } }

/* ---------- 상단 ---------- */
.top { position: sticky; top: 0; z-index: 20; background: rgba(254, 250, 243, .94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.top__in, .prog { max-width: 680px; margin: 0 auto; padding: 0 20px; }
.top__in { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.wordmark { font-family: var(--f-brand); font-weight: 600; font-size: 19px; letter-spacing: .18em; }
.langbtn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); font-size: 15px; font-weight: 600; }
.prog { padding-bottom: 12px; }
.prog__bar { height: 5px; border-radius: 5px; background: var(--rose-soft); overflow: hidden; }
.prog__bar i { display: block; height: 100%; border-radius: 5px; background: var(--rose); transition: width .35s ease; }
.prog__txt { margin-top: 8px; font-size: 14px; color: var(--mut); display: flex; gap: 6px; align-items: baseline; }
.prog__txt b { color: var(--rose-dark); font-size: 15px; }

/* ---------- 본문 ---------- */
.main { padding: 22px 0 calc(var(--bar-h) + 40px + env(safe-area-inset-bottom)); }
.wrap { max-width: 680px; margin: 0 auto; padding: 0 20px; }
.step-title { font-size: 25px; font-weight: 700; line-height: 1.38; letter-spacing: -.01em; margin-bottom: 8px; }
.step-lead { color: var(--mut); margin-bottom: 22px; }
.step-title + .field, .step-title + .q, .step-title + .cards { margin-top: 20px; }
.sec-title { font-size: 19px; font-weight: 700; margin: 34px 0 12px; }

.errbanner:empty { display: none; }
.errbanner { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; padding: 12px 16px; border-radius: 12px; background: var(--err-soft); color: var(--err); font-weight: 600; font-size: 15px; }

.field { margin-bottom: 28px; scroll-margin: 140px; }
.field__head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.field__label { font-size: 18px; font-weight: 700; line-height: 1.4; }
.field__help { color: var(--mut); font-size: 15px; margin: -4px 0 12px; line-height: 1.5; }
.field__err { display: flex; align-items: flex-start; gap: 6px; color: var(--err); font-size: 15px; font-weight: 600; margin-top: 10px; line-height: 1.45; }
.field__err svg { margin-top: 2px; }
.field__err--tight { margin: -2px 0 6px 6px; }
.tag { flex-shrink: 0; font-size: 12px; font-weight: 600; line-height: 1; padding: 5px 8px; border-radius: 999px; background: var(--bg-2); color: var(--mut); vertical-align: 2px; }
.tag--req { background: var(--rose-soft); color: var(--rose-dark); }
.sub { margin-top: 12px; }
.sub > .field { margin-bottom: 0; }

/* 입력칸 */
.inp { width: 100%; min-height: 56px; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--line-2); background: var(--card); font-size: 18px; transition: border-color .15s, box-shadow .15s; appearance: none; -webkit-appearance: none; }
.inp::placeholder { color: #A99A94; }
.inp:focus { outline: none; border-color: var(--rose); box-shadow: 0 0 0 4px rgba(158, 99, 99, .14); }
.inp--area { min-height: 104px; resize: vertical; line-height: 1.5; }
.has-err > .inp, .has-err .phone .inp, .has-err > .sub > .inp { border-color: var(--err); }
.phone { display: grid; grid-template-columns: 124px 1fr; gap: 8px; }
.inp--cc { padding-right: 30px; font-size: 17px; background-image: linear-gradient(45deg, transparent 50%, var(--mut) 50%), linear-gradient(135deg, var(--mut) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }

/* 선택 버튼 */
.opts { display: grid; grid-template-columns: 1fr; gap: 8px; }
.opts--c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.opts--c3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 560px) { .opts--c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.opts--seg { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
.opt {
  position: relative; display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 10px 14px; border-radius: 14px;
  background: var(--card); border: 1.5px solid var(--line-2); text-align: left; font-size: 17px; font-weight: 500; line-height: 1.35;
  transition: border-color .12s, background .12s;
}
.opt__mark { width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--line-2); display: grid; place-items: center; color: transparent; flex-shrink: 0; transition: background .12s, border-color .12s; }
.opt__mark svg { width: 14px; height: 14px; stroke-width: 2.8; }
.opt__txt { min-width: 0; }
.opt__txt small { display: block; font-size: 14px; color: var(--mut); font-weight: 400; margin-top: 2px; }
.opt--desc { min-height: 64px; }
.opt[aria-pressed="true"] { border-color: var(--rose); background: var(--rose-mist); font-weight: 600; }
.opt[aria-pressed="true"] .opt__mark { background: var(--rose); border-color: var(--rose); color: #fff; }
.opts--seg .opt { justify-content: center; text-align: center; font-size: 18px; min-height: 56px; }
.opts--seg .opt__mark { display: none; }
.opts--seg .opt[aria-pressed="true"] { background: var(--rose); color: #fff; border-color: var(--rose); }
.has-err > .opts .opt, .has-err > .opts--seg .opt { border-color: rgba(163, 59, 54, .55); }

/* 질문 카드 */
.q { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 16px 16px; margin-bottom: 14px; scroll-margin: 140px; }
.q.has-err { border-color: var(--err); box-shadow: 0 0 0 3px rgba(163, 59, 54, .08); }
.q__text { font-size: 18px; font-weight: 600; line-height: 1.5; margin-bottom: 14px; }
.q__n { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 8px; background: var(--rose-soft); color: var(--rose-dark); font-size: 14px; font-weight: 700; margin-right: 8px; vertical-align: 1px; }
.q__follow { margin-top: 16px; padding: 16px 14px 0; border-radius: 14px; background: var(--rose-mist); border: 1px dashed rgba(158, 99, 99, .3); }
.q__follow .field { margin-bottom: 18px; }
.q__follow .field__label { font-size: 16px; }
.q--plain { margin-top: 4px; }

/* 확인 카드 (인지사항·안내사항·동의) */
.cards, .consents { display: grid; gap: 12px; }
.check { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: var(--radius); background: var(--card); border: 1.5px solid var(--line); cursor: pointer; scroll-margin: 140px; transition: border-color .15s, background .15s; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check:has(input:focus-visible) { outline: 3px solid rgba(158, 99, 99, .45); outline-offset: 2px; }
.check__box { width: 28px; height: 28px; border-radius: 9px; border: 1.8px solid var(--line-2); display: grid; place-items: center; color: transparent; flex-shrink: 0; background: var(--card); transition: background .12s, border-color .12s; }
.check__box svg { width: 17px; height: 17px; stroke-width: 2.8; }
.check__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
.check__text { font-size: 17px; line-height: 1.55; }
.check__sub { font-size: 15px; color: var(--mut); line-height: 1.5; }
.check.is-on { border-color: var(--rose); background: var(--rose-mist); }
.check.is-on .check__box { background: var(--rose); border-color: var(--rose); color: #fff; }
.check.has-err { border-color: var(--err); }
.check--card { flex-direction: column; gap: 10px; padding: 14px 16px 18px 18px; }
.check--card > .check__body { width: 100%; align-self: stretch; }
.check--card > .check__box { display: none; }
.card__n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--rose-soft); color: var(--rose-dark); font-size: 14px; font-weight: 700; }
.card__title { font-size: 18px; font-weight: 700; }
.card__text { font-size: 17px; line-height: 1.62; color: var(--ink-2); }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.pill { flex-shrink: 0; margin-left: auto; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line-2); font-size: 15px; font-weight: 600; color: var(--mut); background: var(--card); white-space: nowrap; }
.pill svg { width: 16px; height: 16px; stroke-width: 2.6; }
.check.is-on .pill { background: var(--rose); border-color: var(--rose); color: #fff; }

.consent-intro { font-size: 16px; color: var(--ink-2); background: var(--bg-2); border-radius: var(--radius); padding: 16px 18px; line-height: 1.65; margin: 14px 0 16px; }
.allbtn { width: 100%; display: flex; align-items: center; gap: 14px; text-align: left; padding: 16px 18px; border-radius: var(--radius); border: 1.5px solid var(--rose); background: var(--card); margin-bottom: 12px; min-height: 64px; }
.allbtn b { display: block; font-size: 18px; }
.allbtn small { display: block; font-size: 14px; color: var(--mut); font-weight: 400; }
.allbtn.is-on { background: var(--rose-mist); }
.allbtn.is-on .check__box { background: var(--rose); border-color: var(--rose); color: #fff; }
.consent-block { display: grid; gap: 0; }
.details { margin: 6px 0 0 4px; }
.details summary { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; color: var(--rose-dark); font-weight: 600; font-size: 15px; cursor: pointer; list-style: none; }
.details summary::-webkit-details-marker { display: none; }
.details summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin: -3px 0 0 10px; transition: transform .15s; }
.details[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.details dl { margin: 2px 0 6px; padding: 14px 16px; border-radius: 12px; background: var(--bg-2); font-size: 15px; line-height: 1.6; display: grid; gap: 4px 0; }
.details dt { font-weight: 700; color: var(--ink-2); }
.details dd { color: var(--mut); margin-bottom: 8px; }
.note-ok { font-size: 14px; color: var(--sage-ink); background: var(--sage-soft); border-radius: 10px; padding: 8px 12px; margin-top: 12px; }

/* 확인 화면 요약 */
.sum { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 6px 18px 14px; margin-bottom: 12px; }
.sum__head { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.sum__head h2 { font-size: 16px; font-weight: 700; padding: 10px 0; }
.sum dl { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; font-size: 15px; }
.sum dt { color: var(--mut); margin-top: 6px; line-height: 1.45; }
.sum dd { font-weight: 600; line-height: 1.5; }
@media (min-width: 640px) {
  .sum dl { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 18px; }
  .sum dt { margin-top: 0; }
}
.signbox { margin-top: 26px; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius-lg); padding: 18px; scroll-margin: 140px; }
.signbox.has-err { border-color: var(--err); }
.signbox__meta { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 15px; color: var(--mut); margin-bottom: 10px; }
.signbox__meta b { color: var(--ink); margin-left: 4px; }
.signpad { position: relative; height: 220px; border-radius: 14px; background: #FFFDF9; border: 1.5px dashed var(--line-2); overflow: hidden; }
@media (min-width: 700px) { .signpad { height: 260px; } }
.signpad canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; z-index: 1; }
.signpad__line { position: absolute; left: 24px; right: 24px; bottom: 54px; border-bottom: 1.5px solid rgba(47, 39, 37, .18); pointer-events: none; }
.signpad__redo { position: absolute; right: 8px; top: 8px; z-index: 2; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--card); border: 1.5px solid var(--line-2); font-size: 15px; font-weight: 600; }
.pledge { margin-top: 14px; font-size: 15px; color: var(--ink-2); line-height: 1.55; }

/* ---------- 하단 버튼 ---------- */
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: linear-gradient(to top, var(--bg) 70%, rgba(254, 250, 243, 0)); padding: 18px 0 max(14px, env(safe-area-inset-bottom)); }
.bar__in { max-width: 680px; margin: 0 auto; padding: 0 20px; display: grid; grid-template-columns: auto 1fr; gap: 10px; }
.bar .btn--ghost { background: var(--card); padding: 0 18px; }
.bar .btn--primary { min-height: 58px; font-size: 18px; }

/* ---------- 완료 ---------- */
.done { min-height: 100dvh; display: grid; place-items: center; padding: 32px 24px; text-align: center; background: radial-gradient(120% 60% at 50% 0%, var(--sage-soft) 0%, var(--bg) 62%); }
.done__in { max-width: 440px; display: flex; flex-direction: column; align-items: center; }
.done__icon { width: 84px; height: 84px; border-radius: 50%; background: var(--sage-ink); color: #fff; display: grid; place-items: center; margin-bottom: 24px; box-shadow: 0 12px 28px -14px rgba(78, 106, 76, .8); }
.done__icon svg { width: 44px; height: 44px; stroke-width: 2.4; }
.done__title { font-size: 28px; font-weight: 700; }
.done__desc { margin-top: 12px; font-size: 18px; line-height: 1.65; color: var(--ink-2); }
.done__tablet { margin: 22px 0 28px; font-size: 15px; color: var(--mut); background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.done__cd { margin-top: 14px; font-size: 14px; color: var(--mut); }

/* ---------- 모달 ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: end center; }
@media (min-width: 600px) { .modal { place-items: center; } }
.modal__bg { position: absolute; inset: 0; background: rgba(47, 39, 37, .42); }
.sheet, .dialog { position: relative; width: min(100%, 460px); background: var(--bg); border-radius: 24px 24px 0 0; padding: 22px 20px max(20px, env(safe-area-inset-bottom)); display: grid; gap: 10px; animation: up .2s ease; }
@media (min-width: 600px) { .sheet, .dialog { border-radius: 24px; } }
.sheet__title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; margin-bottom: 4px; }
.lang--sm { min-height: 58px; }
.dialog { text-align: center; justify-items: center; padding-top: 30px; }
.dialog .btn { width: 100%; }
.dialog__title { font-size: 21px; font-weight: 700; }
.dialog__desc { color: var(--ink-2); margin-bottom: 8px; }
.dialog__foot { font-size: 14px; color: var(--mut); margin-top: 4px; }
.dialog__icon { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; }
.dialog__icon svg { width: 30px; height: 30px; }
.dialog__icon--warn { background: var(--err-soft); color: var(--err); }
.spinner { width: 44px; height: 44px; border-radius: 50%; border: 4px solid var(--rose-soft); border-top-color: var(--rose); animation: spin .8s linear infinite; margin-bottom: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes up { from { transform: translateY(16px); opacity: 0; } }

/* =========================================================
   레퍼런스 스타일 (website wireframe) — 단계 화면 전체에 덮어쓰기
   · 흰 카드 대신 가는 선(1px)으로 나누기 · 그림자 없음 · 제목은 가볍게 · 작은 영어 라벨은 띄어 쓴 대문자
   ========================================================= */
.btn { border-radius: 999px; font-weight: 600; letter-spacing: .02em; }
.btn--primary { box-shadow: none; }
.btn--ghost { border: 1px solid var(--hair); }
.btn--ghost:hover { background: rgba(47, 39, 37, .04); }

/* 상단 */
.top { background: rgba(248, 242, 234, .95); border-bottom: 1px solid var(--hair); }
.wordmark { font-weight: 500; font-size: 16px; letter-spacing: .3em; }
.langbtn { border: 1px solid var(--hair); background: transparent; font-weight: 500; }
.prog { padding-bottom: 14px; }
.prog__bar { height: 1px; border-radius: 0; background: var(--line-2); overflow: visible; }
.prog__bar i { width: 100%; height: 2px; margin-top: -.5px; border-radius: 0; background: var(--rose); transform-origin: left; transform: scaleX(0); transition: transform .9s cubic-bezier(.7, 0, .3, 1); }
.prog__txt { margin-top: 10px; font-size: 12px; letter-spacing: .12em; align-items: center; gap: 10px; }
.prog__txt b { font-family: var(--f-brand); font-size: 17px; font-weight: 500; letter-spacing: 0; color: var(--rose-dark); }
.prog__dash { display: inline-block; width: 22px; height: 1px; background: var(--hair); }

/* 제목 */
.step-title { font-size: 26px; font-weight: 300; letter-spacing: -.02em; line-height: 1.35; }
.sec-title { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); padding-bottom: 10px; border-bottom: 1px solid var(--hair); margin: 38px 0 14px; }
html[lang="ko"] .sec-title, html[lang="ja"] .sec-title, html[lang^="zh"] .sec-title { font-size: 15px; letter-spacing: .02em; }
.errbanner { border-radius: 0; background: transparent; border: 1px solid var(--err); }

/* 입력칸: 밑줄만 */
.field__label { font-size: 16px; font-weight: 600; }
.tag { border-radius: 999px; background: transparent; border: 1px solid var(--line-2); font-weight: 500; }
.tag--req { background: transparent; border-color: rgba(158, 99, 99, .5); color: var(--rose-dark); }
.inp { border: 0; border-bottom: 1px solid var(--hair); border-radius: 0; background-color: transparent; padding: 14px 2px; }
.inp:focus { border-bottom-color: var(--rose); box-shadow: 0 1px 0 0 var(--rose); }
.inp--area { border: 1px solid var(--hair); border-radius: 4px; padding: 14px; background-color: rgba(255, 255, 255, .35); }
.has-err > .inp, .has-err .phone .inp, .has-err > .sub > .inp { border-color: var(--err); }
.phone { gap: 14px; }

/* 선택 버튼: 가는 테두리 */
.opt { border: 1px solid var(--line-2); border-radius: 4px; background: transparent; font-weight: 400; }
.opt:hover { border-color: var(--hair); }
.opt__mark { border-radius: 50%; border: 1px solid var(--hair); }
.opt[aria-pressed="true"] { border-color: var(--rose); background: rgba(158, 99, 99, .06); font-weight: 500; color: var(--rose-dark); }
.opts--seg .opt { border-radius: 999px; }
.opts--seg .opt[aria-pressed="true"] { color: #fff; }

/* 질문: 카드 대신 위아래 선 */
.q { background: transparent; border: 0; border-top: 1px solid var(--hair); border-radius: 0; padding: 20px 0 22px; margin-bottom: 0; }
.q:last-of-type { border-bottom: 1px solid var(--hair); }
.q.has-err { border-color: var(--err); box-shadow: none; }
.q__text { font-weight: 500; }
.q__n { min-width: 0; height: auto; padding: 0; border-radius: 0; background: none; font-family: var(--f-brand); font-size: 18px; font-weight: 500; color: var(--rose-dark); margin-right: 10px; vertical-align: 0; }
.q__follow { border-radius: 0; background: transparent; border: 0; border-left: 1px solid var(--rose); padding: 4px 0 0 16px; }

/* 확인 카드 */
.cards, .consents { gap: 10px; }
.check { border: 1px solid var(--line-2); border-radius: 4px; background: transparent; }
.check:hover { border-color: var(--hair); }
.check__box { border-radius: 50%; border: 1px solid var(--hair); background: transparent; }
.check.is-on { border-color: var(--rose); background: rgba(158, 99, 99, .05); }
.card__n { border-radius: 0; background: none; width: auto; height: auto; font-family: var(--f-brand); font-size: 18px; font-weight: 500; color: var(--rose-dark); }
.card__title { font-weight: 600; }
.pill { border: 1px solid var(--hair); background: transparent; font-weight: 500; }
.consent-intro { background: transparent; border-radius: 0; border-left: 1px solid var(--rose); padding: 4px 0 4px 16px; }
.allbtn { border: 1px solid var(--rose); border-radius: 4px; background: transparent; }
.allbtn.is-on { background: rgba(158, 99, 99, .06); }
.details dl { border-radius: 0; background: transparent; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.note-ok { border-radius: 0; background: transparent; border-left: 1px solid var(--sage-ink); }

/* 확인 화면 · 서명 */
.sum { background: transparent; border: 0; border-top: 1px solid var(--hair); border-radius: 0; padding: 4px 0 16px; margin-bottom: 4px; }
.sum__head h2 { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
html[lang="ko"] .sum__head h2, html[lang="ja"] .sum__head h2, html[lang^="zh"] .sum__head h2 { font-size: 15px; letter-spacing: .02em; }
.signbox { background: transparent; border: 1px solid var(--hair); border-radius: 4px; }
.signpad { border-radius: 2px; background: #fff; border: 1px solid var(--line-2); }
.signpad__redo { border: 1px solid var(--hair); background: #fff; }

/* 하단 */
.bar { background: linear-gradient(to top, var(--bg) 72%, rgba(248, 242, 234, 0)); }
.bar .btn--ghost { background: transparent; }

/* 완료 */
.done { background: none; }
.done__in .eyebrow { margin-bottom: 26px; }
.done__icon { width: 76px; height: 76px; background: transparent; color: var(--sage-ink); border: 1px solid var(--sage-ink); box-shadow: none; }
.done__icon svg { width: 34px; height: 34px; stroke-width: 1.4; }
.done__title { font-weight: 300; font-size: 30px; letter-spacing: -.02em; }
.done__tablet { background: transparent; border: 0; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); border-radius: 0; }

/* 모달 */
.sheet, .dialog { border-radius: 16px 16px 0 0; }
@media (min-width: 600px) { .sheet, .dialog { border-radius: 16px; } }
.sheet .lang { min-height: 58px; }
.sheet .lang:last-child::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--hair); }

/* 태블릿 이상: 좀 더 넉넉하게 */
@media (min-width: 768px) {
  body { font-size: 18px; }
  .step-title { font-size: 32px; }
  .wrap { padding: 0 28px; }
  .q { padding: 22px 22px 20px; }
  .welcome { padding: 18px; }
  .frame { min-height: calc(100dvh - 36px); }
  .welcome__title { font-size: 29px; }
  .wtop__logo { font-size: 19px; }
}
/* 영문 세리프 숫자는 키를 맞춰서 (01, 02 …) */
.lang__no, .prog__txt b, .q__n, .card__n { font-variant-numeric: lining-nums; font-feature-settings: "lnum" 1; }

/* =========================================================
   움직임 더하기 (레퍼런스 결: 선이 그어지고 · 글이 살짝 떠오르고 · 누르면 톡)
   '동작 줄이기'를 켠 기기에서는 맨 위 규칙으로 모두 꺼짐
   ========================================================= */

#app[data-enter="1"] .wrap > * { animation: rise .6s cubic-bezier(.2, .7, .2, 1) both; }
#app[data-enter="1"] .wrap > :nth-child(3) { animation-delay: .06s; }
#app[data-enter="1"] .wrap > :nth-child(4) { animation-delay: .12s; }
#app[data-enter="1"] .wrap > :nth-child(5) { animation-delay: .18s; }
#app[data-enter="1"] .wrap > :nth-child(6) { animation-delay: .24s; }
#app[data-enter="1"] .wrap > :nth-child(7) { animation-delay: .3s; }
#app[data-enter="1"] .wrap > :nth-child(n+8) { animation-delay: .36s; }
#app[data-enter="1"] .prog__txt { animation: soft .5s ease .1s both; }

/* 누르면 톡: 동그라미가 튀고 체크 표시가 그어짐 (방금 누른 것만) */
.opt.just[aria-pressed="true"] .opt__mark, .check.just.is-on .check__box, .allbtn.just.is-on .check__box { animation: pop .35s cubic-bezier(.3, 1.6, .5, 1) both; }
.opt.just[aria-pressed="true"] .opt__mark path, .check.just.is-on .check__box path, .allbtn.just.is-on .check__box path, .lang.just[aria-checked="true"] .lang__dot path {
  stroke-dasharray: 22; animation: drawCheck .4s .08s ease-out both; }
.opts--seg .opt.just[aria-pressed="true"] { animation: press .3s ease both; }
@keyframes drawCheck { from { stroke-dashoffset: 22; } to { stroke-dashoffset: 0; } }
@keyframes press { 40% { transform: scale(.97); } }

/* 완료: 동그라미 안에 체크가 그어지고, 처음 화면으로 돌아갈 때까지 선이 줄어듦 */
.done__in > * { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.done__in > :nth-child(2) { animation: spinIn .9s cubic-bezier(.2, .7, .2, 1) .1s both; }
.done__in > :nth-child(3) { animation-delay: .35s; }
.done__in > :nth-child(4) { animation-delay: .45s; }
.done__in > :nth-child(5) { animation-delay: .55s; }
.done__in > :nth-child(n+6) { animation-delay: .65s; }
.done__icon svg path { stroke-dasharray: 22; animation: drawCheck .6s .6s ease-out both; }
.done__timer { width: 160px; height: 1px; background: var(--line-2); margin: 18px auto 0; overflow: hidden; }
.done__timer i { display: block; height: 100%; background: var(--rose); transform-origin: left; animation: countdown 30s linear both; }
@keyframes countdown { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* =========================================================
   말풍선 인사 · 귀여운 움직임 (선 스타일 안에서 귀엽게)
   ========================================================= */
/* 말풍선: 프로필 → 풍선이 톡 → '…' 점 → 한 글자씩 */
.chat { display: grid; gap: 10px; }
.chat__who { display: flex; align-items: center; gap: 10px; }
.ava { width: 40px; height: 40px; flex-shrink: 0; }
.ava svg { width: 100%; height: 100%; overflow: visible; }
.ava__ring { fill: #FFFDF9; stroke: var(--hair); stroke-width: 1; }
.ava__eyes circle { fill: var(--ink); stroke: none; }
.ava__eyes { transform-box: fill-box; transform-origin: 50% 50%; animation: blink 4.2s infinite; }
.ava__smile { fill: none; stroke: var(--rose-dark); stroke-width: 1.4; stroke-linecap: round; }
.ava__cheek { fill: #F0B3AC; stroke: none; opacity: .7; }
.chat__name { display: grid; font-family: var(--f-brand); font-size: 14px; font-weight: 500; letter-spacing: .22em; line-height: 1.2; }
.chat__name small { font-family: var(--f-body); font-size: 10px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--mut); margin-top: 3px; }
.bubble { position: relative; margin-left: 18px; padding: 18px 20px 20px; background: #FFFDF9; border: 1px solid var(--hair); border-radius: 6px 24px 24px 24px;
  transform-origin: 0 0; animation: bob2 5s ease-in-out infinite; }
.welcome__title, .welcome__lead { display: grid; }
.ghost, .type { grid-area: 1 / 1; }
.ghost { color: transparent; }
.bubble.is-done .ghost { color: inherit; }
.bubble.is-done .type { visibility: hidden; }
.type.caret::after { content: ""; display: inline-block; width: 1.5px; height: 1em; margin-left: 2px; vertical-align: -.14em; background: var(--rose); animation: caret .7s steps(1) infinite; }
.bubble__dots { position: absolute; left: 20px; top: 24px; display: none; gap: 5px; }
.bubble.is-waiting .bubble__dots { display: flex; }
.bubble__dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--rose); animation: dots 1s ease-in-out infinite; }
.bubble__dots i:nth-child(2) { animation-delay: .15s; } .bubble__dots i:nth-child(3) { animation-delay: .3s; }
.is-intro .chat__who { animation: rise .7s cubic-bezier(.2, .7, .2, 1) .6s both; }
.is-intro .ava { animation: popIn .7s cubic-bezier(.34, 1.56, .64, 1) .6s both; }
.is-intro .bubble { animation: bubbleIn .7s cubic-bezier(.34, 1.56, .64, 1) .9s both, bob2 5s ease-in-out 1.6s infinite; }
.welcome:not(.is-intro) .bubble { animation: wiggle .45s ease both, bob2 5s ease-in-out .45s infinite; }
@keyframes bubbleIn { from { opacity: 0; transform: scale(.3) rotate(-6deg); } }
@keyframes popIn { 0% { opacity: 0; transform: scale(.3); } 60% { opacity: 1; } }
@keyframes wiggle { 30% { transform: rotate(-2deg) scale(1.02); } 60% { transform: rotate(1.2deg); } }
@keyframes bob2 { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes dots { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-5px); opacity: 1; } }
@keyframes caret { 50% { opacity: 0; } }
@keyframes blink { 0%, 90%, 96%, 100% { transform: scaleY(1); } 93% { transform: scaleY(.1); } }

/* 시작 버튼 동그라미: 가끔 말랑하게 */
.cta__c { animation: jelly 5s ease-in-out 3.2s infinite; }
@keyframes jelly { 0%, 80%, 100% { transform: scale(1); } 85% { transform: scale(1.09, .93); } 90% { transform: scale(.95, 1.05); } 95% { transform: scale(1.02, .98); } }

