/* 연말정산 계산기 - 하늘색 소프트 테마 (운영자 샘플: 하늘 그라데이션 + 진한 파랑 + 금색 동전 + 부드러운 입체감) */
:root {
  --primary: #2563EB; --primary-2: #1D4ED8; --accent: #2563EB; --accent-dark: #1E40AF; --accent-bg: #E6F1FF; --hero-bg: linear-gradient(160deg, #E3F0FF 0%, #BFDCFF 100%); --ink: #10294D; --mint: #5AA2F2; --mint-dark: #3B82F6; --yellow: #F7C13A; --peach: #F9DE8B; --link: #1D4ED8; --sky: #5AA2F2; --gold: #F7C13A; --leaf: #3CC4A0;
  --refund: #047857; --refund-bg: #ECFDF5; --pay: #C2410C; --pay-bg: #FFF7ED; --warn: #B45309; --bad: #B91C1C;
  --bg: #F4F9FF; --card: #FFFFFF; --line: #E2E8F0; --text: #020617; --sub: #475569; --muted-bg: #F1F5F9;
  --r-card: 14px; --r-btn: 12px; --fs: 17px;
  --tab-h: 64px; --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: "Noto Sans KR", system-ui, -apple-system, sans-serif; font-size: var(--fs); line-height: 1.6; color: var(--text); background: var(--bg); font-variant-numeric: tabular-nums; padding-bottom: calc(var(--tab-h) + var(--safe-b) + 8px); }
body.big { --fs: 20px; }
a { color: var(--link); }
h1, h2, h3 { line-height: 1.35; margin: 0 0 .5em; }
h2 { font-size: 1.25em; } h3 { font-size: 1.06em; }
p { margin: 0 0 .7em; }
small, .muted { color: var(--sub); }
.muted { font-size: .88em; }
:focus-visible { outline: 3px solid #34C29A; outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* 상단 */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px; padding: 10px 16px; background: var(--primary); color: #fff; }
.brand { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; margin-right: auto; }
.brand strong { font-size: 17px; }
.logo { width: 28px; height: 28px; flex: none; }
.badge { font-size: 12px; color: var(--ink); border: 1px solid var(--yellow); background: var(--yellow); border-radius: 99px; padding: 3px 9px; white-space: nowrap; }
.bigbtn { font: inherit; font-size: 14px; font-weight: 700; color: #fff; background: transparent; border: 1px solid #6B6B6B; border-radius: 8px; min-width: 44px; min-height: 36px; cursor: pointer; }
.bigbtn[aria-pressed="true"] { background: var(--mint); color: var(--ink); border-color: var(--mint); }

main { max-width: 640px; margin: 0 auto; outline: none; }

/* 히어로 */
.hero { background: var(--hero-bg); color: var(--ink); padding: 14px 20px 22px; }
.hero h1 { font-size: 1.62em; margin: 10px 0 6px; }
.hero p { color: #134E4A; font-size: .92em; margin: 0; }
.chip { display: inline-block; background: var(--yellow); color: var(--ink); font-weight: 700; font-size: 13px; padding: 4px 11px; border-radius: 99px; }
.trust { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.trust span { font-size: 12.5px; color: var(--ink); background: #fff; border: 1px solid #fff; padding: 3px 9px; border-radius: 6px; }
.hero .btns { display: flex; gap: 8px; margin-top: 16px; }
.hero .btn.ghost { color: var(--ink); border-color: #fff; background: #fff; }

/* 숫자 카드 */
.nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 14px 14px 2px; }
.num { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 12px 6px; text-align: center; }
.num b { display: block; font-size: 1.3em; color: var(--primary); line-height: 1.2; }
.num small { display: block; font-size: 12.5px; line-height: 1.35; margin-top: 4px; }
.num.warn b { color: var(--pay); }

/* 카드·섹션 */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); margin: 12px 14px; padding: 18px 16px; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.sec-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.page-head { padding: 18px 18px 4px; }
.page-head h1 { font-size: 1.4em; margin: 0 0 4px; }
.page-head p { color: var(--sub); font-size: .92em; margin: 0; }

/* 버튼 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 50px; padding: 0 16px; border-radius: var(--r-btn); border: 1.5px solid var(--line); background: #fff; color: var(--primary); font: inherit; font-weight: 700; font-size: .95em; text-decoration: none; cursor: pointer; transition: background .2s, border-color .2s; flex: 1; }
.btn:hover { border-color: #94A3B8; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-dark); }
.btn.block { display: flex; width: 100%; }
.btn.small { min-height: 40px; font-size: .85em; flex: none; padding: 0 12px; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }
.link-btn { background: none; border: 0; color: var(--accent); font: inherit; font-size: .88em; text-decoration: underline; cursor: pointer; padding: 4px 0; min-height: 32px; }

/* 폼 */
.field { margin: 0 0 14px; }
.field label, .lab { display: block; font-weight: 700; font-size: .92em; margin-bottom: 6px; }
.field .hint { display: block; font-size: .8em; color: var(--sub); margin-top: 4px; }
.inp { position: relative; }
.inp input { width: 100%; height: 52px; border: 1.5px solid #CBD5E1; border-radius: var(--r-btn); padding: 0 52px 0 14px; font: inherit; font-size: 1.06em; font-weight: 700; text-align: right; background: #fff; color: var(--text); }
.inp input:focus { border-color: var(--mint-dark); outline: none; box-shadow: 0 0 0 3px #BDF3E2; }
.inp .unit { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--sub); font-size: .9em; pointer-events: none; }
.read { font-size: 12.5px; color: var(--sub); text-align: right; min-height: 1.2em; margin-top: 2px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { min-height: 44px; min-width: 52px; padding: 0 14px; border-radius: 10px; border: 1.5px solid #CBD5E1; background: #fff; font: inherit; font-size: .92em; font-weight: 700; color: var(--primary); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); cursor: pointer; }
.check:first-of-type { border-top: 0; }
.check input { width: 22px; height: 22px; margin-top: 3px; accent-color: var(--mint-dark); flex: none; }
.check b { display: block; font-size: .95em; }
.check small { display: block; font-size: .82em; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
details.more { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }
details.more > summary { cursor: pointer; font-weight: 700; color: var(--accent); min-height: 44px; display: flex; align-items: center; list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after { content: "+"; margin-left: auto; font-size: 1.3em; }
details.more[open] > summary::after { content: "−"; }
.group-t { font-weight: 700; font-size: .88em; color: var(--accent-dark); background: var(--accent-bg); border-radius: 8px; padding: 4px 10px; display: inline-block; margin: 8px 0 10px; }

/* 결과 */
.result { border: 2px solid var(--line); }
.result.ok { border-color: #A7F3D0; } .result.pay { border-color: #FED7AA; }
.amt { font-size: 2.3em; font-weight: 700; line-height: 1.15; letter-spacing: -0.5px; }
.amt.ok { color: var(--refund); } .amt.pay { color: var(--pay); }
.bar-row { display: flex; justify-content: space-between; font-size: .88em; margin-top: 10px; }
.track { height: 10px; background: var(--line); border-radius: 99px; overflow: hidden; margin-top: 4px; }
.fill { height: 100%; border-radius: 99px; background: var(--mint-dark); }
.steps { width: 100%; border-collapse: collapse; font-size: .88em; margin-top: 8px; }
.steps td { padding: 7px 2px; border-bottom: 1px solid var(--line); }
.steps td:last-child { text-align: right; white-space: nowrap; }
.steps tr.key td { font-weight: 700; background: var(--muted-bg); }
.note { background: var(--muted-bg); border-radius: 10px; padding: 10px 12px; font-size: .85em; color: var(--sub); }
.note.blue { background: var(--accent-bg); color: #134E4A; }
.note.green { background: var(--refund-bg); color: #065F46; }
.note.orange { background: var(--pay-bg); color: #9A3412; }

/* 성적표 */
.grade { width: 60px; height: 60px; border-radius: 50%; border: 3px solid currentColor; display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 700; font-size: 1.5em; line-height: 1; flex: none; }
.grade small { font-size: 10px; color: inherit; margin-top: 3px; }
.grade.A { color: var(--refund); } .grade.B { color: var(--warn); } .grade.C { color: var(--bad); }
.rowflex { display: flex; gap: 14px; align-items: center; }
.gauge { margin: 12px 0; }
.gauge .t { display: flex; justify-content: space-between; gap: 8px; font-size: .9em; }
.tag { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.tag.ok { background: var(--refund-bg); color: var(--refund); }
.tag.left { background: var(--pay-bg); color: var(--pay); }
.tag.info { background: var(--yellow); color: var(--ink); }

/* 표 */
table.tbl { width: 100%; border-collapse: collapse; font-size: .86em; }
table.tbl th, table.tbl td { border-bottom: 1px solid var(--line); padding: 8px 4px; text-align: right; }
table.tbl th:first-child, table.tbl td:first-child { text-align: left; }
table.tbl th { color: var(--sub); font-weight: 500; font-size: .92em; }
.scroll-x { overflow-x: auto; }

/* 타임라인 */
.tl { list-style: none; padding: 0; margin: 0; }
.tl li { position: relative; padding: 0 0 16px 26px; border-left: 2px solid var(--line); margin-left: 8px; }
.tl li:last-child { border-left-color: transparent; padding-bottom: 0; }
.tl li::before { content: ""; position: absolute; left: -8px; top: 4px; width: 14px; height: 14px; border-radius: 4px; background: #fff; border: 3px solid var(--mint-dark); }
.tl li.done::before { background: var(--line); border-color: #94A3B8; }
.tl li.now::before { background: var(--pay); border-color: var(--pay); }
.tl .when { font-size: .8em; font-weight: 700; color: var(--accent-dark); }
.tl li.done .when { color: var(--sub); }
.tl b { display: block; }
.tl p { font-size: .86em; color: var(--sub); margin: 2px 0 0; }

/* 리스트 */
.changes { list-style: none; padding: 0; margin: 0; counter-reset: c; }
.changes li { counter-increment: c; padding: 12px 0 12px 38px; border-top: 1px solid var(--line); position: relative; }
.changes li:first-child { border-top: 0; }
.changes li::before { content: counter(c); position: absolute; left: 0; top: 12px; width: 26px; height: 26px; border-radius: 8px; background: var(--primary); color: #fff; font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.changes p { font-size: .88em; color: var(--sub); margin: 4px 0; }
.law { font-size: 12px; }
.kwlist { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.kwlist a { display: flex; align-items: center; min-height: 48px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--primary); font-size: .86em; font-weight: 500; background: #fff; }
.kwlist a:hover { border-color: var(--mint-dark); }
.faq details { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 700; padding: 12px 0; min-height: 44px; }
.faq p { font-size: .9em; color: var(--sub); }
.dl div { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: .9em; }
.dl dt { font-weight: 700; flex: 0 0 96px; } .dl dd { margin: 0; color: var(--sub); }

/* 본문 광고: 버튼·메뉴와 분리, 300×250 배너 자리 확보 */
.ad-inline { position: relative; height: 298px; margin: 24px 14px; padding: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; contain: layout; }
.ad-inline[hidden] { display: none; }
.ad-inline > small { position: absolute; left: 12px; top: 7px; font-size: 12px; color: var(--sub); line-height: 18px; }
.ad-preview-box { position: absolute; top: 32px; left: 50%; transform: translateX(-50%); width: 300px; height: 250px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: #F1F5F9; color: var(--sub); font-size: 12px; border: 1px dashed #94A3B8; }
.ad-preview-box b { color: var(--ink); font-size: 16px; }
@media (max-width: 327px) { .ad-inline { display: none; } }

/* 하단 탭 */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(4, 1fr); height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b); background: #fff; border-top: 1px solid var(--line); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 12.5px; color: #64748B; text-decoration: none; }
.tabbar svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a.on { color: var(--ink); font-weight: 700; box-shadow: inset 0 3px 0 var(--mint); }
.tabbar a.on svg { stroke-width: 2.4; }

/* 푸터 */
.foot { max-width: 640px; margin: 18px auto 0; padding: 0 18px 24px; font-size: 12.5px; color: var(--sub); }
.foot p { margin: 0 0 6px; }

/* 공유 시트 */
.sheet-bg { position: fixed; inset: 0; z-index: 50; background: rgba(15, 23, 42, .5); display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: #fff; width: 100%; max-width: 520px; border-radius: 18px 18px 0 0; padding: 18px 16px calc(18px + var(--safe-b)); display: grid; gap: 8px; }
.sheet img { width: 100%; border-radius: 12px; border: 1px solid var(--line); }
.toast { position: fixed; left: 50%; bottom: calc(var(--tab-h) + 20px); transform: translateX(-50%); background: var(--primary); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: .88em; z-index: 60; }

/* 큰 화면 */
@media (min-width: 700px) {
  .hero { border-radius: 0 0 18px 18px; }
  .nums { padding-top: 18px; }
}
table.tbl td:first-child { white-space: nowrap; }

.logo { border-radius: 7px; }

/* 살구색 포인트: 내 요약 카드·숫자 카드 */
.num { background: #fff; }
.changes li::before { background: var(--mint); color: var(--ink); }
.summary-peach { background: #FDF1EA; border-color: var(--peach); }



/* ---- 하늘색 소프트 테마 덮어쓰기 ---- */
.top { background: linear-gradient(90deg, #2563EB 0%, #4C93EE 100%); }
.badge { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.bigbtn { color: #fff; border-color: rgba(255,255,255,.65); }
.bigbtn[aria-pressed="true"] { background: #fff; color: var(--primary); border-color: #fff; }
.hero { background: var(--hero-bg); border-radius: 0 0 24px 24px; padding-bottom: 26px; }
.hero p { color: #2B4A75; }
.chip { background: var(--gold); color: var(--ink); }
.trust span { background: rgba(255,255,255,.85); border-color: #fff; color: var(--ink); }
.hero .btn.ghost { background: #fff; border-color: #fff; color: var(--primary); box-shadow: 0 4px 12px rgba(37,99,235,.12); }
.btn { border-radius: 14px; }
.btn.primary { background: linear-gradient(180deg, #3B82F6 0%, #2563EB 100%); border-color: #2563EB; box-shadow: 0 6px 14px rgba(37,99,235,.28); }
.btn.primary:hover { background: #1D4ED8; }
.card, .num { border-radius: 18px; border-color: #E1ECFB; box-shadow: 0 6px 18px rgba(37,99,235,.08); }
.num b { color: var(--primary); }
.summary-peach { background: #FFF8E5; border-color: #F9DE8B; }
.fill { background: linear-gradient(90deg, #5AA2F2, #2563EB); }
.changes li::before { background: var(--primary); color: #fff; }
.tabbar { box-shadow: 0 -4px 14px rgba(37,99,235,.08); border-top-color: #E1ECFB; }
.tabbar a.on { color: var(--primary); box-shadow: inset 0 3px 0 var(--sky); }
.check input, .inp input:focus { accent-color: var(--primary); }
.inp input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px #BFDBFE; }
:focus-visible { outline-color: #3B82F6; }
.tl li::before { border-color: var(--sky); }
.group-t { background: var(--accent-bg); color: var(--accent-dark); }
.tag.info { background: #FFF1C7; color: #7A4F00; }
.result.ok { border-color: #A7D7C5; }
.logo { border-radius: 7px; box-shadow: 0 2px 6px rgba(0,0,0,.15); }

/* Native privacy controls: visible, keyboard accessible, no overlap with banners. */
.ad-privacy-controls { margin-top: 14px; }
.ad-privacy-controls .btn { min-height: 48px; font-size: var(--fs); }
.ad-privacy-controls p { margin-top: 8px; font-size: max(14px, calc(var(--fs) * .85)); }
