
:root {
  --main: #10B981;        
  --main-strong: #047857; 
  --main-dark: #065F46;   
  --main-soft: #D1FAE5;   
  --mint-line: #A7F3D0;
  --sky: #E0F2FE; --sky-ink: #0369A1; --sky-line: #BAE6FD;
  --sun: #FEF3C7; --sun-ink: #92400E; --sun-line: #FDE68A;
  --peach: #FFEDD5; --peach-ink: #C2410C; --peach-line: #FED7AA;
  --accent: #FACC15;
  --ink: #0F2A1F;
  --sub: #44564D;
  --line: #DCEBE3;
  --bg: #F0FDF4;
  --card: #FFFFFF;
  --warn: #B91C1C;
  --radius: 18px;
  --tabbar: 68px;
  --ease: cubic-bezier(.2,.8,.2,1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Noto Sans KR", "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 18px; line-height: 1.65; word-break: keep-all;
  padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom));
}
a { color: var(--main-dark); }
h1, h2, h3 { line-height: 1.35; margin: 0 0 .5em; }
h2 { font-size: 23px; }
h3 { font-size: 20px; }
p { margin: 0 0 .7em; }
main { max-width: 640px; margin: 0 auto; padding: 0 16px; outline: none; }
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: linear-gradient(90deg, #D1FAE5 0%, #ECFDF5 60%, #FEF9C3 100%);
  border-bottom: 3px solid var(--main); padding: 10px 16px;
}
.brand strong { color: var(--main-dark); }
.brand { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; min-width: 0; }
.brand strong { font-size: 19px; }
.brand span { font-size: 13px; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { flex: none; background: var(--accent); color: #422006; box-shadow: 0 2px 0 #CA8A04; font-weight: 800; font-size: 14px; padding: 5px 11px; border-radius: 999px; }
.hero {
  margin: 16px 0 6px; padding: 22px 18px 18px; border-radius: 24px; position: relative; overflow: hidden;
  background: linear-gradient(150deg, #D1FAE5 0%, #ECFDF5 45%, #E0F2FE 100%); border: 1px solid var(--mint-line);
}
.hero::after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 150px; height: 150px; border-radius: 50%;
  background: radial-gradient(circle, rgba(250,204,21,.45), rgba(250,204,21,0) 70%); pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.chip { display: inline-block; background: #fff; color: var(--main-dark); border: 1px solid var(--mint-line); font-weight: 700; font-size: 15px; padding: 4px 12px; border-radius: 999px; margin-bottom: 10px; }
.hero h1 { font-size: 29px; letter-spacing: -0.5px; }
.hero h1 em { font-style: normal; color: var(--main-strong); background: linear-gradient(transparent 62%, #FDE68A 62%); }
.hero p { color: var(--sub); }
.btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.btn {
  display: flex; align-items: center; justify-content: center; min-height: 56px; padding: 10px 14px;
  border-radius: 14px; font-size: 18px; font-weight: 800; text-decoration: none; border: 2px solid var(--main);
  background: #fff; color: var(--main-dark); cursor: pointer; font-family: inherit; text-align: center;
  transition: background-color .15s var(--ease), box-shadow .15s var(--ease), transform .12s var(--ease);
}
.btn.primary { background: var(--main-strong); border-color: var(--main-strong); color: #fff; box-shadow: 0 4px 0 #065F46; }
.btn.primary:active { box-shadow: 0 1px 0 #065F46; }
.btn:not(.primary):active { background: var(--main-soft); }
:focus-visible { outline: 3px solid #F59E0B; outline-offset: 2px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn:active { transform: scale(.98); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0 6px; }
.stat { background: var(--main-soft); border: 1px solid var(--mint-line); border-radius: var(--radius); padding: 12px 8px; text-align: center; }
.stat b { display: block; font-size: 21px; color: var(--main-dark); letter-spacing: -0.5px; line-height: 1.25; }
.stat:nth-child(2) { background: var(--sky); border-color: var(--sky-line); }
.stat:nth-child(2) b { color: var(--sky-ink); }
.stat:nth-child(3) { background: var(--sun); border-color: var(--sun-line); }
.stat:nth-child(3) b { color: var(--sun-ink); }
.stat small { display: block; font-size: 13px; color: var(--sub); line-height: 1.4; margin-top: 4px; }
.sec { margin: 18px 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 12px; box-shadow: 0 2px 10px rgba(16,185,129,.06); }
.card.soft { background: var(--main-soft); border-color: var(--mint-line); }
.card.warn { background: var(--sun); border-color: var(--sun-line); }
.sec > h2 { display: flex; align-items: center; gap: 8px; }
.sec > h2::before { content: ""; width: 6px; height: 22px; border-radius: 3px; background: linear-gradient(var(--main), #FACC15); flex: none; }
.muted { color: var(--sub); font-size: 16px; }
.src { font-size: 14px; color: var(--sub); }
.src::before { content: "출처 "; font-weight: 700; }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 12px; }
.seg button {
  min-height: 52px; border-radius: 12px; border: 2px solid var(--line); background: #fff; font-family: inherit;
  font-size: 16px; font-weight: 800; color: var(--sub); cursor: pointer; padding: 4px;
  transition: background-color .15s var(--ease), color .15s var(--ease);
}
.seg button.on { color: #fff; border-color: transparent; }
.ben h3 { display: flex; align-items: center; gap: 8px; }
.ben .pct { font-size: 14px; color: #fff; padding: 2px 9px; border-radius: 999px; }
.ben dl { margin: 0; }
.ben dt { font-weight: 800; margin-top: 12px; }
.ben dd { margin: 2px 0 0; }
.money { font-size: 26px; font-weight: 900; color: var(--main-dark); letter-spacing: -0.5px; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li { position: relative; padding: 0 0 16px 50px; counter-increment: s; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%;
  background: var(--main-strong); color: #fff; font-weight: 900; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 4px var(--main-soft);
}
.steps li:last-child::before { background: #CA8A04; box-shadow: 0 0 0 4px var(--sun); }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 17px; top: 40px; bottom: 2px; width: 2px; background: var(--mint-line); }
.steps b { display: block; }
.steps span { color: var(--sub); font-size: 16px; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.check:last-child { border-bottom: 0; }
.check input { width: 26px; height: 26px; margin: 2px 0 0; accent-color: var(--main); flex: none; }
.check b { display: block; }
.check small { color: var(--sub); font-size: 15px; }
.tag { font-size: 12px; font-weight: 800; padding: 1px 7px; border-radius: 6px; margin-left: 6px; vertical-align: 2px; }
.tag.must { background: #FDE7E5; color: var(--warn); }
.tag.opt { background: #EEF1F4; color: var(--sub); }
.bar { height: 12px; background: #E3EFE8; border-radius: 99px; overflow: hidden; margin: 6px 0 4px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--main), #FACC15); border-radius: 99px; transition: width .3s var(--ease); }
details { border-bottom: 1px solid var(--line); }
details:last-child { border-bottom: 0; }
summary { cursor: pointer; padding: 14px 30px 14px 0; font-weight: 800; list-style: none; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 4px; top: 10px; font-size: 26px; color: var(--main-strong); }
summary::before { content: "Q"; color: var(--main-strong); font-weight: 900; margin-right: 8px; }
details[open] summary::after { content: "−"; }
details p { color: var(--sub); }
.tblwrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; }
table { width: 100%; border-collapse: collapse; font-size: 16px; }
table.wide { font-size: 15px; letter-spacing: -0.3px; }
table.wide th, table.wide td { padding: 8px 3px; }
th, td { padding: 9px 6px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
thead th { background: var(--main-soft); color: var(--main-dark); font-size: 15px; }
td.hl { background: var(--sun); font-weight: 800; }
.up { color: var(--warn); font-size: 13px; display: block; font-weight: 700; }
.payday { text-align: center; padding: 22px 18px; background: linear-gradient(160deg, #ECFDF5, #FEF9C3); border-color: var(--sun-line); }
.payday .d { font-size: 48px; font-weight: 900; color: var(--main-strong); line-height: 1.1; }
.payday .date { font-size: 21px; font-weight: 800; }
.field { margin-bottom: 18px; }
.field > label, .field > .lbl { display: block; font-weight: 800; margin-bottom: 8px; }
.pick { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.pick.two { grid-template-columns: 1fr 1fr; }
.pick button {
  min-height: 54px; border: 2px solid var(--line); background: #fff; border-radius: 12px; font-family: inherit;
  font-size: 18px; font-weight: 800; color: var(--ink); cursor: pointer;
  transition: background-color .15s var(--ease), border-color .15s var(--ease);
}
.pick button.on { border-color: var(--main); background: var(--main-soft); color: var(--main-dark); box-shadow: inset 0 0 0 1px var(--main); }
.inp { display: flex; align-items: center; gap: 8px; }
.inp input, select {
  flex: 1; width: 100%; min-height: 58px; border: 2px solid var(--line); border-radius: 12px; padding: 0 14px;
  font-size: 24px; font-weight: 800; font-family: inherit; color: var(--ink); background: #fff;
}
select { font-size: 18px; }
.inp input:focus, select:focus { border-color: var(--main); outline: none; }
.inp span { font-weight: 800; font-size: 20px; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.quick button { border: 1px solid var(--sky-line); background: var(--sky); color: var(--sky-ink); font-weight: 700; border-radius: 99px; padding: 6px 12px; min-height: 40px; font-size: 15px; font-family: inherit; cursor: pointer; }
.result { border: 2px solid var(--main); background: linear-gradient(180deg, #ECFDF5 0, #fff 140px); scroll-margin-top: 80px; }
.sec { scroll-margin-top: 70px; }
.result .big { font-size: 34px; font-weight: 900; color: var(--main-dark); letter-spacing: -1px; line-height: 1.2; }
.rrow { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.rrow:last-child { border-bottom: 0; }
.rrow small { display: block; color: var(--sub); font-size: 14px; }
.ok, .no { flex: none; font-weight: 900; font-size: 15px; padding: 4px 11px; border-radius: 99px; }
.ok { background: var(--main-soft); color: var(--main-dark); }
.no { background: #EEF1F4; color: var(--sub); }
.disc { padding: 12px 0; border-bottom: 1px solid var(--line); }
.disc:last-child { border-bottom: 0; }
.disc b { display: block; }
.disc .who { display: inline-block; font-size: 13px; font-weight: 800; background: var(--sky); color: var(--sky-ink); border-radius: 6px; padding: 1px 7px; margin-bottom: 2px; }
.disc small { display: block; color: var(--sub); font-size: 15px; }
.links { display: grid; gap: 8px; }
.ext::after { content: " ↗"; }
.ad { margin: 18px 0; text-align: center; }
.ad small { display: block; font-size: 12px; color: #8A949C; margin-bottom: 4px; text-align: left; }
.foot { max-width: 640px; margin: 24px auto 0; padding: 16px; font-size: 14px; color: var(--sub); }
.foot p { margin-bottom: .6em; }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(4, 1fr);
  background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -4px 16px rgba(0,0,0,.05);
}
.tabbar a {
  height: var(--tabbar); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  text-decoration: none; color: #6B7680; font-size: 15px; font-weight: 800;
}
.tabbar svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a.on { color: var(--main-dark); }
.tabbar a.on svg { stroke-width: 2.4; background: var(--main-soft); border-radius: 12px; padding: 3px 14px; width: 26px; box-sizing: content-box; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
.back { display: inline-block; margin: 14px 0 0; font-weight: 800; text-decoration: none; }
textarea { width: 100%; min-height: 140px; border: 2px solid var(--line); border-radius: 12px; padding: 12px; font-size: 18px; font-family: inherit; }
@media (max-width: 360px) {
  body { font-size: 17px; }
  .hero h1 { font-size: 25px; }
  .stat b { font-size: 18px; }
  .seg button { font-size: 15px; }
  .pick button { font-size: 16px; }
}
.card.my { border: 2px solid var(--main); background: linear-gradient(160deg, #fff 0%, #ECFDF5 100%); margin-top: 14px; }
.my-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.my-h b { font-size: 20px; color: var(--main-dark); }
.my-h a { font-size: 15px; font-weight: 800; }
.my-g { display: grid; grid-template-columns: 1.4fr 1fr 0.9fr; gap: 8px; }
.my-g > div { background: #fff; border: 1px solid var(--mint-line); border-radius: 14px; padding: 10px 8px; text-align: center; }
.my-g small { display: block; font-size: 13px; color: var(--sub); line-height: 1.35; }
.my-g b { display: block; font-size: 19px; color: var(--main-strong); letter-spacing: -0.5px; line-height: 1.3; }
.card.share { background: var(--sky); border-color: var(--sky-line); }
.card.share b { color: var(--sky-ink); }
.sheet-bg { position: fixed; inset: 0; z-index: 50; background: rgba(15, 42, 31, .45); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 640px; background: #fff; border-radius: 24px 24px 0 0; padding: 20px 18px calc(18px + env(safe-area-inset-bottom)); display: grid; gap: 10px; }
.sheet > b { font-size: 21px; color: var(--main-dark); }
.pick.three { grid-template-columns: repeat(3, 1fr); }
.pick.three button { font-size: 15px; line-height: 1.3; padding: 6px 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button {
  min-height: 44px; padding: 6px 14px; border-radius: 999px; border: 2px solid var(--line); background: #fff;
  font-family: inherit; font-size: 16px; font-weight: 700; color: var(--ink); cursor: pointer;
}
.chips button.on { border-color: var(--main); background: var(--main-soft); color: var(--main-dark); }
.field small.muted { display: block; font-size: 14px; margin-top: 4px; }
.chg { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.chg:last-of-type { border-bottom: 0; }
.chg > span { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #422006; font-weight: 900; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.chg b { display: block; }
.chg small { display: block; color: var(--sub); font-size: 15px; }
.result .rrow span { font-size: 16px; }
.qgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.qgrid a {
  position: relative; display: flex; align-items: center; min-height: 56px; padding: 10px 12px; border-radius: 14px;
  background: #fff; border: 2px solid var(--mint-line); color: var(--main-dark); font-weight: 800; text-decoration: none; font-size: 16px; line-height: 1.3;
}
.qgrid a:active { background: var(--main-soft); }
.qgrid em { position: absolute; top: -8px; right: 8px; font-style: normal; font-size: 11px; font-weight: 900; background: #EF4444; color: #fff; padding: 1px 6px; border-radius: 99px; }
.tabbar a { font-size: 14px; }
.dl-list { display: grid; gap: 8px; }
.dl { display: flex; gap: 12px; align-items: center; background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 10px 12px; text-decoration: none; color: var(--ink); }
.dl.hot { border-color: #FCA5A5; background: #FFF5F5; }
.dl b { display: block; }
.dl small { display: block; color: var(--sub); font-size: 14px; }
.dd { flex: none; min-width: 64px; text-align: center; background: #EF4444; color: #fff; font-weight: 900; border-radius: 10px; padding: 6px 8px; font-size: 16px; }
.dl:not(.hot) .dd { background: var(--main-strong); }
.dd.sm { min-width: 0; font-size: 13px; padding: 2px 8px; border-radius: 99px; }
.dd.off { background: #E5E7EB; color: var(--sub); }
.news { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; scroll-margin-top: 80px; box-shadow: 0 2px 10px rgba(16,185,129,.06); }
.news-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.news-top .tag { background: var(--main-soft); color: var(--main-dark); font-size: 13px; padding: 2px 8px; margin: 0; }
.news-top time { font-size: 14px; color: var(--sub); }
.news h3 { font-size: 19px; margin: 4px 0 8px; }
.news-pts { list-style: none; margin: 0 0 10px; padding: 10px 12px; background: #F0FDF4; border-radius: 12px; }
.news-pts li { padding-left: 24px; position: relative; font-size: 16px; margin: 3px 0; }
.news-pts li::before { content: "✓"; position: absolute; left: 2px; color: var(--main-strong); font-weight: 900; }
.news-dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; margin: 0 0 8px; font-size: 16px; }
.news-dl dt { font-weight: 800; color: var(--sub); }
.news-dl dd { margin: 0; }
.news-f { display: flex; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding-top: 8px; }
.news-f small { color: var(--sub); font-size: 13px; }
.news-f a { flex: none; font-weight: 800; }
.prog { border: 2px solid var(--mint-line); border-radius: 14px; padding: 12px; margin-top: 8px; display: grid; gap: 6px; }
.prog-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.prog-h b { font-size: 18px; color: var(--main-dark); }
.prog-amt { font-weight: 800; }
.prog small { color: var(--sub); font-size: 14px; }
.prog .btn { min-height: 46px; font-size: 16px; }
