:root{--brand:#695042;--gold:#B69D80;--gold-soft:#E5DAC9;--brand-dark:#4E3A2E;--ink:#1B1613;--secondary:#5A5049;--muted:#8E837A;--line:#E9E3DA;--bg:#F5F3EE;--red:#CC4436}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:'Noto Sans KR',-apple-system,BlinkMacSystemFont,'Segoe UI','Malgun Gothic','Apple SD Gothic Neo',sans-serif;letter-spacing:-.4px;font-size:14px}button,input{font:inherit}button,a,input,summary{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:default;opacity:.5}button:focus-visible,summary:focus-visible,a:focus-visible{outline:3px solid #C9B08F;outline-offset:4px}header{background:white;border-bottom:1px solid var(--line)}nav{max-width:1160px;height:76px;margin:auto;display:flex;align-items:center;gap:24px;padding:0 20px}.brand{display:flex;align-items:center;gap:11px;color:var(--ink);text-decoration:none;min-width:0}.brand-logo{height:26px;width:auto;display:block;flex-shrink:0}.brand-sub{font-size:14px;font-weight:600;color:var(--brand);white-space:nowrap}.nav-tag{color:var(--muted);font-size:12px}nav>button{margin-left:auto}.text-button{border:0;background:transparent;color:var(--secondary);padding:10px 12px;font-size:12px;border-radius:9px}.text-button:hover{background:#F1EBE3;color:var(--brand)}.text-button.inline{color:var(--brand);padding-left:0}.text-button.inline:hover{background:transparent;color:var(--brand-dark)}main{max-width:1160px;margin:auto;padding:40px 20px 20px}.page-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:30px;gap:16px}.eyebrow{font-size:13px;color:var(--muted)}h1{font-size:30px;line-height:1.45;letter-spacing:-1.2px;margin:9px 0 0;font-weight:750}.property-tag{font-size:12px;color:#6E6459;background:#EBE4DA;padding:11px 14px;border-radius:12px;white-space:nowrap}.overview{display:grid;grid-template-columns:1fr 1.3fr;gap:22px}.card{background:#fff;border-radius:24px;padding:30px;margin-bottom:24px}h2{font-size:21px;letter-spacing:-.8px;margin:0;font-weight:720}h3{font-size:15px;margin:28px 0 15px}.step-label{font-size:12px;color:var(--secondary);font-weight:650;display:flex;align-items:center;gap:8px;margin-bottom:20px}.step-label>span{width:21px;height:21px;display:inline-grid;place-items:center;border-radius:50%;background:#F1EBE3;color:var(--brand);font-size:11px}.opening-label{display:block;font-size:22px;line-height:1.55;font-weight:700;letter-spacing:-.7px;margin-bottom:18px}.money-input{display:flex;align-items:center;background:#F4F1EB;border:2px solid transparent;border-radius:13px;gap:8px;padding:14px 18px;color:var(--secondary)}.money-input:focus-within{background:#fff;border-color:var(--brand)}.money-input input{width:100%;min-width:0;font-size:24px;font-weight:700;color:var(--ink);outline:none;border:0;background:transparent;letter-spacing:-.6px}.money-input.large input{font-size:30px}.money-input input::placeholder{color:#B8AC9E;font-size:24px;font-weight:500}.money-input>span{white-space:nowrap;font-weight:500;font-size:15px}.readback{font-size:12px;color:var(--brand);margin:10px 2px 14px;min-height:18px}.helper{color:var(--muted);font-size:12px;line-height:1.75;margin:12px 0}.helper b{font-weight:500;color:var(--secondary)}.opening-math{border-top:1px solid var(--line);padding-top:8px;margin-top:20px}.opening-math>div{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:12px;margin-top:13px;color:#6E6459}.opening-math strong{color:var(--ink);font-size:14px}.opening-math>div:last-child strong{color:var(--brand);font-size:18px}.closing-card{padding:30px 34px}.closing-date{font-size:13px;color:var(--brand);font-weight:600;margin:0 0 8px}.closing-card h2{color:var(--secondary);font-size:19px;font-weight:600}.closing-number{font-size:40px;line-height:1.35;font-weight:750;letter-spacing:-1.6px;margin:12px 0 8px}.closing-caption{font-size:12px;color:var(--muted);margin:0;line-height:1.6}.closing-facts{display:grid;grid-template-columns:1fr 1fr;margin:25px 0 14px;padding:20px;background:#FAF8F4;border-radius:15px}.closing-facts>div{display:flex;flex-direction:column;gap:7px}.closing-facts>div+div{border-left:1px solid #E6DFD5;padding-left:22px}.closing-facts span,.closing-facts small{font-size:11px;color:var(--muted)}.closing-facts strong{font-size:18px;color:var(--secondary)}.plain-details summary{color:var(--secondary);font-size:12px;cursor:pointer;padding:5px 0;list-style:none}.plain-details summary:after{content:'⌄';margin-left:8px}.plain-details[open] summary:after{content:'⌃'}.line-item{display:flex;justify-content:space-between;gap:14px;font-size:12px;color:#6E6459;margin:13px 0}.line-item strong{color:var(--secondary);text-align:right}.line-item.total{border-top:1px solid var(--line);padding-top:14px}.line-item.total strong{color:var(--brand)}.section-heading{display:flex;justify-content:space-between;gap:20px;align-items:center;margin-bottom:22px}.section-heading p{font-size:12px;color:var(--muted);line-height:1.65;margin:9px 0 0}.schedule-section{padding:12px 0 8px;margin-bottom:22px}.schedule-total{text-align:right}.schedule-total span{display:block;font-size:11px;color:var(--muted);margin-bottom:7px}.schedule-total strong{font-size:19px;letter-spacing:-.5px;white-space:nowrap}.loan-strip{display:flex;align-items:center;gap:12px;margin-bottom:16px;padding:16px 20px;background:#EEE8DF;border-radius:14px}.check-icon{background:#E0D8CC;color:#6E6459;border-radius:50%;width:25px;height:25px;display:grid;place-items:center;flex-shrink:0}.loan-strip b{display:block;font-size:12px;color:var(--secondary);font-weight:600}.loan-strip div span{display:block;font-size:11px;color:var(--muted);margin-top:5px}.loan-strip>span:last-child{margin-left:auto;font-size:14px;color:#6E6459;white-space:nowrap}.timeline{display:grid;grid-template-columns:1fr 1fr 1.2fr;gap:15px}.payment-card{background:#fff;border-radius:20px;padding:22px;position:relative}.payment-card:not(:last-child):after{content:'›';position:absolute;right:-12px;top:54px;width:24px;height:24px;background:var(--bg);border-radius:50%;color:#ADA192;display:grid;place-items:center;z-index:1;font-size:22px}.payment-date{color:#6E6459;font-size:12px;margin-bottom:14px}.payment-title{font-size:13px;color:var(--secondary)}.payment-amount{font-size:24px;font-weight:750;letter-spacing:-.9px;margin:8px 0 15px}.payment-status{border-top:1px solid var(--line);padding-top:12px;font-size:11px;line-height:1.6;color:var(--muted)}.payment-status strong{font-weight:600}.payment-card.final{background:#F1EBE3}.final .payment-date,.final .payment-title,.final .payment-amount{color:var(--brand-dark)}.final .payment-status{border-top-color:#E0D3C0}.footnote{font-size:11px;color:var(--muted);line-height:1.7;margin:14px 0 0}.badge{display:inline-flex;align-items:center;background:#F4F1EB;color:#6E6459;white-space:nowrap;border-radius:9px;padding:8px 10px;font-size:11px}.saving-card .step-label{margin-bottom:12px}.saving-grid{display:grid;grid-template-columns:.85fr 1.15fr;gap:44px}.saving-controls>label{display:block;font-size:13px;color:var(--secondary);margin:2px 0 10px}.quick-buttons{display:flex;gap:8px;margin-top:9px}.quick-buttons button{flex:1;background:#F4F1EB;border:0;border-radius:8px;padding:10px 4px;color:#6E6459;font-size:12px}.quick-buttons button:hover{color:var(--brand);background:#F1EBE3}.rate-control{display:flex;gap:12px;align-items:center;justify-content:space-between;margin-top:23px}.rate-control label{font-size:13px;color:var(--secondary)}.rate-control small{display:block;font-size:10px;color:var(--muted);margin-top:4px}.percent-input{display:flex;align-items:center;background:#F4F1EB;border-radius:9px;width:100px;padding:10px;gap:5px;color:#6E6459}.percent-input input{min-width:0;width:100%;border:0;background:transparent;outline:0;text-align:right;color:var(--ink)}.percent-input:focus-within{outline:2px solid var(--brand)}.saving-result{background:#FAF8F4;border-radius:18px;padding:24px;align-self:stretch}.empty-result{display:flex;min-height:230px;align-items:center;justify-content:center;flex-direction:column;text-align:center}.empty-icon{width:46px;height:46px;border-radius:16px;background:#F1EBE3;color:var(--brand);display:grid;place-items:center;font-size:22px;margin-bottom:15px}.empty-result strong{font-size:17px;line-height:1.6}.empty-result p{font-size:12px;color:var(--muted);line-height:1.8}.result-caption{color:#6E6459;font-size:12px}.result-headline{font-size:26px;line-height:1.5;font-weight:750;letter-spacing:-.9px;margin:8px 0 17px}.negative{color:var(--red)!important}.positive{color:var(--brand)!important}.result-detail{margin-top:15px;border-top:1px solid #EBE5DC;padding-top:3px}.result-warning{background:#FBEFEC;color:#B03A2E;border-radius:9px;padding:11px;font-size:11px;line-height:1.7}.recommendation{background:#F3EDE5;border-radius:15px;padding:20px 23px;display:flex;align-items:center;justify-content:space-between;gap:18px;margin-top:24px}.recommendation .rec-label{font-size:12px;color:#6E6459}.rec-value{font-size:23px;font-weight:750;letter-spacing:-.6px;color:var(--brand-dark);margin-top:7px}.rec-note{font-size:11px;color:#8A7C6C;line-height:1.7;margin:7px 0 0}.primary{border:0;border-radius:11px;background:var(--brand);color:#fff;font-weight:600;font-size:13px;padding:14px 20px;white-space:nowrap}.primary:hover{background:var(--brand-dark)}.future-card .section-heading{margin-bottom:10px}.funds{display:grid;grid-template-columns:1fr 1fr;column-gap:30px}.fund-row{padding:18px 0;border-bottom:1px solid var(--line)}.fund-heading{display:flex;align-items:center;gap:10px;justify-content:space-between}.fund-name{font-size:13px;font-weight:600;color:var(--secondary)}.fund-summary{font-size:11px;color:var(--muted);margin-top:6px}.toggle{appearance:none;position:relative;width:36px;height:22px;border-radius:16px;background:#DED6CA;cursor:pointer;margin:0;flex-shrink:0;transition:background .15s}.toggle:before{content:'';position:absolute;top:3px;left:3px;width:16px;height:16px;border-radius:50%;background:white;box-shadow:0 1px 2px #0001;transition:transform .15s}.toggle:checked{background:var(--brand)}.toggle:checked:before{transform:translateX(14px)}.toggle:focus-visible{outline:3px solid #C9B08F;outline-offset:3px}.fund-edit{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:13px}.field label{font-size:11px;display:block;color:#6E6459;margin-bottom:8px}.field input{width:100%;min-width:0;padding:12px 10px;border:1px solid transparent;outline:0;background:#F4F1EB;border-radius:10px;font-size:13px;color:var(--ink)}.field input:focus{background:white;border-color:var(--brand)}.field input[type=number]{text-align:right}.field small{font-size:10px;color:var(--muted);line-height:1.6;display:block;margin-top:6px}.settings-card summary,.detail-card summary{list-style:none;display:flex;align-items:center;justify-content:space-between;cursor:pointer;gap:20px}.settings-card summary::-webkit-details-marker,.detail-card summary::-webkit-details-marker{display:none}summary h2{font-size:17px}summary p{font-size:12px;color:var(--muted);margin:7px 0 0}.chevron{color:#A79B8C;font-size:22px}details[open]>summary .chevron{transform:rotate(180deg)}.settings-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:23px 20px;margin-top:28px}.expense-row{display:grid;grid-template-columns:1.2fr 1fr 1fr auto;gap:12px;align-items:end;margin:12px 0}.expense-row button{margin-bottom:5px}.table-top{display:flex;justify-content:space-between;align-items:center;margin:24px 0 10px;font-size:11px;color:var(--muted)}.table-wrap{overflow:auto;max-height:440px}table{border-collapse:collapse;width:100%;font-size:12px;white-space:nowrap;font-variant-numeric:tabular-nums}th,td{padding:15px 12px;text-align:right;border-bottom:1px solid var(--line)}th{color:var(--muted);font-weight:500;background:#fff;position:sticky;top:0}td{color:var(--secondary)}th:first-child,td:first-child{text-align:left}.model-notes{padding:6px 5px 20px;color:var(--muted);font-size:11px;line-height:1.9}.model-notes summary{cursor:pointer;font-size:12px}footer{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;padding:16px 0 0;border-top:1px solid #EBE5DC;color:#A99D8E;font-size:11px}.foot-note{display:grid;gap:7px;min-width:0}.disclaimer{display:block;font-size:10.5px;line-height:1.75;color:#A99D8E;max-width:78ch}footer .text-button{font-size:11px;color:var(--muted)}.toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);max-width:90vw;background:#2E2620;color:white;border-radius:12px;padding:15px 22px;font-size:13px;box-shadow:0 4px 20px #0002;z-index:10}.error-box{background:#FBEFEC;color:#B03A2E;padding:15px 20px;border-radius:14px;margin-bottom:20px;font-size:13px;line-height:1.7}[hidden]{display:none!important}@media(max-width:1000px){.closing-number{font-size:33px}.closing-card{padding:30px}.payment-amount{font-size:22px}.saving-grid{gap:25px}.opening-label{font-size:20px}.overview{grid-template-columns:1fr 1.15fr}.closing-facts{padding:16px}.closing-facts strong{font-size:16px}}@media(max-width:760px){nav{height:64px;padding:0 20px}.nav-tag{display:none}main{padding-top:27px}.page-heading{align-items:flex-start;flex-direction:column;gap:14px;margin-bottom:22px}h1{font-size:26px}.property-tag{font-size:11px;padding:8px 11px}.overview{grid-template-columns:1fr;gap:0}.card{border-radius:20px;padding:24px;margin-bottom:18px}.opening-label br{display:none}.closing-number{font-size:34px}.opening-math{margin-top:16px}.closing-facts{margin-top:20px}.section-heading{gap:12px}h2{font-size:19px}.schedule-total strong{font-size:15px}.schedule-total span{font-size:10px}.timeline{grid-template-columns:1fr;gap:12px}.payment-card{display:grid;grid-template-columns:1fr auto;align-items:center;gap:4px 14px;padding:20px 22px}.payment-date{grid-column:1;grid-row:1;font-size:11px;margin-bottom:4px}.payment-title{grid-column:1;grid-row:2;font-size:12px}.payment-amount{grid-column:2;grid-row:1/3;font-size:22px;margin:0}.payment-status{grid-column:1/-1;margin-top:11px;padding-top:10px}.payment-card:not(:last-child):after{display:none}.loan-strip{padding:14px}.loan-strip>span:last-child{display:none}.loan-strip div span{line-height:1.65}.saving-grid{grid-template-columns:1fr;gap:20px}.saving-controls .helper{margin-bottom:0}.saving-result{padding:23px}.empty-result{min-height:170px}.saving-card .section-heading{align-items:flex-start;flex-direction:column}.saving-card .badge{align-self:flex-start}.recommendation{padding:19px;align-items:flex-start;flex-direction:column;gap:15px}.recommendation .primary{width:100%}.funds{grid-template-columns:1fr}.future-card .section-heading{align-items:flex-start;flex-direction:column}.settings-grid{grid-template-columns:1fr 1fr;gap:20px 14px}.expense-row{grid-template-columns:1fr 1fr;align-items:start}.expense-row button{align-self:end}.result-headline{font-size:25px}.closing-card h2{font-size:18px}.closing-caption{line-height:1.8}footer{align-items:flex-start;flex-direction:column}footer div{margin-left:-12px}}/* ── v2 폴리시: 한눈에 보기 히어로, 잔액 그래프, 마감 다듬기 ───────────────── */
:root{--brand-soft:#F1EBE3;--ink-2:#3A322C;--shadow:0 1px 2px rgba(61,45,34,.04),0 6px 20px -6px rgba(61,45,34,.09);--shadow-lift:0 2px 4px rgba(61,45,34,.05),0 16px 36px -12px rgba(61,45,34,.16)}
body{-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;word-break:keep-all;overflow-wrap:break-word}
strong,b,td,th,.closing-number,.payment-amount,.result-headline,.rec-value,.money-input input,.percent-input input{font-variant-numeric:tabular-nums}
header{position:sticky;top:0;z-index:20;background:rgba(255,255,255,.82);backdrop-filter:saturate(180%) blur(14px)}
main{padding-bottom:36px}
h1{letter-spacing:-1.4px}
.card{box-shadow:var(--shadow);transition:box-shadow .2s ease,transform .2s ease}
.payment-card{box-shadow:var(--shadow)}

/* 히어로: ① 내 돈 → ② 앞으로 낼 돈 → ③ 잔금 필요액 */
.hero{background:#fff;border-radius:24px;padding:8px 10px;margin-bottom:22px;box-shadow:var(--shadow)}
.hero-flow{display:grid;grid-template-columns:1fr auto 1fr auto 1fr;align-items:stretch}
.hero-item{display:flex;flex-direction:column;justify-content:center;gap:7px;text-align:left;padding:22px 24px;border:0;border-radius:18px;background:transparent;font:inherit;color:inherit;min-width:0}
button.hero-item{cursor:pointer;transition:background .15s}
button.hero-item:hover{background:#F7F3ED}
.hero-label{font-size:12px;color:var(--muted);letter-spacing:-.2px}
.hero-item>strong{font-size:27px;font-weight:750;letter-spacing:-1.1px;line-height:1.3;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hero-item>strong.placeholder{color:var(--brand);font-size:20px;letter-spacing:-.6px}
.hero-item>small{font-size:11px;color:#8E837A;line-height:1.55}
.hero-item.accent>strong{color:var(--brand)}
.hero-arrow{align-self:center;color:#C8BCAC;font-size:24px;line-height:1;padding:0 2px;user-select:none}
.hero-gap{margin:6px 10px 14px;padding:22px 24px 20px;background:#F8F5F0;border-radius:18px}
.gap-head{display:flex;align-items:baseline;justify-content:space-between;gap:14px;margin-bottom:18px}
.gap-head span{font-size:13px;color:var(--secondary)}
.gap-head b{font-size:21px;font-weight:750;letter-spacing:-.7px;white-space:nowrap}
.gap-rows{display:grid;gap:11px}
.gap-row{display:grid;grid-template-columns:82px 1fr auto;align-items:center;gap:14px}
.gap-name{font-size:12px;color:#6E6459;white-space:nowrap}
.gap-row>b{font-size:13px;font-weight:650;color:var(--ink-2);white-space:nowrap;min-width:104px;text-align:right}
.gap-track{display:flex;height:26px;border-radius:8px;overflow:hidden;background:#EBE4DA}
.gap-seg{display:flex;align-items:center;justify-content:center;min-width:2px;overflow:hidden;transition:width .35s cubic-bezier(.2,.8,.3,1)}
.gap-seg span{font-size:10px;color:#fff;white-space:nowrap;padding:0 6px;opacity:.95}
.gap-seg.need{background:#CDC2B2}
.gap-seg.own{background:var(--brand)}
.gap-seg.fund{background:#8A6F58}
.gap-seg.save{background:#B69D80}
.gap-seg.gain{background:#D9C9B0}
.gap-seg.gain span,.gap-seg.save span{color:#5A4433}
.gap-legend{display:flex;flex-wrap:wrap;gap:8px 16px;margin-top:15px}
.lg{display:inline-flex;align-items:center;gap:6px;font-size:11px;color:#6E6459}
.lg:before{content:'';width:8px;height:8px;border-radius:3px;background:currentColor}
.lg b{font-weight:600;color:var(--ink-2)}
.lg.own:before{background:var(--brand)}.lg.fund:before{background:#8A6F58}.lg.save:before{background:#B69D80}.lg.gain:before{background:#D9C9B0}.lg.loss:before{background:var(--red)}

/* 잔액 흐름 그래프 */
.chart-card{margin:16px 0 0;padding:26px 24px 20px}
.chart-card .section-heading{margin-bottom:6px}
.chart{width:100%;overflow:hidden}
.chart svg{display:block;width:100%;height:auto}
.chart .grid{stroke:#F0EAE1;stroke-width:1}
.chart .zero{stroke:#D5CCBE;stroke-width:1;stroke-dasharray:3 4}
.chart .mark{stroke:#E5DED4;stroke-width:1;stroke-dasharray:2 4}
.chart .stroke{fill:none;stroke-width:2.4;stroke-linejoin:round;stroke-linecap:round}
.chart .stroke.pos{stroke:var(--brand)}
.chart .stroke.neg{stroke:var(--red)}
.chart .dot{fill:#fff;stroke:var(--brand);stroke-width:2.6}
.chart .dot.neg{stroke:var(--red)}
.chart .tick{fill:#ADA192;font-size:11px}
.chart .pin{fill:var(--secondary);font-size:11px;font-weight:600}
.chart .pin-sub{fill:var(--brand-dark);font-size:12px;font-weight:700}
.chart .pin.neg,.chart .pin-sub.neg{fill:var(--red)}
.chart .pin.neg{fill:var(--red)}
.chart-empty{display:flex;align-items:center;justify-content:center;gap:10px;height:180px;color:var(--muted);font-size:13px;background:#FAF8F4;border-radius:16px;text-align:center;padding:0 20px}
.chart-empty span{width:32px;height:32px;border-radius:11px;background:var(--brand-soft);color:var(--brand);display:grid;place-items:center;flex-shrink:0}
.badge.warn{background:#FBEFEC;color:#B03A2E}

/* 타임라인·결과 다듬기 */
.payment-card.final{background:linear-gradient(140deg,#F3EDE5 0%,#EDE5DA 100%)}
.payment-status strong{font-size:12px}
.saving-result{border:1px solid #EFE9E0}
.recommendation{background:linear-gradient(135deg,#F4EEE6 0%,#F1EBE3 100%)}
.primary{box-shadow:0 6px 16px -6px rgba(105,80,66,.45);transition:background .15s,transform .1s}
.primary:active{transform:translateY(1px)}
.money-input{transition:border-color .15s,background .15s}
.toggle{transition:background .18s}

@media(max-width:1000px){
 .hero-item>strong{font-size:23px;letter-spacing:-.9px}
 .hero-item{padding:20px 18px}
 .gap-row{grid-template-columns:74px 1fr auto}
}
@media(max-width:760px){
 .hero{padding:6px;border-radius:20px}
 .hero-flow{grid-template-columns:1fr}
 .hero-arrow{display:none}
 .hero-item{padding:16px;border-radius:14px;display:grid;grid-template-columns:1fr auto;align-items:center;gap:3px 12px;text-align:left}
 .hero-label{grid-column:1;grid-row:1}
 .hero-item>strong{grid-column:2;grid-row:1/3;font-size:21px;letter-spacing:-.7px;text-align:right}
 .hero-item>small{grid-column:1;grid-row:2}
 .hero-arrow+.hero-item{border-top:1px solid var(--line);border-radius:0}
 .hero-gap{margin:8px 6px 8px;padding:18px 16px}
 .gap-head{flex-direction:column;align-items:flex-start;gap:6px;margin-bottom:14px}
 .gap-head b{font-size:19px}
 .gap-row{grid-template-columns:1fr auto;gap:6px 10px}
 .gap-name{grid-column:1;grid-row:1;font-size:11px}
 .gap-row>b{grid-column:2;grid-row:1;min-width:0;font-size:12px}
 .gap-track{grid-column:1/-1;grid-row:2;height:22px}
 .gap-seg span{display:none}
 .chart-card{padding:22px 18px 16px;border-radius:20px}
 .chart-card .section-heading{flex-direction:column;align-items:flex-start;gap:10px}
 .chart .tick,.chart .pin{font-size:10px}.chart .pin-sub{font-size:11px}
}
/* ── v3: 탭 셸, 자금조달계획서, 취득세·옵션 ───────────────────────────── */
.tabbar{max-width:1160px;margin:auto;padding:0 20px;display:flex;gap:6px;border-top:1px solid var(--line)}
.tabbar button{position:relative;border:0;background:transparent;font:inherit;font-size:13px;font-weight:600;color:var(--muted);padding:15px 16px 14px;display:flex;align-items:center;gap:8px;letter-spacing:-.3px}
.tabbar button b{width:19px;height:19px;border-radius:50%;background:#E9E2D8;color:#8E837A;font-size:11px;font-weight:700;display:grid;place-items:center}
.tabbar button:hover{color:var(--secondary)}
.tabbar button.on{color:var(--brand)}
.tabbar button.on b{background:var(--brand);color:#fff}
.tabbar button.on:after{content:'';position:absolute;left:12px;right:12px;bottom:-1px;height:2px;border-radius:2px;background:var(--brand)}
.panel{display:block}
.lede{font-size:13px;color:var(--secondary);line-height:1.8;margin:12px 0 0;max-width:60ch}
.page-heading .eyebrow{display:block;max-width:60ch;line-height:1.6}

/* 공통 소형 입력 */
.money-input.compact{padding:9px 12px;border-radius:10px;gap:6px}
.money-input.compact input{font-size:15px;font-weight:650;text-align:right}
.money-input.compact>span{font-size:12px}
select{width:100%;min-width:0;font:inherit;font-size:13px;color:var(--ink);background:#F4F1EB;border:1px solid transparent;border-radius:10px;padding:11px 10px;outline:0;appearance:none;background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path d='M1 1l4 4 4-4' fill='none' stroke='%238b95a1' stroke-width='1.6' stroke-linecap='round'/></svg>");background-repeat:no-repeat;background-position:right 11px center;padding-right:28px}
select:focus{background-color:#fff;border-color:var(--brand)}
.field input[type=date]{color:var(--secondary)}
.inline-field{max-width:280px;margin-top:18px}
.text-button.danger{color:var(--muted);font-size:11px;padding:8px 10px}
.text-button.danger:hover{background:#FBEFEC;color:var(--red)}
.sum-chip{text-align:right;white-space:nowrap}
.sum-chip span{display:block;font-size:11px;color:var(--muted);margin-bottom:6px}
.sum-chip strong{font-size:19px;font-weight:720;letter-spacing:-.5px}
.sum-chip.accent strong{color:var(--brand)}
.check-line{display:flex;align-items:flex-start;gap:10px;margin-top:16px;cursor:pointer;font-size:12px;color:var(--secondary);line-height:1.6}
.check-line.compact{margin:0;align-items:center;white-space:nowrap}
.check-line input{width:18px;height:18px;margin:1px 0 0;accent-color:var(--brand);flex-shrink:0}
.check-line small{display:block;font-size:11px;color:var(--muted);line-height:1.7;margin-top:5px}
.link{color:var(--brand)}

/* 주택 선택 */
.pick-grid{display:grid;grid-template-columns:1fr 1fr auto;gap:16px;align-items:end}
.pick-price{text-align:right;padding-left:10px}
.pick-price span{display:block;font-size:11px;color:var(--muted);margin-bottom:7px}
.pick-price strong{font-size:26px;font-weight:750;letter-spacing:-1px;color:var(--brand);white-space:nowrap}
#priceEditor{margin-top:22px;border-top:1px solid var(--line);padding-top:14px}
.type-block{border:1px solid var(--line);border-radius:16px;padding:18px;margin:14px 0}
.type-head{display:grid;grid-template-columns:1.4fr 1fr auto;gap:14px;align-items:end;margin-bottom:14px}
.floor-rows{display:grid;gap:8px}
.floor-row{display:grid;grid-template-columns:1fr 200px 34px;gap:10px;align-items:center}
.floor-row>input{width:100%;min-width:0;padding:11px 12px;border:1px solid transparent;background:#F4F1EB;border-radius:10px;font-size:13px;outline:0;color:var(--ink)}
.floor-row>input:focus{background:#fff;border-color:var(--brand)}

/* 계획서 항목 줄 */
.plan-rows{display:grid}
.plan-row{display:grid;grid-template-columns:1fr 180px 262px;gap:16px;align-items:center;padding:16px 0;border-bottom:1px solid var(--line)}
.plan-row:last-child{border-bottom:0}
.plan-label b{display:block;font-size:13px;font-weight:650;color:var(--ink-2)}
.plan-label small{display:block;font-size:11px;color:var(--muted);margin-top:5px;line-height:1.6}
.plan-when{display:grid;grid-template-columns:1fr;gap:8px}
.plan-when:has(input:not([hidden])){grid-template-columns:98px 1fr}
.plan-when input[type=date]{width:100%;min-width:0;padding:10px;border:1px solid transparent;background:#F4F1EB;border-radius:10px;font-size:12px;outline:0;color:var(--secondary)}
.plan-when input[type=date]:focus{background:#fff;border-color:var(--brand)}
.plan-row.locked{background:#FAF8F4;border-radius:14px;padding:16px 18px;border-bottom:0;margin:6px 0}
.plan-row.locked .plan-amount{font-size:15px;font-weight:650;text-align:right;color:var(--secondary)}
.plan-row.locked .plan-when{font-size:11px;color:var(--muted);text-align:right}
.plan-extra{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-top:22px;padding-top:20px;border-top:1px solid var(--line)}

/* 주담대 한도 */
.mortgage-box{background:#F8F5F0;border-radius:18px;padding:22px;margin-bottom:8px}
.mortgage-head{display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap}
.mortgage-head b{display:block;font-size:14px;color:var(--ink-2)}
.mortgage-head span{display:block;font-size:11px;color:var(--muted);margin-top:5px;line-height:1.6}
.mortgage-head .money-input{background:#fff;min-width:200px}
.rule-label{display:block;font-size:11px;color:var(--muted);margin:20px 0 9px}
.rule-picker{display:flex;gap:6px;flex-wrap:wrap;background:#EAE3D9;padding:4px;border-radius:12px}
.rule-picker button{flex:1;min-width:66px;border:0;background:transparent;border-radius:9px;padding:10px 6px;font:inherit;font-size:12px;font-weight:600;color:#6E6459;transition:background .15s,color .15s}
.rule-picker button:hover{color:var(--brand)}
.rule-picker button.on{background:#fff;color:var(--brand);box-shadow:0 1px 3px rgba(61,45,34,.12)}
#loanRuleNote{margin:12px 0 0}

/* ⑬ 합계 */
.reconcile .line-item{font-size:13px}
.reconcile .line-item strong{font-size:14px}
.reconcile-verdict{margin-top:16px;padding:14px 16px;border-radius:12px;font-size:13px;font-weight:600}
.reconcile-verdict.ok{background:#F3EDE5;color:var(--brand-dark)}
.reconcile-verdict.off{background:#FAF4EA;color:#8A6A3C}

/* 입주 계획 */
.radio-row{display:flex;gap:9px;flex-wrap:wrap}
.radio-chip{display:inline-flex;align-items:center;gap:8px;padding:12px 16px;border-radius:12px;background:#F4F1EB;font-size:13px;color:var(--secondary);cursor:pointer;border:1.5px solid transparent}
.radio-chip.on{background:#F2ECE4;border-color:var(--brand);color:var(--brand-dark);font-weight:600}
.radio-chip input{accent-color:var(--brand);margin:0}

/* 유상옵션 카탈로그 */
.opt-list{display:grid;margin-top:8px}
.opt-row{display:grid;grid-template-columns:auto 1fr 170px 150px auto;gap:14px;align-items:center;padding:13px 10px;border-bottom:1px solid var(--line);border-radius:12px;transition:background .15s}
.opt-row:last-of-type{border-bottom:0}
.opt-row.on{background:#FAF6F1}
.opt-row.off{opacity:.45}
.opt-name b{display:block;font-size:13px;font-weight:600;color:var(--ink-2)}
.opt-name small{display:block;font-size:11px;color:var(--muted);margin-top:4px;line-height:1.6}
.opt-name input{width:100%;min-width:0;padding:9px 11px;border:1px solid transparent;background:#F4F1EB;border-radius:9px;font-size:13px;outline:0;color:var(--ink)}
.opt-name input:focus{background:#fff;border-color:var(--brand)}
.opt-row .money-input{background:#fff;border-color:#E7E0D6}
.opt-row.off .money-input,.opt-row:not(.on) .money-input{background:#F4F1EB;border-color:transparent}
.opt-row input[type=date]{width:100%;min-width:0;padding:10px;border:1px solid transparent;background:#F4F1EB;border-radius:10px;font-size:12px;outline:0;color:var(--secondary)}
.opt-row input[type=date]:focus{background:#fff;border-color:var(--brand)}

.panel-foot{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:26px 0 8px;flex-wrap:wrap}
.panel-foot .helper{margin:0}

/* 대시보드: 자기자금 요약·상환 내역 */
.own-total{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:16px}
.own-total span{font-size:12px;color:var(--muted)}
.own-total strong{font-size:28px;font-weight:750;letter-spacing:-1.1px}
.own-break{display:flex;flex-wrap:wrap;gap:7px}
.chip{display:inline-flex;align-items:center;gap:7px;background:#F4F1EB;color:#6E6459;border-radius:9px;padding:8px 11px;font-size:11px}
.chip b{color:var(--ink-2);font-weight:650}
.repay-box{background:#FAF4EA;border-radius:15px;padding:18px 20px;margin:22px 0 14px}
.repay-title{font-size:12px;color:#8A6A3C;font-weight:650;margin-bottom:12px}
.repay-line{display:flex;justify-content:space-between;gap:12px;font-size:12px;color:#7E7060;margin:9px 0}
.repay-line small{color:#A99578}
.repay-line strong{color:#6B5334;font-weight:600}
.repay-line.total{border-top:1px solid #E8DCC8;margin-top:13px;padding-top:12px}
.repay-line.total span,.repay-line.total strong{color:#8A6A3C;font-size:14px;font-weight:700}
.fund-list{display:grid;grid-template-columns:1fr 1fr;column-gap:30px}
.fund-item{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 0;border-bottom:1px solid var(--line)}
.fund-item b{display:block;font-size:13px;font-weight:600;color:var(--secondary)}
.fund-item small{display:block;font-size:11px;color:var(--muted);margin-top:5px}
.fund-item strong{font-size:14px;white-space:nowrap}

@media(max-width:1000px){
 .plan-row{grid-template-columns:1fr 150px 236px;gap:12px}
 .plan-extra{grid-template-columns:1fr 1fr}
 .floor-row{grid-template-columns:1fr 160px 34px}
}
@media(max-width:760px){
 .tabbar{padding:0 10px;gap:0;overflow-x:auto;scrollbar-width:none}
 .tabbar::-webkit-scrollbar{display:none}
 .tabbar button{padding:13px 12px;font-size:12px;white-space:nowrap}
 .pick-grid{grid-template-columns:1fr 1fr}
 .pick-price{grid-column:1/-1;display:flex;align-items:baseline;justify-content:space-between;padding:14px 0 0;border-top:1px solid var(--line);text-align:left}
 .pick-price span{margin:0}
 .pick-price strong{font-size:23px}
 .type-head{grid-template-columns:1fr 1fr;gap:12px}
 .type-head .text-button{grid-column:1/-1;justify-self:start}
 .floor-row{grid-template-columns:1fr 130px 30px;gap:8px}
 .plan-row{grid-template-columns:1fr auto;gap:10px 12px;padding:18px 0}
 .plan-label{grid-column:1/-1}
 .plan-amount{grid-column:1;min-width:0}
 .plan-when{grid-column:2;grid-template-columns:110px}
 .plan-when:has(input:not([hidden])){grid-column:1/-1;grid-template-columns:110px 1fr}
 .plan-row.locked{grid-template-columns:1fr auto}
 .plan-row.locked .plan-label{grid-column:1/-1}
 .plan-extra{grid-template-columns:1fr}
 .mortgage-box{padding:18px}
 .mortgage-head .money-input{min-width:0;width:100%}
 .rule-picker button{min-width:56px;font-size:11px;padding:9px 4px}
 .opt-row{grid-template-columns:auto 1fr;gap:9px 12px;padding:14px 8px}
 .opt-name{min-width:0}
 .opt-row .money-input{grid-column:1/-1}
 .opt-row input[type=date]{grid-column:1/-1}
 .opt-row>span:last-child{display:none}
 .opt-row .text-button.danger{grid-column:1/-1;justify-self:start}
 .panel-foot{flex-direction:column;align-items:stretch}
 .panel-foot .primary{width:100%}
 .fund-list{grid-template-columns:1fr}
 .own-total strong{font-size:24px}
 .radio-chip{font-size:12px;padding:11px 13px}
 .sum-chip strong{font-size:16px}
}
/* ── 모바일 다듬기 ─────────────────────────────────────────────────── */
@media(max-width:760px){
 /* 헤더: 브랜드 줄을 낮추고 탭 세 개를 한 화면에 균등 배치 */
 nav{height:56px;gap:12px;padding:0 16px}
 .brand{gap:8px}
 .brand-logo{height:21px}.brand-sub{font-size:12px}
 nav>button{padding:9px 10px}
 .tabbar{padding:0 8px;gap:2px;overflow:visible}
 .tabbar button{flex:1;min-width:0;justify-content:center;gap:6px;padding:12px 2px;font-size:12px}
 .tabbar button b{width:17px;height:17px;font-size:10px;flex-shrink:0}
 .tabbar button.on:after{left:6px;right:6px}

 main{padding-top:22px}
 .lede{line-height:1.75;margin-top:10px}
 .page-heading{margin-bottom:18px}

 /* 카드 머리글: 제목 아래로 합계를 한 줄 띠로 내린다 */
 .section-heading{flex-direction:column;align-items:stretch;gap:12px}
 .section-heading>div:first-child{min-width:0}
 .section-heading>.badge,.section-heading>.property-tag{align-self:flex-start}
 .sum-chip{display:flex;align-items:baseline;justify-content:space-between;gap:12px;text-align:left;
  background:#F8F5F0;border-radius:12px;padding:12px 14px}
 .sum-chip span{margin:0;font-size:12px}
 .sum-chip strong{font-size:17px}
 .check-line.compact{white-space:normal;align-items:center}
 .card>.section-heading+.check-line{margin-top:0}

 /* 히어로: 설명 줄을 아래 전체 폭으로 내려 숫자와 겹치지 않게 */
 .hero-item{padding:15px 16px;gap:4px 12px;align-items:baseline}
 .hero-item>strong{grid-row:1;font-size:22px}
 .hero-item>small{grid-column:1/-1;grid-row:2;line-height:1.6}
 .hero-item>strong.placeholder{font-size:17px}

 /* 유상옵션: 한 줄에 토글·이름·금액, 날짜는 고른 항목에서만 */
 .opt-row{grid-template-columns:auto minmax(0,1fr) auto;gap:8px 10px;padding:12px 6px;align-items:center}
 .opt-name{grid-column:2;grid-row:1}
 .opt-name b{font-size:12.5px;line-height:1.45}
 .opt-name small{margin-top:3px}
 .opt-row .money-input{grid-column:3;grid-row:1;width:112px;padding:8px 10px}
 .opt-row .money-input input{font-size:14px}
 .opt-row .money-input>span{font-size:11px}
 .opt-row input[type=date]{grid-column:1/-1;grid-row:2;display:none}
 .opt-row.on input[type=date]{display:block}
 .opt-row>span:last-child{display:none}
 .opt-row .text-button.danger{grid-column:1/-1;grid-row:3;justify-self:start}

 /* 표: 카드 밖으로 넘치지 않게 가로 스크롤만 허용 */
 .table-wrap{margin:0 -4px}
 th,td{padding:12px 9px;font-size:11.5px}

 /* 잔금 상환 박스와 세부 설정 간격 정리 */
 .repay-box{padding:16px;margin:18px 0 12px}
 .settings-grid{gap:16px 12px}
 .footnote{line-height:1.8}
}

@media(max-width:400px){
 .tabbar button{font-size:11px;gap:4px;padding:12px 1px}
 .card{padding:20px 16px}
 .hero-item>strong{font-size:20px}
 .opt-row .money-input{width:100px}
 .money-input.large input{font-size:26px}
}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
