/* 새김 웹 — 앱(src/ui/theme.ts)과 같은 값. iOS 기본 앱 문법: 시스템 글꼴·시스템 색 + 인디고 강조, 빨강은 녹음 점에만. */
:root {
  --bg: #F2F2F7;
  --elev: #FFFFFF;
  --label: #000000;
  --label2: rgba(60, 60, 67, 0.72);
  --label3: rgba(60, 60, 67, 0.36);
  --sep: rgba(60, 60, 67, 0.16);
  --fill: rgba(120, 120, 128, 0.12);
  --tint: #5856D6;
  --tint-soft: rgba(88, 86, 214, 0.12);
  --tint-faint: rgba(88, 86, 214, 0.06);
  --seal: #D9342A;
  --paper: #FAF9F4;
  --night: #0B0B10;
  --night-elev: #1C1C1E;
  --night-label2: rgba(235, 235, 245, 0.62);
  --r-lg: 22px;
  --r-xl: 26px;
  --r-xxl: 32px;
  --shadow-card: 0 2px 10px rgba(40, 40, 90, 0.08);
  --shadow-float: 0 10px 30px rgba(0, 0, 0, 0.12);
  --gutter: 20px;
  --max: 1080px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--label);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard Variable", Pretendard, "Noto Sans KR", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
p, h1, h2, h3, h4, ol, blockquote { margin: 0; }
a { color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── 위 막대 ───────────────────────────── */
.bar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px var(--gutter);
  padding-top: max(12px, env(safe-area-inset-top));
  background: rgba(242, 242, 247, 0.72);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
.brand img { border-radius: 8px; }
.bar-cta {
  text-decoration: none; font-size: 14px; font-weight: 700; color: var(--tint);
  padding: 8px 14px; border-radius: 999px; background: var(--tint-soft);
}

/* ── 1. 첫 화면 ───────────────────────── */
.hero {
  position: relative;
  padding: 36px var(--gutter) 64px;
  background:
    radial-gradient(120% 60% at 80% 0%, rgba(147, 171, 235, 0.55), transparent 60%),
    radial-gradient(90% 50% at 0% 30%, rgba(196, 190, 242, 0.55), transparent 65%),
    radial-gradient(80% 40% at 60% 75%, rgba(244, 214, 214, 0.55), transparent 70%),
    var(--bg);
  margin-top: -62px; padding-top: 98px;
}
.hero-copy { max-width: 560px; }
h1 {
  font-size: clamp(40px, 11vw, 64px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.045em;
}
.lead { margin-top: 18px; font-size: 18px; line-height: 1.6; color: var(--label2); max-width: 30em; }
.cta { margin-top: 28px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.cta-note { font-size: 14px; font-weight: 600; color: var(--label2); }

/* App Store 배지 — Apple 공식 그림(한국어, toolbox.marketingtools.apple.com). 높이 40px 이상·둘레 여백 유지 */
.badge { display: inline-block; line-height: 0; }
.badge img { height: 52px; width: auto; }
.badge:active { transform: scale(0.97); }

/* 한 주 동안 흐려지는 노트(앱 1-1 과 같은 생각) */
.week {
  margin-top: 40px;
  max-width: 440px;
  padding: 26px 22px 22px;
  border-radius: var(--r-xxl);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.7);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow-float);
}
.week-line {
  min-height: 2.5em;
  font-size: 26px; line-height: 1.25; font-weight: 800; letter-spacing: -0.04em;
  transition: color 0.5s;
}
.week-line span { display: inline-block; transition: opacity 0.35s, transform 0.35s; }
.week-line span.out { opacity: 0; transform: translateY(6px); }
.week[data-stage="4"] .week-line { color: var(--tint); }

.memo {
  margin-top: 18px;
  padding: 18px 18px 16px;
  border-radius: var(--r-lg);
  background: var(--elev);
  box-shadow: var(--shadow-card);
  font-size: 14px; line-height: 1.55; color: var(--label2);
}
.memo > p { transition: filter 1.1s ease, opacity 1.1s ease; }
.memo-meta { font-size: 12px; color: var(--label3); }
.memo-title { margin: 4px 0 6px; font-size: 16px; font-weight: 700; color: var(--label); letter-spacing: -0.02em; }
.memo-mark { margin-top: 6px; font-weight: 700; color: var(--tint); }
.memo-mark mark { background: linear-gradient(transparent 58%, var(--tint-soft) 58%); color: inherit; padding: 0 2px; }
.memo-check { margin-top: 6px; display: flex; align-items: center; gap: 8px; }
.memo-check i { width: 16px; height: 16px; border-radius: 4px; background: var(--tint); position: relative; flex: none; }
.memo-check i::after { content: ""; position: absolute; left: 5px; top: 2px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* 날마다 흐려짐: f1 이 먼저, 제목이 마지막(토요일) */
.week[data-stage="1"] .f1 { filter: blur(1.2px); opacity: 0.7; }
.week[data-stage="2"] .f1 { filter: blur(3px); opacity: 0.45; }
.week[data-stage="2"] .f2 { filter: blur(1.6px); opacity: 0.6; }
.week[data-stage="2"] .f3 { filter: blur(0.8px); opacity: 0.8; }
.week[data-stage="3"] .f1,
.week[data-stage="3"] .f2,
.week[data-stage="3"] .f3 { filter: blur(4.5px); opacity: 0.3; }
.week[data-stage="3"] .memo-meta,
.week[data-stage="3"] .memo-title { filter: blur(3px); opacity: 0.4; }

.days { list-style: none; padding: 0; margin-top: 16px; display: flex; justify-content: space-between; }
.days li {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: var(--label3);
  transition: background 0.4s, color 0.4s;
}
.days li.on { background: var(--label); color: #fff; }
.days li.done { background: var(--tint); color: #fff; }

/* ── 공용 글자 ───────────────────────── */
.kicker { font-size: 14px; font-weight: 700; color: var(--tint); letter-spacing: -0.01em; }
.center { text-align: center; }
h2 {
  font-size: clamp(30px, 7.5vw, 44px);
  line-height: 1.2; font-weight: 800; letter-spacing: -0.04em;
}
h3 { font-size: 28px; line-height: 1.25; font-weight: 800; letter-spacing: -0.035em; }
.tag { font-size: 13px; font-weight: 700; color: var(--tint); }
.tag.gray { color: var(--label2); }

/* ── 2. 이렇게 돼요 ───────────────────── */
.how { padding: 24px var(--gutter) 40px; max-width: var(--max); margin: 0 auto; }
.step { display: grid; gap: 22px; padding: 44px 0; }
.step + .step { border-top: 1px solid var(--sep); }
.step-copy h3 { margin-top: 6px; }
.step-copy > p:last-child { margin-top: 12px; color: var(--label2); max-width: 26em; }
.art { border-radius: var(--r-xxl); overflow: hidden; box-shadow: var(--shadow-float); max-width: 440px; width: 100%; }

.art-night { background: var(--night); color: #fff; padding: 22px 22px 20px; }
.rec { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--night-label2); }
.rec i { width: 8px; height: 8px; border-radius: 50%; background: var(--seal); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
.clock { margin-top: 4px; font-size: 56px; font-weight: 300; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.lines { margin-top: 16px; display: grid; gap: 8px; font-size: 15px; line-height: 1.5; color: var(--night-label2); }
.lines .now { color: #fff; }
.lock { margin-top: 18px; display: inline-block; font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 999px; background: var(--night-elev); color: var(--night-label2); }

.art-note { background: var(--bg); }
.cover {
  position: relative; height: 260px; padding: 18px; display: flex; flex-direction: column; justify-content: flex-end;
  background-size: cover; background-position: center 40%; color: #fff;
}
.cover::before { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 35%, rgba(0, 0, 0, 0.45)); }
.cover > * { position: relative; }
.chip {
  align-self: flex-start; font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.24); border: 1px solid rgba(255, 255, 255, 0.4);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.cover-title { margin-top: 8px; font-size: 26px; font-weight: 800; letter-spacing: -0.04em; line-height: 1.2; }
.cover-meta { margin-top: 4px; font-size: 13px; opacity: 0.9; }
.art-note-body { padding: 18px 20px 22px; }
.one { margin-top: 6px; font-size: 20px; line-height: 1.4; font-weight: 700; letter-spacing: -0.035em; }

.art-devo {
  position: relative; display: grid; gap: 14px; padding: 22px; box-shadow: none; overflow: visible;
}
.art-devo::before {
  content: ""; position: absolute; inset: 0; border-radius: var(--r-xxl); z-index: -1;
  background: linear-gradient(rgba(250, 249, 244, 0.35), var(--paper) 70%), url(img/bg-devo.jpg) center / cover;
  box-shadow: var(--shadow-float);
}
.devo { padding: 4px 2px 0; }
.devo-k { font-size: 13px; font-weight: 700; color: rgba(0, 0, 0, 0.55); }
.devo-q { margin-top: 8px; font-size: 24px; line-height: 1.35; font-weight: 800; letter-spacing: -0.04em; }
.devo-v { margin-top: 12px; font-size: 15px; line-height: 1.6; color: var(--label2); }
.amen {
  display: inline-block; margin-top: 16px; padding: 11px 26px; border-radius: 999px;
  background: var(--tint); color: #fff; font-weight: 700; font-size: 16px;
  box-shadow: 0 12px 24px rgba(88, 86, 214, 0.28);
}
.widget {
  justify-self: end; width: 158px; height: 158px; border-radius: 26px; padding: 14px;
  background: var(--elev); box-shadow: var(--shadow-float); display: flex; flex-direction: column;
}
.w-k { font-size: 12px; font-weight: 700; color: var(--tint); }
.w-q { margin-top: 6px; font-size: 15px; line-height: 1.33; font-weight: 700; letter-spacing: -0.02em; flex: 1; }
.w-dots { display: flex; gap: 5px; }
.w-dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--fill); }
.w-dots i.on { background: var(--tint); }

/* ── 3. 예시 노트 ─────────────────────── */
.sample { padding: 56px var(--gutter) 24px; background: var(--elev); }
.sample h2 { margin-top: 8px; text-align: center; }
.paper {
  position: relative;
  max-width: 560px; margin: 32px auto 0;
  border-radius: var(--r-xxl); overflow: hidden;
  background: var(--bg); box-shadow: var(--shadow-float);
}
.paper-cover {
  position: relative; height: 300px; padding: 22px; display: flex; flex-direction: column; justify-content: flex-end;
  background-size: cover; background-position: center 40%; color: #fff;
}
.paper-cover::before { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 30%, rgba(0, 0, 0, 0.5)); }
.paper-cover > * { position: relative; }
.paper-title { font-size: 30px; line-height: 1.2; font-weight: 800; letter-spacing: -0.045em; }
.paper-meta { margin-top: 6px; font-size: 13px; opacity: 0.9; }
.paper-body { padding: 26px 22px 30px; }
.one.big { font-size: 24px; line-height: 1.42; }
.opening { margin: 18px 0 32px; color: var(--label2); }
.flow { list-style: none; padding: 0; margin-top: 14px; counter-reset: f; display: grid; gap: 26px; }
.flow li { counter-increment: f; position: relative; padding-left: 40px; }
.flow li::before {
  content: counter(f); position: absolute; left: 0; top: 1px;
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--tint-soft); color: var(--tint); font-size: 13px; font-weight: 700;
}
.flow h4 { font-size: 18px; line-height: 1.4; font-weight: 700; letter-spacing: -0.03em; }
.flow p { margin-top: 6px; color: var(--label2); }
.flow blockquote {
  margin-top: 12px; padding: 12px 14px; border-radius: 14px;
  background: var(--elev); font-size: 16px; line-height: 1.55; font-weight: 600; letter-spacing: -0.02em;
  box-shadow: inset 3px 0 0 var(--tint);
}
.flow cite { font-style: normal; font-size: 12px; font-weight: 700; color: var(--tint); margin-left: 4px; font-variant-numeric: tabular-nums; }
.apply { margin-top: 30px; padding: 16px 18px; border-radius: var(--r-lg); background: var(--tint); color: #fff; }
.apply .tag { color: rgba(255, 255, 255, 0.78); }
.apply p:last-child { margin-top: 4px; font-size: 18px; line-height: 1.45; font-weight: 700; letter-spacing: -0.03em; }

/* 접힌 상태: 셋째 흐름까지만, 아래를 흐리게 덮고 '끝까지 보기' */
.paper:not(.open) .more { display: none; }
.paper:not(.open) .paper-body { max-height: 1080px; overflow: hidden; }
.paper-fade {
  position: absolute; left: 0; right: 0; bottom: 0; height: 170px;
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 22px;
  background: linear-gradient(rgba(242, 242, 247, 0), var(--bg) 62%);
}
.paper.open .paper-fade { display: none; }
.paper-fade button {
  font: inherit; font-size: 15px; font-weight: 700; color: var(--tint); cursor: pointer;
  border: 0; padding: 11px 20px; border-radius: 999px; background: var(--elev); box-shadow: var(--shadow-card);
}

/* ── 4. 약속 ──────────────────────────── */
.points { background: var(--elev); padding: 40px var(--gutter) 64px; display: grid; gap: 12px; }
.point { max-width: 560px; width: 100%; margin: 0 auto; padding: 20px 22px; border-radius: var(--r-lg); background: var(--bg); }
.point h3 { font-size: 19px; letter-spacing: -0.03em; }
.point p { margin-top: 4px; font-size: 15px; line-height: 1.55; color: var(--label2); }

/* ── 5. 마지막 권유 ───────────────────── */
.price { padding: 64px var(--gutter) 72px; text-align: center; }
.price .badge { margin-top: 28px; }

/* ── 아래 ─────────────────────────────── */
.foot { padding: 32px var(--gutter) max(40px, env(safe-area-inset-bottom)); border-top: 1px solid var(--sep); font-size: 12px; line-height: 1.7; color: var(--label2); }
.foot nav { display: flex; gap: 18px; margin-bottom: 14px; font-size: 14px; }
.foot nav a { text-decoration: none; color: var(--label); }
.foot p { max-width: var(--max); }

/* ── 넓은 화면 ───────────────────────── */
@media (min-width: 900px) {
  :root { --gutter: 40px; }
  .bar { padding-left: max(var(--gutter), calc((100% - var(--max)) / 2)); padding-right: max(var(--gutter), calc((100% - var(--max)) / 2)); }
  .hero {
    display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center;
    padding-left: max(var(--gutter), calc((100% - var(--max)) / 2)); padding-right: max(var(--gutter), calc((100% - var(--max)) / 2));
    padding-bottom: 96px; padding-top: 140px;
  }
  .week { margin-top: 0; justify-self: end; width: 100%; }
  .step { grid-template-columns: 1fr 1fr; align-items: center; gap: 48px; padding: 64px 0; }
  .step:nth-of-type(odd) .art { justify-self: end; }
  .step:nth-of-type(even) .step-copy { order: 2; }
  h3 { font-size: 34px; }
  .points { grid-template-columns: repeat(3, 1fr); max-width: none; padding-left: max(var(--gutter), calc((100% - var(--max)) / 2)); padding-right: max(var(--gutter), calc((100% - var(--max)) / 2)); }
  .point { max-width: none; }
  .foot { padding-left: max(var(--gutter), calc((100% - var(--max)) / 2)); padding-right: max(var(--gutter), calc((100% - var(--max)) / 2)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .memo > p, .week-line span, .days li { transition: none; }
  .rec i { animation: none; }
}

/* ── 약관·처리방침·문의(빌드가 만드는 아래 페이지) ── */
.doc { max-width: 760px; margin: 0 auto; padding: 28px var(--gutter) 64px; font-size: 16px; line-height: 1.75; }
.doc h1 { font-size: clamp(30px, 7vw, 40px); line-height: 1.2; letter-spacing: -0.04em; }
.doc-date { margin-top: 8px; font-size: 14px; color: var(--label2); }
.doc > p { margin-top: 18px; color: var(--label2); }
.doc section { margin-top: 32px; }
.doc h2 { font-size: 20px; line-height: 1.4; letter-spacing: -0.03em; }
.doc section p, .doc ul { margin-top: 10px; color: var(--label2); }
.doc ul { padding-left: 1.2em; }
.doc li + li { margin-top: 6px; }
.doc a { color: var(--tint); }
.table { margin-top: 12px; overflow-x: auto; border-radius: 14px; background: var(--elev); box-shadow: var(--shadow-card); }
.table table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 14px; line-height: 1.6; }
.table th, .table td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--sep); }
.table th { font-weight: 700; color: var(--label); background: var(--tint-faint); }
.table tr:last-child td { border-bottom: 0; }
.lead-sm { margin-top: 10px; color: var(--label2); }
.contact { margin-top: 24px; border-radius: var(--r-lg); background: var(--elev); box-shadow: var(--shadow-card); overflow: hidden; }
.contact-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px; text-decoration: none; }
.contact-row + .contact-row { border-top: 1px solid var(--sep); }
.contact-row span { color: var(--label2); font-size: 15px; }
.contact-row b { color: var(--tint); font-size: 16px; }
.faq-h { margin-top: 40px; }
.faq { margin-top: 14px; display: grid; gap: 10px; }
.faq details { border-radius: var(--r-lg); background: var(--elev); padding: 16px 18px; box-shadow: var(--shadow-card); }
.faq summary { cursor: pointer; font-weight: 700; font-size: 17px; letter-spacing: -0.02em; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--tint); font-weight: 600; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin-top: 8px; color: var(--label2); }
.sub .bar { margin-bottom: 0; }
@media (min-width: 900px) { .doc { padding-top: 48px; } }
