:root {
  --bg: #f7f8fa; --surface: #fff; --text: #202724; --muted: #5f6b65; --border: #e3e8e5;
  --accent: #10b981; --accent-dark: #087e59; --accent-soft: #e8f5ee;
  --info: #1d4ed8; --info-soft: #dbeafe; --warn: #b45309; --warn-soft: #fef3c7; --danger: #dc2626; --danger-soft: #fee2e2;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --font: Manrope, "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, "Cascadia Code", Menlo, monospace;
}
* { box-sizing: border-box; margin: 0 }
html { background: var(--bg); scroll-behavior: smooth; scrollbar-gutter: stable; scrollbar-color: #cdd5d0 var(--bg) }
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; word-break: keep-all }
main { flex: 1 }
body > .wrap { width: 100% }
a { color: inherit; text-decoration: none }
.link { color: var(--accent-dark); font-weight: 700; text-decoration: underline; text-underline-offset: 3px }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px }
.page { padding-top: 56px; padding-bottom: 96px }
.narrow { max-width: 608px }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap }
.row-l { display: flex; gap: 8px; flex-wrap: wrap; align-items: center }
.inline { display: inline }
.muted { color: var(--muted) }

/* nav */
.nav { position: sticky; top: 0; z-index: 10; background: rgb(247 248 250 / .82); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border) }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -.03em }
.logo i { color: var(--accent); font-style: normal }
.mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--text); color: #fff; font-size: 15px }
img.mark { display: block; background: none; object-fit: cover }
.nav nav { display: flex; align-items: center; gap: 20px; font-size: 14px; font-weight: 600 }
.nav nav .me { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--accent-dark) }

/* button */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--text); color: #fff; border: 0; border-radius: 10px; padding: 10px 17px; font: 600 14px var(--font); cursor: pointer; transition: transform .3s var(--ease) }
.btn:hover { transform: translateY(-1px) }
.btn.lg { padding: 15px 26px; font-size: 16px; border-radius: 13px }
.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 8px }
.btn.ghost { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--border) }

/* type */
.eyebrow { color: var(--accent-dark); font-weight: 700; font-size: 14px; margin-bottom: 14px; overflow-wrap: anywhere }
.display { font-size: clamp(44px, 8vw, 86px); font-weight: 800; letter-spacing: -.045em; line-height: 1.04 }
.display2 { font-size: clamp(36px, 6vw, 60px); font-weight: 800; letter-spacing: -.045em; line-height: 1.08; margin-bottom: 40px }
.title { font-size: clamp(32px, 5vw, 48px); font-weight: 800; letter-spacing: -.04em; line-height: 1.12; margin-bottom: 12px }
.sub { font-size: 20px; font-weight: 800; letter-spacing: -.02em; margin: 40px 0 14px }
.row .sub { margin: 0 }
.lead { font-size: clamp(17px, 2vw, 20px); color: var(--muted); max-width: 520px; margin: 28px 0 36px }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 24px }
.msg { background: var(--text); color: #fff; padding: 12px 18px; border-radius: 12px; margin-top: 16px; font-weight: 600; font-size: 14px }
.warn { background: var(--warn-soft); color: var(--warn); padding: 12px 16px; border-radius: 12px; font-size: 14px; font-weight: 600 }
.empty { padding: 48px 24px; text-align: center; color: var(--muted); border: 1px dashed var(--border); border-radius: 20px }

/* hero */
.hero { position: relative; overflow: hidden; padding: 110px 0 150px }
.hero-in { position: relative; display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center }
.pool { position: absolute; border-radius: 50%; pointer-events: none; animation: drift 18s ease-in-out infinite alternate }
.p1 { width: 1000px; height: 780px; left: calc(50% - 150px); top: -80px; background: radial-gradient(closest-side, rgb(221 241 234 / .95), transparent 72%) }
.p2 { width: 820px; height: 680px; left: -260px; bottom: -120px; background: radial-gradient(closest-side, rgb(219 232 252 / .75), transparent 72%); animation-delay: -6s }
.p3 { width: 700px; height: 600px; right: -200px; top: -160px; background: radial-gradient(closest-side, rgb(255 219 222 / .7), transparent 72%); animation-delay: -12s }
@keyframes drift { to { transform: translate(40px, -30px) scale(1.06) } }
.dots { position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(rgb(32 39 36 / .055) 1.3px, transparent 1.5px); background-size: 34px 34px; mask-image: radial-gradient(60% 60% at 50% 45%, #000 20%, transparent) }
.orbits { position: absolute; pointer-events: none; border-radius: 50% }
.orbits i { position: absolute; inset: 0; border: 1px solid rgb(160 190 175 / .34); border-radius: 50% }
.orbits i:nth-child(2) { inset: 70px } .orbits i:nth-child(3) { inset: 140px } .orbits i:nth-child(4) { inset: 210px }
.o-hero { width: 1180px; height: 1180px; left: calc(50% - 70px); top: -170px; opacity: .7; animation: orbit 32s ease-in-out infinite; mask-image: linear-gradient(transparent 10%, #000 45%) }
@keyframes orbit { 0%, 100% { transform: rotate(-18deg) scale(1) } 50% { transform: rotate(-8deg) scale(1.06) } }
.o-final { width: 800px; height: 800px; top: -220px; left: calc(50% - 400px); animation: spin 90s linear infinite }
.o-final i:nth-child(2) { border-style: dashed }
@keyframes spin { to { transform: rotate(360deg) } }
.cta { display: flex; gap: 12px; flex-wrap: wrap }
.live { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 10px; vertical-align: 1px; animation: pulse 2s ease-out infinite }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgb(16 185 129 / .45) } 100% { box-shadow: 0 0 0 10px rgb(16 185 129 / 0) } }
.cue { position: absolute; left: 50%; bottom: 36px; width: 24px; height: 38px; margin-left: -12px; border: 1.5px solid #b9c4be; border-radius: 12px }
.cue i { position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: #9aa69f; animation: cue 1.8s var(--ease) infinite }
@keyframes cue { 0% { opacity: 0; transform: translateY(-3px) } 30% { opacity: 1 } 100% { opacity: 0; transform: translateY(12px) } }

.mock { position: relative }
.mock .card { padding: 28px; box-shadow: 0 30px 60px -30px rgb(32 39 36 / .25) }
.mock-top { display: flex; align-items: center; gap: 12px; margin-bottom: 24px }
.mock-top small { display: block; color: var(--muted); font: 13px var(--mono) }
.mock-top .tag { margin-left: auto }
.big { font-size: 64px; font-weight: 800; letter-spacing: -.05em; line-height: 1 }
.big small { font-size: 22px; color: var(--muted); letter-spacing: -.02em }
.days { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; list-style: none; padding: 0; margin: 20px 0 10px }
.days > * { height: 22px; border-radius: 5px; background: var(--border) }
.days > .on { background: var(--accent) }
.days li.on { transition: background-color .25s calc(var(--i) * 70ms + .9s) }
.toast { position: absolute; right: -12px; bottom: -28px; padding: 12px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 20px 40px -20px rgb(32 39 36 / .3); font-weight: 700; font-size: 14px; color: var(--accent-dark); will-change: transform; transition: opacity .6s var(--ease) 1.9s, transform .8s var(--ease) 1.9s }
.in .toast { animation: float 4s ease-in-out 2.7s infinite alternate }
@keyframes float { to { transform: translateY(-10px) } }

/* motion: [data-beat]에 .in이 붙기 전엔 숨김 (JS 없으면 그대로 노출) */
.accent { color: var(--accent-dark) }
.ln { display: block; overflow: hidden; padding: .08em .06em .16em; margin: -.08em -.06em -.16em }
.ln > span { display: inline-block; transition: transform 1s var(--ease) calc(var(--i, 0) * 90ms) }
.rise { transition: opacity .8s var(--ease) calc(var(--i, 0) * 80ms + var(--d, 0ms)), transform .9s var(--ease) calc(var(--i, 0) * 80ms + var(--d, 0ms)) }
.js [data-beat]:not(.in) .ln > span { transform: translateY(115%) }
.js [data-beat]:not(.in) .rise { opacity: 0; transform: translateY(28px) }
.js [data-beat]:not(.in) .toast { opacity: 0; transform: translateY(16px) scale(.94) }
.js [data-beat]:not(.in) .days li.on { background: var(--border) }
.js [data-beat]:not(.in) .progress i { animation-play-state: paused }
.progress i { animation: grow 1.3s var(--ease) .5s both }
@keyframes grow { from { width: 0 } }
.grid > .app { animation: up .7s var(--ease) calc(var(--i, 0) * 60ms) both }
@keyframes up { from { opacity: 0; transform: translateY(20px) } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important }
}

/* sections */
.block { padding-top: 100px }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px }
.stats b { font-size: 48px; font-weight: 800; letter-spacing: -.05em }
.stats h3 { font-size: 19px; letter-spacing: -.02em }
.stats p, .steps p { color: var(--muted); margin-top: 8px }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; list-style: none; padding: 0 }
.steps span { color: var(--accent); font-weight: 800; font-size: 14px }
.steps h3 { font-size: 20px; letter-spacing: -.02em; margin-top: 28px }
.points, .rules { max-width: 560px; padding: 8px 24px; margin-bottom: 16px }
.points div, .rules div { display: flex; justify-content: space-between; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--border) }
.points div:last-child, .rules div:last-of-type { border: 0 }
.points b, .rules b { font-weight: 800 }
.rules small { display: block; padding-bottom: 14px }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px }
.split .points { max-width: none; margin: 0; padding-top: 22px }
.split .eyebrow { margin: 0 }
.eyebrow.minus { color: var(--muted) }
.plus { color: var(--accent-dark) }
.final { position: relative; overflow: hidden; text-align: center; padding: 120px 16px; margin-top: 100px; background: radial-gradient(60% 80% at 50% 100%, var(--accent-soft), transparent) }
.final .display2 { margin-bottom: 32px }
.final > :not(.orbits) { position: relative }
footer { border-top: 1px solid var(--border); padding: 32px 0; color: var(--muted); font-size: 14px }

/* apps */
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 32px }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px }
.grid.one { grid-template-columns: 1fr }
.app { display: flex; flex-direction: column; transition: transform .3s var(--ease), box-shadow .3s var(--ease) }
.app:hover { transform: translateY(-3px); box-shadow: 0 20px 40px -24px rgb(32 39 36 / .3) }
.app h3 { font-size: 18px; letter-spacing: -.02em; margin-top: 16px }
.app .desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden }
.pkg { color: var(--muted); font: 13px var(--mono); overflow-wrap: anywhere }
.desc { color: var(--muted); margin-top: 10px; white-space: pre-line; flex: 1 }
.meta { font-size: 13px; color: var(--muted); margin-bottom: 4px }
.reward { font-weight: 800; color: var(--accent-dark); font-size: 14px }
.icon { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 12px; background: var(--accent-soft); color: var(--accent-dark); font-weight: 800; font-size: 18px }
.icon { overflow: hidden }
.icon img { width: 100%; height: 100%; object-fit: cover }
.iconform input { flex: 1; min-width: 0; padding: 8px 10px; font-size: 13px }
.icon.lg { width: 72px; height: 72px; border-radius: 18px; font-size: 30px }
.progress { height: 8px; border-radius: 99px; background: var(--border); overflow: hidden; margin: 16px 0 6px }
.progress i { display: block; height: 100%; background: var(--accent); border-radius: inherit }
.tag { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--border); color: var(--muted); white-space: nowrap }
.tag.added { background: var(--info-soft); color: var(--info) }
.tag.installed { background: var(--warn-soft); color: var(--warn) }
.tag.done { background: var(--accent-soft); color: var(--accent-dark) }
.tag.rejected { background: var(--danger-soft); color: var(--danger) }

.detail { display: flex; gap: 20px; align-items: center; margin: 24px 0 8px }
.detail > div:last-child { min-width: 0 }
.detail .title { margin: 0; overflow-wrap: anywhere }
.stat { margin-top: 24px; padding-top: 8px }
.panel { margin-top: 24px; display: grid; gap: 16px }
.panel > .btn { justify-self: start }
.steps2 { display: grid; gap: 10px }
.feed { display: grid; gap: 8px }
.note { font-size: 12px; line-height: 1.5 }
.fb { display: grid; gap: 14px }
.fb .who.num { align-items: center; font-weight: 500; white-space: pre-line }
.fb .who.num + .who.num { border-top: 1px solid var(--border); padding-top: 14px }
.fb small { display: block }
.fbact { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; white-space: nowrap }
.fbact:empty { display: none }
.admin-link { margin-left: 8px }
.foot { display: flex; align-items: flex-end; gap: 12px }
.foot small { flex: 1; font-size: 12px; line-height: 1.5 }
.foot form { margin-left: auto }
.steps2 form { display: block }
.optin { display: grid; gap: 6px }
.optin small { font-size: 13px }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 32px }
.list { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; overflow: hidden }
.item { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--border); min-height: 64px }
.item:first-child { border-top: 0 }
.who { flex: 1; min-width: 0; font-weight: 600 }
.who.num { display: flex; align-items: center; gap: 12px }
.who.num > div { flex: 1; min-width: 0; overflow-wrap: anywhere }
.no { display: grid; place-items: center; flex: none; min-width: 34px; height: 34px; padding: 0 6px; border-radius: 10px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--border); font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums }
.who small { display: block; color: var(--muted); font-size: 13px; font-weight: 500; overflow-wrap: anywhere }
.acts { display: flex; gap: 6px }
.streak { display: flex; align-items: baseline; gap: 6px }
.streak b { font-size: 48px; font-weight: 800; letter-spacing: -.05em; line-height: 1 }
.streak span { color: var(--muted); font-weight: 700 }
.panel .days { margin: 0 }
.btn.block, .block form, form.block { width: 100% }
.dock form { display: block; width: 100% }
.dock .btn { width: 100% }

/* checkin */
.checkin { display: grid; gap: 18px; max-width: 560px }
.checkin small { display: block }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; font-size: 13px; font-weight: 600 }
.cal span { display: grid; place-content: center; aspect-ratio: 1; border-radius: 10px; background: var(--bg); line-height: 1.2 }
.cal em { font-style: normal; font-size: 10px; font-weight: 700; color: var(--accent-dark) }
.cal .bonus:not(.on) { background: var(--accent-soft) }
.cal .on em { color: #fff }
.cal span:empty { background: none }
.cal .w { aspect-ratio: auto; background: none; color: var(--muted); font-size: 12px }
.cal .on { background: var(--accent); color: #fff }
.cal .today { box-shadow: inset 0 0 0 2px var(--accent) }
.cal .future { color: #b7c0bb }

/* consent, legal */
.consent { gap: 12px }
.check { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; font-size: 15px; cursor: pointer }
.check input { width: 20px; height: 20px; flex: none; accent-color: var(--accent) }
.check span { flex: 1 }
.check.all { font-weight: 800 }
.share { display: grid; gap: 8px; padding: 16px 18px; font-size: 14px }
.share div { display: flex; gap: 12px }
.share span { flex: none; width: 64px; color: var(--muted) }
.legal h2 { font-size: 17px; font-weight: 800; margin: 32px 0 8px }
.legal p, .legal li { color: var(--muted); font-size: 15px }
.legal ol { padding-left: 20px; display: grid; gap: 4px }
.ltable { width: 100%; border-collapse: collapse; font-size: 14px; margin: 8px 0 }
.ltable th, .ltable td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top }
.ltable th { background: var(--surface) }
footer .row-l { gap: 16px }

.leave { margin-top: 40px; display: flex; justify-content: flex-end }
.btn.danger { background: var(--danger) }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0 }
.ask { margin-top: 6px; font-weight: 400; white-space: pre-line }

/* form */
.form { display: grid; gap: 20px; margin-top: 32px }
.form > .btn { justify-self: start }
label { display: grid; gap: 8px; font-weight: 700; font-size: 14px }
label small { font-weight: 500; color: var(--muted) }
input, textarea { width: 100%; font: 16px var(--font); padding: 13px 15px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text) }
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px }
textarea { resize: vertical }
input[type=file] { padding: 8px; font-size: 14px; color: var(--muted); cursor: pointer }
input[type=file]::file-selector-button { font: 600 13px var(--font); padding: 8px 14px; margin-right: 12px; border: 0; border-radius: 8px; background: var(--bg); color: var(--text); box-shadow: inset 0 0 0 1px var(--border); cursor: pointer }
input[type=file]:hover::file-selector-button { background: var(--accent-soft); color: var(--accent-dark) }
.dev { display: flex; gap: 8px; margin-top: 24px }

@media (max-width: 860px) {
  .hero { padding: 64px 0 100px }
  .hero-in, .cols, .split { grid-template-columns: 1fr }
  .stats, .steps { grid-template-columns: 1fr 1fr }
  .mock .toast { right: 8px }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px }
  .page { padding-top: 40px; padding-bottom: 72px }
  .block { padding-top: 72px }
  .stats, .steps { grid-template-columns: 1fr }
  .item { flex-wrap: wrap; padding: 14px 16px }
  .item .acts { width: 100%; justify-content: flex-end }
}

/* 모바일: 하단 탭, 행동 버튼은 엄지 닿는 아래쪽에 고정 */
.tabbar { display: none }
@media (max-width: 760px) {
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)) }
  .nav nav { display: none }
  .tabbar { display: grid; grid-template-columns: repeat(3, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; height: calc(64px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: rgb(255 255 255 / .92); backdrop-filter: blur(14px); border-top: 1px solid var(--border) }
  .tabbar a { display: grid; place-content: center; justify-items: center; gap: 2px; font-size: 12px; font-weight: 700; color: var(--muted) }
  .tabbar b { font-size: 20px; line-height: 1; color: var(--text) }
  .dock { position: sticky; bottom: calc(72px + env(safe-area-inset-bottom)); z-index: 5 }
  .btn { min-height: 44px }
  .btn.sm { min-height: 36px; padding: 8px 14px }
  .cue { display: none }
}
