/* 머니소파 웹 — 시안 A 아기자기 톤. 피그마 71 토큰(Moneysofa, color/v2) 기준.
   규칙: 15px 미만 글자 없음(T5), 간격은 4·8·12·16·24·32·48·64(+40·56·96 섹션), 모서리 12·16·24 + 알약. */
:root {
  --ink: #1f1e1b;
  --ink-2: #5f5a52;
  --line: #e5dfd5;
  --line-off: #b8b1a6;
  --paper: #ffffff;
  --area: #f8f5f0;
  --floor: #f1ebe1;
  --peach: #fde6d8;
  --cream: #fef4d8;
  --leaf-bg: #e4f0de;
  --sky: #e6eff2;
  --accent: #9e4514;
  --agree: #4e8a4e;
  --agree-text: #3a6b3a;
  --honey: #f2be45;
  --tangerine: #ee7b3f;
  --error: #b3261e;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "IBM Plex Sans KR", system-ui, -apple-system, "Apple SD Gothic Neo", sans-serif;
  font-size: 17px;
  line-height: 26px;
  word-break: keep-all;
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
.num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 840px) { .wrap { padding: 0 40px; } }

/* 상단 바 */
.top { position: sticky; top: 0; z-index: 10; background: rgba(255, 255, 255, 0.97); border-bottom: 1.5px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 12px; }
.logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; min-height: 44px; }
.logo .mk { width: 36px; height: 36px; }
.logo .wm { width: 86px; height: 22px; }
@media (min-width: 840px) { .logo .wm { width: 102px; height: 26px; } }

/* 버튼 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 56px; padding: 0 28px; border-radius: 999px;
  background: var(--ink); color: #fff; border: 2px solid var(--ink);
  font: inherit; font-size: 17px; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: transform 120ms ease-out;
}
.btn.line { background: #fff; color: var(--ink); }
.btn.sm { min-height: 44px; padding: 0 20px; font-size: 16px; }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn[disabled] { background: var(--line-off); border-color: var(--line-off); cursor: default; }
.btn.done { background: var(--leaf-bg); color: var(--agree-text); border-color: var(--leaf-bg); }
.textbtn {
  background: none; border: 0; padding: 0 8px; min-height: 44px; cursor: pointer;
  font: inherit; font-weight: 600; color: var(--ink); text-decoration: underline; text-underline-offset: 4px;
}
:focus-visible { outline: 3px solid var(--honey); outline-offset: 3px; }

/* 첫 화면 */
.hero { padding: 40px 0 64px; }
.hero .wrap { display: grid; gap: 32px; align-items: center; }
@media (min-width: 960px) {
  .hero { padding: 72px 0 96px; }
  .hero .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 64px; }
}
.ask {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 16px;
  font-size: 18px; line-height: 26px; font-weight: 600; color: var(--accent);
}
.ask svg { flex: none; }
h1 { margin: 0; font-size: 36px; line-height: 46px; letter-spacing: -1px; font-weight: 700; }
@media (min-width: 600px) { h1 { font-size: 44px; line-height: 54px; } .ask { font-size: 19px; } }
@media (min-width: 1200px) { h1 { font-size: 56px; line-height: 66px; } }
.lead { margin: 20px 0 32px; font-size: 18px; line-height: 29px; color: var(--ink-2); max-width: 34em; }
@media (min-width: 960px) { .lead { font-size: 19px; line-height: 30px; } }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 599px) { .cta .btn { flex: 1 1 100%; } }
.panel { border-radius: 24px; padding: 24px; display: flex; align-items: center; justify-content: center; }
.panel.peach { background: var(--peach); }
.panel.cream { background: var(--cream); }
.panel.leaf { background: var(--leaf-bg); }
.hero .panel { aspect-ratio: 600 / 420; }
.hero .panel img { width: 92%; }

/* 섹션 */
.sec { padding: 0 0 80px; }
@media (min-width: 960px) { .sec { padding-bottom: 112px; } }
.sec-head { border-top: 2px solid var(--ink); padding-top: 32px; margin-bottom: 40px; }
.sec-head h2 { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 28px; line-height: 36px; letter-spacing: -0.5px; }
.sec-head h2 svg { flex: none; }
.sec-head p { margin: 8px 0 0; color: var(--ink-2); font-size: 17px; }
@media (min-width: 960px) { .sec-head h2 { font-size: 34px; line-height: 42px; } }

/* 이럴 때 열어요: 순간 3개 */
.moments { display: flex; flex-direction: column; gap: 56px; }
.moment { display: grid; gap: 24px; align-items: center; }
@media (min-width: 840px) {
  .moments { gap: 64px; }
  .moment { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; }
  .moment:nth-child(even) .m-pic { order: 2; }
}
.m-pic { border-radius: 24px; height: 400px; overflow: hidden; display: flex; justify-content: center; padding-top: 32px; }
@media (min-width: 840px) { .m-pic { height: 540px; padding-top: 48px; } }
.m-pic .phone { width: 240px; align-self: flex-start; border: 2px solid var(--ink); border-bottom: 0; border-radius: 28px 28px 0 0; background: #fff; }
@media (min-width: 840px) { .m-pic .phone { width: 320px; } }
.who { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--ink-2); font-size: 16px; font-weight: 500; }
.avs { display: inline-flex; }
.av {
  width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--ink); background: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; color: var(--ink);
}
.av.dark { background: var(--ink); color: #fff; }
.avs .av + .av { margin-left: -8px; }
.av.empty { border-style: dashed; border-color: var(--line-off); color: var(--ink-2); }
.m-title { margin: 16px 0 0; font-size: 28px; line-height: 36px; letter-spacing: -0.5px; font-weight: 700; }
@media (min-width: 960px) { .m-title { font-size: 32px; line-height: 42px; } }
.m-q { display: flex; align-items: center; gap: 10px; margin: 24px 0 8px; font-size: 19px; line-height: 26px; font-weight: 600; }
.m-q svg { flex: none; }
.m-text { margin: 0; color: var(--ink-2); max-width: 32em; }
.note {
  display: flex; gap: 12px; align-items: flex-start; margin: 20px 0 0; padding: 12px 16px;
  border-radius: 12px; background: var(--area); font-size: 16px; line-height: 24px; color: var(--ink); max-width: 32em;
}
.note svg { flex: none; margin-top: 2px; }
.examples { margin: 40px 0 0; color: var(--ink-2); font-size: 16px; }

/* 먼저 시작해 보기 */
.try { display: grid; gap: 40px; }
@media (min-width: 960px) { .try { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: start; } }
.field { display: flex; flex-direction: column; gap: 8px; margin: 0 0 20px; }
.field label { font-weight: 600; font-size: 17px; }
.field input {
  font: inherit; font-size: 18px; min-height: 56px; padding: 0 16px; width: 100%;
  border: 2px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink);
}
.field input::placeholder { color: #8a847a; }
.field input:focus { border-color: var(--ink); outline: none; }
.field .unit { position: relative; }
.field .unit input { padding-right: 48px; text-align: right; font-variant-numeric: tabular-nums; }
.field .unit span { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-weight: 600; color: var(--ink-2); }
.form-err { min-height: 24px; margin: 0 0 12px; color: var(--error); font-size: 16px; font-weight: 500; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
@media (max-width: 599px) { .form-actions .btn { flex: 1 1 100%; } }
.local-note { display: flex; gap: 10px; align-items: flex-start; margin: 24px 0 0; color: var(--ink-2); font-size: 16px; line-height: 24px; }
.local-note svg { flex: none; margin-top: 2px; }

/* 우리 집 한 장 (미리보기) */
.sheet { border: 2px solid var(--ink); border-radius: 24px; padding: 20px; background: #fff; }
@media (min-width: 600px) { .sheet { padding: 24px; } }
.sheet-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 16px; }
.sheet-top h3 { margin: 0; font-size: 22px; line-height: 30px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 999px; font-size: 15px; font-weight: 600; }
.chip.ex { background: var(--area); color: var(--ink-2); }
.chip.solo { background: var(--cream); color: var(--accent); }
.block { border-radius: 16px; padding: 20px; margin: 0 0 12px; }
.block.peach { background: var(--peach); }
.block.leaf { background: var(--leaf-bg); }
.block .q { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-weight: 600; font-size: 17px; }
.big { margin: 0; font-size: 36px; line-height: 44px; font-weight: 700; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.big.under { display: inline-block; background: linear-gradient(transparent 82%, rgba(238, 123, 63, 0.75) 82%, rgba(238, 123, 63, 0.75) 92%, transparent 92%); }
.mid { margin: 0; font-size: 26px; line-height: 34px; font-weight: 700; font-variant-numeric: tabular-nums; }
.mid small { font-size: 17px; font-weight: 500; color: var(--ink-2); }
.sub { margin: 8px 0 12px; color: var(--ink-2); font-size: 16px; font-variant-numeric: tabular-nums; }
.bar { height: 16px; border-radius: 999px; border: 2px solid var(--ink); background: #fff; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--agree); border-radius: 999px; }
.bar-row { display: flex; align-items: center; gap: 12px; }
.bar-row .bar { flex: 1; }
.bar-row b { color: var(--agree-text); font-size: 16px; white-space: nowrap; }
.leaf .sub { color: var(--agree-text); margin-bottom: 0; margin-top: 12px; }
.seat { display: flex; align-items: center; gap: 12px; padding: 16px 4px 4px; flex-wrap: wrap; }
.seat p { margin: 0; flex: 1 1 180px; font-weight: 600; }
.seat .btn { flex: 1 1 100%; }
.invite-done { margin: 12px 0 0; padding: 12px 16px; border-radius: 12px; background: var(--leaf-bg); color: var(--agree-text); font-size: 16px; line-height: 24px; }
.invite-link { width: 100%; margin-top: 8px; font: inherit; font-size: 16px; min-height: 48px; padding: 0 12px; border: 2px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); }

/* 믿고 써도 될까? */
.trust { display: grid; gap: 0; list-style: none; margin: 0; padding: 0; }
@media (min-width: 840px) { .trust { grid-template-columns: 1fr 1fr; column-gap: 56px; } }
.trust li { display: flex; gap: 16px; align-items: flex-start; padding: 24px 0; border-bottom: 1.5px solid var(--line); }
.trust .ic { flex: none; width: 48px; height: 48px; border-radius: 16px; background: var(--area); display: flex; align-items: center; justify-content: center; }
.trust b { display: block; font-size: 19px; line-height: 28px; }
.trust span { display: block; margin-top: 4px; color: var(--ink-2); }

/* 자주 묻는 질문 */
.faq details { border: 2px solid var(--line); border-radius: 16px; margin: 0 0 12px; background: #fff; }
.faq details[open] { background: var(--area); border-color: var(--area); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 64px; padding: 16px 20px; font-weight: 600; font-size: 18px; line-height: 26px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { flex: none; transition: transform 160ms ease-out; }
.faq details[open] summary svg { transform: rotate(180deg); }
.faq .a { padding: 0 20px 20px; margin: 0; color: var(--ink-2); max-width: 46em; }

/* 마지막 띠 */
.band { border-radius: 24px; background: var(--cream); padding: 32px 24px; display: grid; gap: 24px; align-items: center; }
@media (min-width: 960px) { .band { grid-template-columns: 300px minmax(0, 1fr) auto; padding: 40px 48px; gap: 40px; } }
.band img { width: 100%; max-width: 300px; }
.band h2 { margin: 0; font-size: 28px; line-height: 36px; letter-spacing: -0.5px; }
@media (min-width: 960px) { .band h2 { font-size: 32px; line-height: 42px; } }
.band .cta { flex-direction: column; }
@media (max-width: 959px) { .band .cta { flex-direction: row; } }
.notify-done { margin: 12px 0 0; color: var(--agree-text); font-size: 16px; line-height: 24px; font-weight: 500; max-width: 30em; }

/* 초대판 */
.inv-from { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; font-weight: 600; color: var(--accent); }
.honest { margin: 0 0 32px; padding: 16px 20px; border-radius: 16px; background: var(--area); color: var(--ink); max-width: 34em; }

/* 바닥글 */
.foot { background: var(--floor); padding: 40px 0 48px; }
.foot .wrap { display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 840px) { .foot .wrap { flex-direction: row; justify-content: space-between; align-items: flex-start; } }
.foot p { margin: 0; color: var(--ink-2); font-size: 16px; line-height: 24px; }
.foot .by { display: flex; align-items: center; gap: 12px; color: var(--ink); font-weight: 600; }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 16px; }
.foot nav a, .foot nav span { min-height: 44px; display: inline-flex; align-items: center; }
.foot nav span { color: var(--ink-2); }

/* 글 페이지(개인정보 처리방침) */
.doc { max-width: 720px; padding-top: 48px; padding-bottom: 80px; }
.doc h1 { font-size: 34px; line-height: 42px; }
.doc h2 { margin: 40px 0 12px; font-size: 22px; line-height: 30px; padding-top: 24px; border-top: 1.5px solid var(--line); }
.doc p, .doc li { color: var(--ink); }
.doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc .meta { color: var(--ink-2); margin-top: 12px; }
.doc table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 12px 8px; border-bottom: 1.5px solid var(--line); font-size: 16px; }
.doc th { width: 34%; }

/* 첫 화면 장면: 소파 두 사람 → 머니소파 앱이 켜진 폰 → 도장 (10초 반복, transform·opacity만)
   기본 상태 = 멈춘 그림(폰·도장·두 번째 말풍선). 움직임 허용일 때만 애니메이션. */
.hero .panel.stage { padding: 8px; aspect-ratio: auto; }
@media (min-width: 600px) { .hero .panel.stage { padding: 24px 32px; } }
.scene { display: block; width: 100%; height: auto; overflow: visible; }
.scene .t-bub { font-size: 21px; font-weight: 600; fill: var(--ink); }
.scene .t-card { font-size: 21px; font-weight: 600; fill: var(--ink-2); }
.scene .t-num { font-size: 28px; font-weight: 700; fill: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -0.5px; }
.scene .bubble.ba, .scene .paper { opacity: 0; }
.scene .lean, .scene .breathe, .scene .leaf, .scene .stamp, .scene .card, .scene .bubble {
  transform-box: fill-box; transform-origin: 50% 100%;
}
.scene .stamp { transform-origin: 50% 50%; }
.scene .bubble.ba { transform-origin: 70% 100%; }
.scene .bubble.bb { transform-origin: 20% 100%; }

@media (prefers-reduced-motion: no-preference) {
  .scene .bubble.ba { animation: ms-ba 10s ease-out infinite; }
  .scene .bubble.bb { animation: ms-bb 10s ease-out infinite; }
  .scene .card { animation: ms-card 10s cubic-bezier(.2,.8,.3,1) infinite; }
  .scene .stamp { animation: ms-stamp 10s ease-out infinite; }
  .scene .paper { animation: ms-paper 10s ease-in-out infinite; }
  .scene .lean.a { animation: ms-lean-a 10s ease-in-out infinite; }
  .scene .lean.b { animation: ms-lean-b 10s ease-in-out infinite; }
  .scene .breathe.a { animation: ms-breathe 3.4s ease-in-out infinite alternate; }
  .scene .breathe.b { animation: ms-breathe 3.8s ease-in-out -1.2s infinite alternate; }
  .scene .leaf { animation: ms-leaf 4.2s ease-in-out infinite alternate; }
  .scene .leaf.l2 { animation-duration: 3.6s; animation-delay: -1.4s; }
  .scene .leaf.l3 { animation-duration: 4.8s; animation-delay: -2.6s; }
  .hero .stage.off .scene * { animation-play-state: paused; }
}
@keyframes ms-ba {
  0%, 4% { opacity: 0; transform: translateY(6px) scale(.94); }
  8%, 24% { opacity: 1; transform: none; }
  28%, 100% { opacity: 0; transform: translateY(-4px); }
}
@keyframes ms-card {
  0%, 27% { opacity: 0; transform: translateY(16px) scale(.3); }
  29% { opacity: 1; }
  36%, 90% { opacity: 1; transform: none; }
  96%, 100% { opacity: 0; transform: translateY(-6px); }
}
@keyframes ms-paper {
  0%, 27% { opacity: 1; }
  31%, 92% { opacity: 0; }
  98%, 100% { opacity: 1; }
}
@keyframes ms-bb {
  0%, 48% { opacity: 0; transform: translateY(6px) scale(.94); }
  52%, 68% { opacity: 1; transform: none; }
  72%, 100% { opacity: 0; transform: translateY(-4px); }
}
@keyframes ms-stamp {
  0%, 73.9% { opacity: 0; transform: scale(1.8); }
  74% { opacity: 1; transform: scale(1.8); }
  76.5% { opacity: 1; transform: scale(.92); }
  78%, 100% { opacity: 1; transform: none; }
}
@keyframes ms-lean-a {
  0%, 30% { transform: none; }
  36%, 86% { transform: rotate(3deg); }
  92%, 100% { transform: none; }
}
@keyframes ms-lean-b {
  0%, 30% { transform: none; }
  36%, 86% { transform: rotate(-3deg); }
  92%, 100% { transform: none; }
}
@keyframes ms-breathe { from { transform: none; } to { transform: scaleY(1.025); } }
@keyframes ms-leaf { from { transform: rotate(-2.5deg); } to { transform: rotate(2.5deg); } }

/* 순간 카드: 앱 화면의 핵심 부분만 크게 */
.m-pic:has(.shot) { height: auto; padding: 24px; align-items: center; }
@media (min-width: 840px) { .m-pic:has(.shot) { padding: 40px; min-height: 480px; } }
.m-pic .shot { width: 100%; max-width: 480px; padding: 12px 8px; border: 2px solid var(--ink); border-radius: 20px; background: #fff; box-shadow: 0 6px 0 rgba(31, 30, 27, 0.08); }
