/* DSR 계산기 (dsr.css) — core.css 다음에. 공통 모양은 core.css, 여기엔 이 계산기에만 쓰는 것 (CALC-GUIDE.md)
   시안: _mock/dsr/index.html (HANDOVER 5-46) · 색 규칙: 초록 = 기준 이하·여유 / 빨강 = 초과·줄어듦 / 파랑 = 넣은 값 / 검정 굵게 = 참고 금액 */
.lc [hidden] { display: none !important; }
.lc .lc-big.lc-big-s { white-space: normal; }   /* 안내 문장(입력 막기)은 줄바꿈 — core 의 .lc-big nowrap 보다 세게 */
/* 입력 구역: 회색 바탕 위에 ①②③ 흰 카드, 기존 대출 카드는 그 안에서 연회색 (박 2026-11-14 시안 B — 구역이 헷갈리지 않게) */
.lc .ds-in { background: #eef1f5; gap: 12px; }
.lc .ds-head { padding-bottom: 20px; }   /* 제목 줄 아래도 흰 여백 — 없으면 아이콘이 회색 바탕에 붙어 보임 (박 2026-11-14) */
.lc .ds-sec { display: flex; flex-direction: column; gap: 14px; background: #fff; border-radius: 16px; padding: 14px 14px 16px; box-shadow: 0 1px 2px rgba(15, 23, 42, .06); }
.lc .ds-st { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 800; }
.lc .ds-st i { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--lc-navy); color: #fff; font-size: 12px; font-style: normal; }
.lc .ds-st small { margin-left: auto; font-size: 12.5px; font-weight: 600; color: var(--lc-muted); }
.lc .ds-g3 { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 14px; }
.lc .ds-g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lc .ds-fld-s { height: 42px; }
.lc .ds-fld-s input { font-size: 16px; }
.lc .lc-seg.ds-seg2 { padding: 3px; border-radius: 12px; }
.lc .lc-seg.ds-seg2 button { min-height: 40px; padding: 0 8px; border-radius: 9px; text-align: center; }
.lc .lc-seg.ds-seg2 button b { font-size: 15px; }
.lc .lc-seg.ds-seg2 button b { white-space: nowrap; }
.lc .lc-seg.ds-seg2 button.on::after { display: none; }
/* 스트레스 배지 (입력 바로 아래, 지금 적용될 값) */
.lc .ds-stb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 10px 12px; border-radius: 12px; background: #fff7ed; border: 1px solid #fed7aa; font-size: 13.5px; }
.lc .ds-stb b { color: #c2410c; font-size: 15px; }
.lc .ds-stb.zero { background: var(--lc-soft); border-color: var(--lc-line); }
.lc .ds-stb.zero b { color: var(--lc-muted); }
/* 물음표 + 출처 한 줄 */
.lc .ds-q { flex: none; display: inline-grid; place-items: center; width: 18px; height: 18px; margin-left: 2px; padding: 0; border: 1px solid #c7d2fe; border-radius: 50%; background: #eef2ff; color: #3730a3; font-size: 11px; font-weight: 800; line-height: 1; vertical-align: 1px; }
.lc .ds-q[aria-expanded="true"] { background: #3730a3; color: #fff; border-color: #3730a3; }
.lc .ds-src { flex-basis: 100%; margin-top: 2px !important; font-size: 11.5px; line-height: 1.55; color: #4b5563; }
.lc .ds-src::before { content: "근거 · "; font-weight: 700; color: #3730a3; }
.lc .ds-src.ds-tbd::before { content: "확인 중 · "; color: #b45309; }
.lc .ds-src[hidden] { display: none; }
.lc .ds-src.ds-exp::before { content: "설명 · "; }
.lc .lc-f > .ds-src { margin-top: -4px !important; }
/* 기존 대출 카드 */
.lc .ds-loans { display: flex; flex-direction: column; gap: 10px; }
.lc .ds-loan { border: 1px solid #e3e8ee; border-radius: 14px; background: #f7f9fb; padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.lc .ds-lt { display: flex; align-items: center; gap: 8px; }
.lc .ds-lt .ds-n { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: #f1f3f5; font-size: 12px; font-weight: 800; color: #3d444d; }
.lc .ds-sel { height: 36px; padding: 0 28px 0 10px; border: 1px solid #d0d7de; border-radius: 10px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23656d76' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 10px center; -webkit-appearance: none; appearance: none; font: inherit; font-size: 14px; font-weight: 600; color: #1f2328; min-width: 0; }
.lc .ds-lt .ds-sel:first-of-type { font-weight: 800; }
.lc .ds-del { margin-left: auto; flex: none; width: 30px; height: 30px; border: 0; border-radius: 9px; background: transparent; color: #8b949e; font-size: 18px; }
.lc .ds-del:hover { background: #fef2f2; color: #dc2626; }
.lc .ds-lg { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 8px; }
.lc .ds-lf { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.lc .ds-lf > span { font-size: 12px; font-weight: 700; color: var(--lc-muted); }
.lc .ds-lf .lc-fld { height: 38px; padding: 0 10px; border-radius: 10px; gap: 4px; }
.lc .ds-lf .lc-fld input { font-size: 15px; }
.lc .ds-lf .lc-fld > span { font-size: 13px; }
.lc .ds-lf .ds-sel { height: 38px; width: 100%; }
.lc .ds-lx { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.lc .ds-lx .ds-lf { flex: 1 1 140px; }
.lc .ds-chk { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: #3d444d; }
.lc .ds-chk input { margin-top: 3px; }
.lc .ds-ln { font-size: 12px; color: var(--lc-muted); }
.lc .ds-add { width: 100%; border-style: dashed; color: var(--lc-blue-ink); }
/* 결과 */
.lc .ds-pass { white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; padding: 2px 9px; border-radius: 999px; font-size: 13px; font-weight: 800; vertical-align: 6px; letter-spacing: 0; }
.lc .ds-pass.ok { background: #d1fae5; color: #047857; }
.lc .ds-pass.no { background: #fee2e2; color: #b91c1c; }
.lc .ds-pass.na { background: #e5e7eb; color: #4b5563; }
.lc .ds-big-ok { color: #047857; }
.lc .ds-big-no { color: #b91c1c; }
.lc .ds-gauge { position: relative; margin-top: 16px; height: 12px; border-radius: 999px; background: #dcdfe4; }   /* 회색 조금 진하게 → 흰 기준선이 빈 칸에서도 보이게 (박 2026-11-14) */
.lc .ds-gauge > b { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: #10b981; }
.lc .ds-gauge.no > b { background: #ef4444; }
/* 기준선: 막대 안에만 2px 흰 틈 + 아래 ▲ + 글자 (막대 밖으로 삐져나오던 4px 검은 막대 대신, 박 2026-11-14) */
.lc .ds-gauge > i { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #fff; }
.lc .ds-gauge > s { position: absolute; top: 15px; margin-left: -5px; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 6px solid #1f2328; }
.lc .ds-gauge > em { position: absolute; top: 21px; transform: translateX(-50%); font-size: 11.5px; line-height: 1.4; font-style: normal; font-weight: 700; color: #1f2328; white-space: nowrap; }
.lc .ds-gl { display: flex; justify-content: space-between; margin-top: 9px; font-size: 11px; line-height: 1.5; color: var(--lc-muted); }
.lc .ds-gl.h0 > span:first-child { visibility: hidden; }   /* 기준 글자가 왼쪽 끝 가까이(15% 안)면 '0%' 숨김 */
.lc .ds-stbn { flex-basis: 100%; font-size: 12.5px; color: #92400e; }
/* 한도를 늘리려면 (실제로 바꿀 수 있는 조건만) */
.lc .ds-tips { margin-top: 30px; padding: 11px 14px 12px; border-radius: 12px; background: #f0fdf4; border: 1px solid #bbf7d0; font-size: 13.5px; color: #1f2328; }
.lc .ds-tips-h { margin: 0 0 4px !important; font-size: 13px; font-weight: 800; color: #047857; }
.lc .ds-tip { position: relative; padding-left: 12px; line-height: 1.6; }
.lc .ds-tip::before { content: "·"; position: absolute; left: 2px; font-weight: 800; color: #047857; }
.lc .ds-tip + .ds-tip { margin-top: 4px !important; }
.lc .ds-tip b { font-weight: 800; }
.lc .ds-say { margin-top: 12px !important; font-size: 15px; line-height: 1.6; color: #1f2328; }
.lc .ds-say b { font-weight: 800; color: #1f2328; }
/* 색 규칙 (박 2026-11-14): 초록 = 기준 이하·여유 / 빨강 = 초과·줄어듦 / 파랑 = 넣은 값 / 검정 굵게 = 참고 금액 */
.lc b.cg { color: #047857 !important; }
.lc b.cr { color: #b91c1c !important; }
.lc b.cb { color: #1d4ed8 !important; }
.lc .ds-say .nw { white-space: nowrap; }
.lc .ds-rules { display: flex; flex-direction: column; padding: 0 2px 8px; }
.lc .ds-rule { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; padding: 10px 14px; font-size: 14px; }
.lc .ds-rule + .ds-rule { border-top: 1px solid #f0f2f4; }
.lc .ds-rule > .ds-mk { flex: none; width: 18px; font-weight: 800; text-align: center; }
.lc .ds-rule > .ds-mk.y { color: #2563eb; }
.lc .ds-rule > .ds-mk.n { color: #9aa4ae; }
.lc .ds-rule > .ds-rt { flex: 1 1 0; min-width: 0; }
.lc .ds-rule > .ds-src { padding-left: 26px; }
.lc .ds-rt b { font-weight: 800; }
.lc .ds-rt .o { color: #c2410c; font-weight: 800; }
/* 대출별 내역 */
.lc .ds-bd { padding: 2px 16px 14px; }
.lc .ds-bi { display: flex; align-items: baseline; gap: 10px; padding: 10px 0; }
.lc .ds-bi + .ds-bi { border-top: 1px solid #f0f2f4; }
.lc .ds-bi > div { flex: 1; min-width: 0; }
.lc .ds-bi b { display: block; font-size: 14.5px; }
.lc .ds-bi > div > span { display: block; margin-top: 1px; font-size: 12.5px; color: var(--lc-muted); }
.lc .ds-bi span .o { color: #c2410c; font-weight: 700; white-space: nowrap; }
.lc .ds-bi .nw { white-space: nowrap; }
.lc .ds-bi > strong { flex: none; font-size: 15.5px; font-weight: 800; white-space: nowrap; }
/* 새 대출 줄만 파랑 (박 2026-11-14: 칸 색 = 새 대출 · 주황 글씨 = 스트레스 붙음) */
.lc .ds-bi.new { margin: 4px -10px; padding: 10px 10px 10px 9px; border-left: 3px solid #2563eb; border-radius: 0 10px 10px 0; background: #eff6ff; }
.lc .ds-bi.new + .ds-bi, .lc .ds-bi + .ds-bi.new { border-top-color: transparent; }
.lc .ds-bh { display: flex; justify-content: space-between; padding: 8px 0 6px; border-bottom: 1px solid var(--lc-line); font-size: 12px; font-weight: 700; color: var(--lc-muted); }
.lc .ds-bi .cr { color: #1f2328; font-weight: 800; }
.lc .ds-bi.sum { border-top: 2px solid #1f2328 !important; }
.lc .ds-bi.sum b, .lc .ds-bi.sum strong { font-size: 15.5px; }
.lc .ds-tbd-list { padding: 4px 16px 16px; font-size: 13px; color: #3d444d; }
.lc .ds-tbd-list li { margin: 0 0 6px 18px !important; list-style: disc; }
.lc .lc-accs .lc-acc + div + .lc-acc, .lc .lc-accs > .lc-acc + .lc-acc { border-top: 1px solid var(--lc-line); }
.lc .lc-accs > div[hidden] { display: none; }
.lc .lc-accs > div:not([hidden]) + .lc-acc { border-top: 1px solid var(--lc-line); }
.lc .lc-accs > ul + .lc-acc { border-top: 1px solid var(--lc-line); }   /* "실제 한도…" 목록 다음 줄(규칙)에도 선 */
@media (max-width: 600px) {
  .lc .ds-head { padding-bottom: 16px; }
  .lc .ds-g3 { grid-template-columns: 1fr 1fr; }
  .lc .ds-g3 > .lc-f:first-child { grid-column: 1 / -1; }
  .lc .ds-g2 { grid-template-columns: 1fr; }
  .lc .ds-lg { grid-template-columns: 1fr 1fr; }
  .lc .ds-lg > .ds-lf:first-child { grid-column: 1 / -1; }   /* 폰: 잔액·한도는 한 줄 다 (큰 금액이 잘리지 않게) */
  .lc .ds-loan { padding: 11px 12px 12px; }
  .lc .ds-lt .ds-sel { font-size: 13.5px; padding-right: 24px; }
  .lc .ds-pass { font-size: 12px; vertical-align: 4px; }
  .lc .ds-bd { padding: 2px 14px 12px; }
}
/* 새 대출 아래 묶음 (갚는 방식 · 담보 종류 · 집 있는 곳 · 금리 바뀌는 방식) */
.lc .ds-sub { display: flex; flex-direction: column; gap: 14px; }
.lc .ds-sub:empty { display: none; }
.lc .lc-f[data-vis="fix"] .lc-fld { max-width: 220px; }
.lc .ds-lx .ds-lf.ds-lf-s { flex: 0 1 110px; }
.lc .ds-rt b.b { color: inherit; }
.lc b.kb { color: #1f2328 !important; }
.lc-pill .lc-pl > b.ds-pill-no { color: #fca5a5; }
.lc .ds-lnote { margin: -2px 0 2px !important; }
.lc .ds-bnote { margin: 2px 0 4px !important; padding: 9px 12px; border-radius: 10px; background: #fef2f2; color: #991b1b; font-size: 13px; font-weight: 700; }
@media (max-width: 360px) { .lc .lc-seg.ds-seg2 button { padding: 0 4px; } .lc .lc-seg.ds-seg2 button b { font-size: 13.5px; letter-spacing: -0.02em; } }   /* 320: "주택담보대출"이 두 줄로 갈라지던 것 */
.lc .ds-bi .ds-ntag { display: inline-block; margin: 0 0 4px; padding: 0 7px; border-radius: 999px; background: #dbeafe; color: #1d4ed8; font-size: 11.5px; font-style: normal; font-weight: 700; line-height: 20px; white-space: nowrap; }   /* 넣은 금액: 이름 위에 */
.lc .ds-bi .ds-op { margin-right: 6px; font-style: normal; font-weight: 700; color: #8b949e; }   /* + · = */
.lc .ds-accs2 { margin-top: 16px; }
.lc .ds-bi:has(.ds-ntag) { align-items: flex-start; }
.lc .ds-bi:has(.ds-ntag) > strong { margin-top: 24px; }   /* 넣은 금액 표시가 위에 있어도 금액은 이름 줄과 나란히 */   /* 대출별 내역과 아래(실제 한도·규칙) 떼어 놓기 */
/* 새로 받을 대출 4개(전세대출 추가) — 좁으면 2칸 × 2줄 · 전세대출은 기간 칸을 숨김 (박 2026-11-14) */
.lc .ds-g3:has(> [data-vis="nyrs"][hidden]) { grid-template-columns: 1.4fr 1fr; }
@media (max-width: 520px) {
  .lc .lc-seg.ds-nk { flex-wrap: wrap; }
  .lc .lc-seg.ds-nk button { flex: 1 1 calc(50% - 4px); }
}
