:root {
  --bg: #f3f1ec;
  --surface: #fbfaf7;
  --ink: #141414;
  --ink-2: #55524c;
  --ink-3: #8d8980;
  --rule: #dedad1;
  --rule-2: #c9c4b8;
  --accent: #ff5a1f;
  --accent-ink: #c2410c;
  --accent-soft: #ffe6da;
  --ok: #0f7b4f;
  --ok-soft: #dcf1e6;
  --warn-soft: #fbefcc;
  --warn: #8a5a00;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121211; --surface: #1a1a18; --ink: #f1efe9; --ink-2: #b4b0a7; --ink-3: #7d7a73;
    --rule: #2b2a27; --rule-2: #3a3935; --accent: #ff6a33; --accent-ink: #ff8a5c; --accent-soft: #3a1d10;
    --ok: #4fd39a; --ok-soft: #12301f; --warn-soft: #33290f; --warn: #f0c35b;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.6 "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  letter-spacing: -0.01em; word-break: keep-all; -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
code, .mono { font-family: ui-monospace, "SF Mono", "JetBrains Mono", Consolas, monospace; font-size: .86em; letter-spacing: 0; }
.wrap { max-width: 880px; margin: 0 auto; padding: 0 20px; }
main.wrap { padding-top: 8px; padding-bottom: 40px; min-height: 70vh; }
h1, h2 { letter-spacing: -0.035em; line-height: 1.2; }
h1 { font-size: 1.75rem; font-weight: 700; margin: 0 0 .4em; }
h2 { font-size: 1.15rem; font-weight: 700; margin: 0 0 .8em; }
.muted { color: var(--ink-3); }
.small { font-size: .85rem; }
.inline { display: inline; }

/* 헤더 */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--rule); }
.top-in { display: flex; align-items: center; justify-content: space-between; height: 58px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; letter-spacing: -0.04em; text-decoration: none; font-size: 1.02rem; }
.mark { width: 18px; height: 18px; background:
  linear-gradient(var(--accent), var(--accent)) 0 0 / 8px 8px no-repeat,
  linear-gradient(var(--ink), var(--ink)) 10px 0 / 8px 8px no-repeat,
  linear-gradient(var(--ink), var(--ink)) 0 10px / 8px 8px no-repeat,
  linear-gradient(var(--ink), var(--ink)) 10px 10px / 8px 8px no-repeat; border-radius: 2px; }
.top nav { display: flex; align-items: center; gap: 18px; font-size: .92rem; font-weight: 500; }
.top nav a { text-decoration: none; color: var(--ink-2); }
.top nav a:hover { color: var(--ink); }
.who { display: inline-flex; align-items: center; gap: 7px; }
.cr { font-variant-numeric: tabular-nums; font-size: .78rem; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: var(--ink); color: var(--bg); }
button.link { background: none; border: 0; padding: 0; font: inherit; color: var(--ink-3); cursor: pointer; }
button.link:hover { color: var(--ink); }

/* 버튼 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 46px; padding: 0 20px;
  background: var(--ink); color: var(--bg); border: 1px solid var(--ink); border-radius: var(--radius);
  font: inherit; font-weight: 650; font-size: .95rem; letter-spacing: -0.02em; text-decoration: none; cursor: pointer;
  transition: transform .12s ease, background .12s ease; }
.btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn.line { background: transparent; color: var(--ink); border-color: var(--rule-2); }
.btn.line:hover { border-color: var(--ink); background: transparent; color: var(--ink); }
.btn.sm { height: 34px; padding: 0 14px; font-size: .86rem; }
.top nav .btn.sm { color: var(--bg); }
.btn.block { width: 100%; }

.flash { margin: 16px 0 0; padding: 12px 16px; border-radius: var(--radius); background: var(--ink); color: var(--bg); font-weight: 500; font-size: .93rem; }
.flash::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 10px; vertical-align: middle; }
.error { color: var(--accent-ink); font-weight: 600; }

/* 히어로 */
.hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 48px; align-items: center; padding: 64px 0 48px; }
.badge { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 20px; padding: 6px 12px 6px 10px; border-radius: 99px; background: var(--surface); border: 1px solid var(--rule); font-size: .82rem; font-weight: 600; color: var(--ink-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.hero h1 { font-size: clamp(2.2rem, 5.6vw, 3.7rem); font-weight: 800; letter-spacing: -0.055em; line-height: 1.07; margin: 0 0 22px; }
.hero h1 em { font-style: normal; color: var(--ink-3); }
.lede { max-width: 33em; color: var(--ink-2); font-size: 1.05rem; margin: 0 0 30px; }
.fine { margin: 14px 0 0; font-size: .82rem; color: var(--ink-3); }
.row { display: flex; gap: 10px; flex-wrap: wrap; }

.preview { position: relative; }
.preview::before { content: ''; position: absolute; inset: 14% -6% -8% 10%; border-radius: 28px; background: repeating-linear-gradient(-45deg, var(--rule) 0 1px, transparent 1px 9px); z-index: 0; }
.pv-card { position: relative; z-index: 1; background: var(--surface); border: 1px solid var(--rule); border-radius: 20px; padding: 22px; box-shadow: 0 1px 0 var(--rule), 0 24px 48px -24px rgba(20, 20, 20, .25); transform: rotate(-1.2deg); }
.pv-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.pv-head > div { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.pv-head span:not(.icon):not(.tag) { font: .75rem ui-monospace, Consolas, monospace; color: var(--ink-3); }
.pv-label { display: flex; justify-content: space-between; font-size: .8rem; color: var(--ink-3); margin: 14px 0 8px; }
.pv-label b { color: var(--ink); font-variant-numeric: tabular-nums; }
.ticks.big { gap: 4px; }
.ticks.big i { flex: 1; height: 28px; border-radius: 4px; }
.days.mini { gap: 5px; }
.days.mini i { font-size: .7rem; border-radius: 7px; }
.days i.today { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.pv-cap { position: relative; z-index: 1; margin: 12px 4px 0; text-align: right; font-size: .72rem; color: var(--ink-3); }

.stats-band { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; }
.stats div { padding: 18px 0; }
.stats div + div { padding-left: 20px; border-left: 1px solid var(--rule); }
.stats dt { font-size: .8rem; color: var(--ink-3); font-weight: 500; }
.stats dd { margin: 2px 0 0; font-size: 2rem; font-weight: 750; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.stats dd small { font-size: 1rem; font-weight: 600; margin-left: 2px; color: var(--ink-2); }

.sec-title { font-size: 1.35rem; font-weight: 750; letter-spacing: -0.04em; margin: 0 0 20px; }

/* 이용 방법 */
.how { padding: 56px 0 8px; }
.how ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.how li { background: var(--surface); border: 1px solid var(--rule); border-radius: 16px; padding: 22px; }
.how li span { display: block; font: 600 .78rem/1 ui-monospace, Consolas, monospace; color: var(--accent-ink); margin-bottom: 14px; }
.how li b { font-size: 1.05rem; letter-spacing: -0.03em; }
.how li p { margin: 6px 0 0; color: var(--ink-2); font-size: .9rem; }

section[id] { scroll-margin-top: 72px; }

/* 이용 흐름 */
.flow { padding-top: 64px; }
.flow-head { max-width: 40em; margin-bottom: 24px; }
.flow-head .sec-title { margin-bottom: 6px; }
.flow-head p { margin: 0; font-size: .95rem; }
.flow-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.flow-col { background: var(--surface); border: 1px solid var(--rule); border-radius: 20px; padding: 24px 22px 8px; }
.flow-col-head { padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--rule); }
.flow-col-head h3 { margin: 0 0 2px; font-size: 1.1rem; letter-spacing: -0.035em; display: flex; align-items: center; gap: 8px; }
.flow-col-head h3::before { content: ''; width: 10px; height: 10px; border-radius: 3px; background: var(--ink); }
.flow-col.tester .flow-col-head h3::before { background: var(--accent); }
.flow-col-head p { margin: 0; color: var(--ink-2); font-size: .9rem; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 14px; position: relative; padding-bottom: 20px; }
.timeline li:not(:last-child)::before { content: ''; position: absolute; left: 14px; top: 32px; bottom: 4px; width: 2px; background: var(--rule); border-radius: 1px; }
.tl-num { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: .82rem; font-weight: 750; background: var(--ink); color: var(--bg); font-variant-numeric: tabular-nums; }
.flow-col.tester .tl-num { background: var(--accent); color: #fff; }
.tl-body b { display: block; font-size: .98rem; letter-spacing: -0.03em; margin: 4px 0 2px; }
.tl-body p { margin: 0; color: var(--ink-2); font-size: .88rem; line-height: 1.55; }
.tl-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.where { font-size: .72rem; font-weight: 650; padding: 1px 8px; border-radius: 99px; background: var(--bg); border: 1px solid var(--rule-2); color: var(--ink-2); }
.when { font: 600 .72rem ui-monospace, Consolas, monospace; color: var(--accent-ink); }
.flow-foot { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 20px; }

/* 목록 */
#list { padding-top: 56px; }
#list .sec-title { margin: 0; }
.sec-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.sec-head h2 { margin: 0; }
.count { font-variant-numeric: tabular-nums; color: var(--ink-3); font-weight: 600; }
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.rows li { border-bottom: 1px solid var(--rule); }
.row-link { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 18px 4px; text-decoration: none; transition: background .12s; }
.row-link:hover { background: var(--surface); }
.row-link:hover .row-title { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.row-main { display: flex; flex-direction: column; min-width: 0; }
.row-title { font-weight: 700; letter-spacing: -0.03em; display: flex; align-items: center; gap: 8px; }
.row-sub { color: var(--ink-2); font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.num { font-variant-numeric: tabular-nums; font-size: .85rem; color: var(--ink-3); }
.num b { color: var(--ink); }
.chip { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: 0; padding: 1px 8px; border-radius: 99px; border: 1px solid var(--rule-2); color: var(--ink-2); white-space: nowrap; }
.empty { padding: 40px 0; text-align: center; color: var(--ink-2); border-bottom: 1px solid var(--rule); }

.icon { --h: 20; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0;
  background: hsl(var(--h) 70% 88%); color: hsl(var(--h) 55% 28%); font-weight: 800; font-size: 1.05rem; }
@media (prefers-color-scheme: dark) { .icon { background: hsl(var(--h) 35% 22%); color: hsl(var(--h) 80% 80%); } }
.icon.xl { width: 72px; height: 72px; border-radius: 18px; font-size: 1.7rem; }

/* 테스터 칸 */
.ticks { display: flex; gap: 3px; }
.ticks i { width: 7px; height: 16px; border-radius: 2px; background: var(--rule); }
.ticks i.on { background: var(--ink); }
.ticks i.line { margin-right: 5px; position: relative; }
.ticks i.line::after { content: ""; position: absolute; right: -5px; top: -3px; bottom: -3px; width: 2px; border-radius: 1px; background: var(--accent); }

/* 앱 상세 */
.back { display: inline-block; margin: 24px 0 20px; color: var(--ink-3); text-decoration: none; font-size: .9rem; }
.back:hover { color: var(--ink); }
.app-hero { display: flex; gap: 18px; align-items: center; }
.app-hero h1 { margin: 0 0 4px; font-size: clamp(1.6rem, 4.5vw, 2.2rem); font-weight: 800; letter-spacing: -0.045em; }
.meta { margin: 0; color: var(--ink-3); font-size: .88rem; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.summary { font-size: 1.08rem; color: var(--ink-2); margin: 22px 0; max-width: 40em; }
.progress { padding: 18px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin-bottom: 28px; }
.progress .ticks i { width: 14px; height: 26px; border-radius: 3px; }
.progress .ticks { gap: 4px; flex-wrap: wrap; }
.progress p { margin: 10px 0 0; font-size: .92rem; }
.progress p b { font-size: 1.1rem; font-variant-numeric: tabular-nums; }

.panel, .card { background: var(--surface); border: 1px solid var(--rule); border-radius: 16px; padding: 24px; margin-bottom: 16px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.panel-head h2 { margin: 0; }
.note { margin: 14px 0 0; font-size: .85rem; color: var(--ink-3); }
.steps { margin: 0 0 18px; padding: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; padding: 10px 0 10px 36px; position: relative; border-bottom: 1px dashed var(--rule); }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 10px; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--bg); font-size: .78rem; font-weight: 700; display: grid; place-items: center; }
.steps a { color: var(--accent-ink); font-weight: 600; }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 10px; }
.days i { font-style: normal; aspect-ratio: 1; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--rule); font-size: .8rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.days i.on { background: var(--ink); border-color: var(--ink); color: var(--bg); font-weight: 700; }

.tag { display: inline-block; font-size: .74rem; font-weight: 700; padding: 2px 9px; border-radius: 99px; background: var(--rule); color: var(--ink-2); white-space: nowrap; }
.tag.applied { background: var(--warn-soft); color: var(--warn); }
.tag.added { background: var(--accent-soft); color: var(--accent-ink); }
.tag.active, .tag.completed { background: var(--ok-soft); color: var(--ok); }

.table-wrap { overflow-x: auto; margin-top: 16px; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: left; font-weight: 600; font-size: .78rem; color: var(--ink-3); padding: 0 8px 8px; border-bottom: 1px solid var(--ink); }
td { padding: 11px 8px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
th.r, td.r { text-align: right; }
td .link { margin-left: 6px; color: var(--accent-ink); font-weight: 600; font-size: .85rem; }
textarea.copy { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; margin: 4px 0 12px; }

/* 폼 */
.narrow { max-width: 460px; margin: 40px auto 0; }
.stack { display: flex; flex-direction: column; gap: 16px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: .86rem; font-weight: 600; color: var(--ink-2); }
label.check, label.radio { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 500; color: var(--ink-2); line-height: 1.5; }
input, select, textarea { width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: var(--bg); border: 1px solid var(--rule-2); border-radius: var(--radius); padding: 11px 13px; transition: border-color .12s, box-shadow .12s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type=radio], input[type=checkbox] { width: 18px; height: 18px; margin: 2px 0 0; flex-shrink: 0; accent-color: var(--accent); }
fieldset { border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px 16px 16px; margin: 0; display: flex; flex-direction: column; gap: 12px; }
legend { font-size: .86rem; font-weight: 600; color: var(--ink-2); padding: 0 6px; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: 10px 0; border-bottom: 1px solid var(--rule); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.list li:last-child { border-bottom: 0; }
.list a { font-weight: 600; text-decoration: none; }
.list a:hover { text-decoration: underline; }
.card h1 { font-size: 1.5rem; }
main > h1 { margin-top: 32px; }

/* 질문 */
.faq { padding-top: 64px; max-width: 720px; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq details:first-of-type { border-top: 1px solid var(--ink); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 36px 18px 0; font-weight: 650; letter-spacing: -0.02em; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 1.3rem; font-weight: 400; color: var(--ink-3); transition: transform .15s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { margin: -4px 0 18px; color: var(--ink-2); font-size: .95rem; }

/* 마지막 권유 */
.cta { margin-top: 72px; padding: 48px 32px; border-radius: 24px; background: var(--ink); color: var(--bg); text-align: center; }
.cta h2 { font-size: clamp(1.5rem, 4vw, 2.1rem); font-weight: 800; letter-spacing: -0.045em; margin: 0 0 8px; }
.cta p { margin: 0 0 24px; opacity: .7; }
.btn.invert { background: var(--bg); color: var(--ink); border-color: var(--bg); }
.btn.invert:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.lg { height: 52px; padding: 0 24px; font-size: 1rem; }

/* 가입·로그인 */
.auth { display: grid; place-items: center; padding: 48px 0 24px; }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--rule); border-radius: 20px; padding: 32px 28px; }
.auth-card h1 { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.045em; margin: 0 0 6px; }
.auth-card > .muted { margin: 0 0 24px; font-size: .92rem; }
.auth-card .error { margin: 0 0 14px; }
.btn.google { background: var(--bg); color: var(--ink); border-color: var(--rule-2); gap: 10px; }
.btn.google:hover { background: var(--bg); color: var(--ink); border-color: var(--ink); }
.divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--ink-3); font-size: .8rem; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--rule); }
.center { text-align: center; }
.link-strong { font-weight: 650; color: var(--ink); }
.auth-card .stack + p { margin-top: 20px; }

/* 푸터 */
.foot { border-top: 1px solid var(--rule); margin-top: 40px; }
.foot-in { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 22px; padding-bottom: 40px; font-size: .8rem; color: var(--ink-3); }

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .hero { grid-template-columns: 1fr; gap: 36px; padding: 36px 0 32px; }
  .pv-card { transform: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats div:nth-child(3) { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); }
  .stats div:nth-child(4) { border-top: 1px solid var(--rule); }
  .cta { padding: 36px 20px; }
  .auth-card { padding: 24px 18px; }
  .how ol { grid-template-columns: 1fr; gap: 10px; }
  .flow-cols { grid-template-columns: 1fr; }
  .flow-col { padding: 20px 16px 4px; }
  .nav-guide { display: none; }
  .stats dd { font-size: 1.6rem; }
  .row-link { grid-template-columns: auto minmax(0, 1fr); gap: 12px; }
  .row-side { grid-column: 2; flex-direction: row; align-items: center; justify-content: space-between; }
  .top nav { gap: 12px; }
  .panel, .card { padding: 18px; }
}
