/* 대여금·판결금 이자 변제충당 계산기 (2026-10-24 개편: 기준일, 여러 채권, 변제충당) */
.rc-hero { padding: 56px 0 28px; }
.rc-hero .h2-crumb { margin-bottom: 28px; }
.rc-h1 { font-size: clamp(30px, 4.2vw, 48px); line-height: 1.2; font-weight: 700; letter-spacing: -.035em; margin: 0; }
.rc-lead { font-size: 17px; line-height: 1.7; color: var(--h2-sub); margin: 16px 0 0; max-width: 720px; word-break: keep-all; }

.rc-tool { padding: 12px 0 72px; }
.rc-app { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 28px; align-items: start; }
.rc-app * { box-sizing: border-box; }
.rc-panel { background: #fff; border: 1px solid var(--h2-line); border-radius: 22px; padding: 26px 26px 24px; }
.rc-side { position: sticky; top: 92px; }

.rc-label { display: block; font-size: 15px; font-weight: 700; color: var(--h2-ink); margin: 24px 0 10px; }
.rc-panel > .rc-label:first-child { margin-top: 0; }
.rc-label-row { margin: 26px 0 10px; }
.rc-label-row .rc-label { margin: 0; }
.rc-hint { font-size: 14px; color: var(--h2-sub); margin: 4px 0 0; line-height: 1.5; }
.rc-input { width: 100%; height: 54px; border: 1.5px solid var(--h2-line); border-radius: 14px; padding: 0 16px; font: inherit; font-size: 17px; color: var(--h2-ink); background: #fbf9f5; transition: border-color .2s, background .2s; }
.rc-input:focus { outline: none; border-color: var(--h2-navy); background: #fff; }
.rc-money { position: relative; }
.rc-money .rc-input { padding-right: 44px; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.rc-money span { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--h2-sub); font-weight: 600; }
.rc-help { min-height: 20px; margin: 8px 2px 0; font-size: 14px; color: var(--h2-accent-dark); font-weight: 600; }

/* 구간 */
.rc-period { border: 1.5px solid var(--h2-line); border-radius: 16px; padding: 14px 16px 16px; margin-bottom: 10px; background: #fdfcf9; transition: border-color .2s; }
.rc-period.is-err { border-color: var(--h2-accent); background: #fff6f2; }
.rc-ph { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.rc-ph b { font-size: 14px; color: var(--h2-navy); }
.rc-del { border: 0; background: none; color: var(--h2-sub); font: inherit; font-size: 14px; cursor: pointer; padding: 4px 6px; border-radius: 8px; }
.rc-del:hover { color: var(--h2-accent-dark); background: var(--h2-tint); }
.rc-pgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.rc-pgrid > div { min-width: 0; }
.rc-pgrid label, .rc-rate-l { display: block; font-size: 13px; color: var(--h2-sub); margin-bottom: 5px; font-weight: 600; }
.rc-period input[type="date"], .rc-period input[type="number"] { width: 100%; height: 46px; border: 1.5px solid var(--h2-line); border-radius: 12px; padding: 0 12px; font: inherit; font-size: 16px; color: var(--h2-ink); background: #fff; min-width: 0; -webkit-appearance: none; appearance: none; }
.rc-period input:focus { outline: none; border-color: var(--h2-navy); }
.rc-period.is-err .p-rate:placeholder-shown { border-color: var(--h2-accent); }
.rc-rate { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.rc-rate-in { position: relative; width: 120px; flex: none; }
.rc-rate-in input { padding-right: 30px !important; }
.rc-rate-in span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--h2-sub); font-size: 15px; }
.rc-quick { display: flex; gap: 6px; flex-wrap: wrap; }
.rc-quick button { height: 36px; padding: 0 12px; border: 1px solid var(--h2-line); border-radius: 999px; background: #fff; font: inherit; font-size: 14px; font-weight: 600; color: var(--h2-ink); cursor: pointer; transition: all .15s; }
.rc-quick button:hover { border-color: var(--h2-navy); }
.rc-quick button[aria-pressed="true"] { background: var(--h2-navy); border-color: var(--h2-navy); color: #fff; }
.rc-perr { margin: 10px 0 0; font-size: 14px; color: var(--h2-accent-dark); font-weight: 600; }
.rc-add { width: 100%; height: 48px; border: 1.5px dashed var(--h2-line); border-radius: 14px; background: none; font: inherit; font-size: 15px; font-weight: 700; color: var(--h2-navy); cursor: pointer; transition: border-color .2s, background .2s; }
.rc-add:hover { border-color: var(--h2-navy); background: var(--h2-bg); }

/* 기준일 */
.rc-asof { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding-bottom: 20px; border-bottom: 1px solid var(--h2-line); }
.rc-asof .rc-label { margin: 0 0 4px; }
.rc-asof .rc-hint { margin: 0; }
.rc-asof-in { display: flex; gap: 8px; align-items: center; flex: none; }
.rc-asof-in .rc-input { width: 180px; height: 48px; font-size: 16px; font-weight: 700; -webkit-appearance: none; appearance: none; }
.rc-chip { height: 40px; padding: 0 14px; border: 1px solid var(--h2-line); border-radius: 999px; background: #fff; font: inherit; font-size: 14px; font-weight: 700; color: var(--h2-navy); cursor: pointer; }
.rc-chip:hover { border-color: var(--h2-navy); }

/* 채권 카드 */
.rc-claim { border: 1.5px solid var(--h2-line); border-radius: 18px; padding: 16px 18px 18px; margin-bottom: 12px; background: #fff; }
.is-multi .rc-claim { border-color: #c9c0b0; }
.rc-ch { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.rc-ch-num { flex: none; font-size: 13px; font-weight: 800; color: #fff; background: var(--h2-navy); border-radius: 999px; padding: 5px 11px; }
.c-title { flex: 1; min-width: 0; height: 36px; border: 0; border-bottom: 1.5px solid transparent; background: none; font: inherit; font-size: 15px; font-weight: 700; color: var(--h2-ink); padding: 0 2px; }
.c-title:focus { outline: none; border-bottom-color: var(--h2-navy); }
.c-title::placeholder { font-weight: 500; color: #a09686; }
.rc-cdel { border: 0; background: none; color: var(--h2-sub); font: inherit; font-size: 14px; cursor: pointer; padding: 4px 6px; border-radius: 8px; flex: none; }
.rc-cdel:hover { color: var(--h2-accent-dark); background: var(--h2-tint); }
.rc-sub { display: block; font-size: 14px; font-weight: 700; color: var(--h2-ink); margin: 0 0 8px; }
.rc-claim .rc-label-row { margin: 18px 0 8px; }
.rc-claim .rc-label-row .rc-sub { margin: 0; }
.rc-claim .rc-money .rc-input { height: 50px; }
.rc-add-sm { height: 42px; font-size: 14px; }
.rc-period input.p-end:disabled { background: var(--h2-tint); color: var(--h2-sub); border-style: dashed; }
.rc-open { display: flex !important; align-items: center; gap: 6px; margin: 6px 0 0 !important; font-size: 13px !important; color: var(--h2-navy) !important; cursor: pointer; }
.rc-open input { width: 15px; height: 15px; accent-color: var(--h2-navy); margin: 0; }

/* 갚은 돈·비용 */
.rc-check-l { padding: 0; min-height: 0; font-size: 15px; font-weight: 700; }
.rc-check-l input { width: 20px; height: 20px; }
.rc-label-row .rc-check-l + .rc-hint { margin-top: 6px; }
.rc-pay { border: 1.5px solid var(--h2-line); border-radius: 16px; padding: 14px 16px 16px; margin-bottom: 10px; background: #fdfcf9; }
.rc-pay .rc-money-sm .rc-input { height: 46px; font-size: 16px; font-weight: 700; border-radius: 12px; }
.rc-money-sm span { right: 12px; }
.rc-target { margin-top: 10px; }
.rc-target label { display: block; font-size: 13px; color: var(--h2-sub); margin-bottom: 5px; font-weight: 600; }
.rc-target select { width: 100%; height: 42px; border: 1.5px solid var(--h2-line); border-radius: 12px; padding: 0 12px; font: inherit; font-size: 15px; color: var(--h2-ink); background: #fff; }
.rc-costs { margin-top: 12px; border: 1px dashed var(--h2-line); border-radius: 14px; padding: 0 14px; }
.rc-costs summary { cursor: pointer; padding: 12px 0; font-size: 14px; font-weight: 700; color: var(--h2-navy); list-style: none; }
.rc-costs summary::-webkit-details-marker { display: none; }
.rc-costs summary::before { content: '+ '; color: var(--h2-accent); }
.rc-costs[open] summary::before { content: '− '; }
.rc-costs .rc-add-sm { margin: 8px 0 14px; }
.rc-cost { border: 1.5px solid var(--h2-line); border-radius: 16px; padding: 14px 16px 16px; margin-bottom: 10px; background: #fdfcf9; }
.rc-cost .k-name { width: 100%; height: 42px; border: 1.5px solid var(--h2-line); border-radius: 12px; padding: 0 12px; font: inherit; font-size: 15px; color: var(--h2-ink); background: #fff; margin-bottom: 10px; min-width: 0; }
.rc-cost .k-name:focus, .rc-cost input[type="date"]:focus, .rc-pay input[type="date"]:focus { outline: none; border-color: var(--h2-navy); }
.rc-cost input[type="date"], .rc-pay input[type="date"] { width: 100%; height: 46px; border: 1.5px solid var(--h2-line); border-radius: 12px; padding: 0 12px; font: inherit; font-size: 16px; color: var(--h2-ink); background: #fff; min-width: 0; -webkit-appearance: none; appearance: none; }
.rc-cost .rc-money-sm .rc-input { height: 46px; font-size: 16px; font-weight: 700; border-radius: 12px; }
#cost-box .rc-add-sm { margin-bottom: 4px; }

/* 결과 요약·표 */
.rc-sum { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,.15); }
.rc-sum b { display: block; font-size: 18px; margin-top: 2px; letter-spacing: -.01em; }
.rc-k-head { display: block; margin: 16px 0 8px; }
.rc-table { margin-top: 14px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.rc-table table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 1.5; white-space: nowrap; }
.rc-table th, .rc-table td { padding: 8px 8px; text-align: right; border-bottom: 1px solid rgba(255,255,255,.14); vertical-align: top; }
.rc-table th { font-weight: 600; color: rgba(255,255,255,.7); font-size: 12px; }
.rc-table th:first-child, .rc-table td:first-child { text-align: left; padding-left: 0; }
.rc-table th:last-child, .rc-table td:last-child { padding-right: 0; }
.rc-table td b { color: #ffb79f; }
.rc-table small { color: rgba(255,255,255,.65); }
.rc-copies { display: flex; gap: 6px; }

/* 옵션 */
.rc-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rc-seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--h2-tint); border-radius: 999px; padding: 4px; }
.rc-seg label { position: relative; cursor: pointer; }
.rc-seg input { position: absolute; opacity: 0; pointer-events: none; }
.rc-seg span { display: flex; align-items: center; justify-content: center; height: 38px; border-radius: 999px; font-size: 14px; font-weight: 700; color: var(--h2-sub); text-align: center; line-height: 1.2; padding: 0 6px; transition: background .15s, color .15s; }
.rc-seg input:checked + span { background: var(--h2-navy); color: #fff; }
.rc-seg input:focus-visible + span { outline: 2px solid var(--h2-accent); outline-offset: 1px; }
.rc-check { display: flex; align-items: center; gap: 8px; padding: 0 12px; font-size: 14px; font-weight: 600; color: var(--h2-ink); cursor: pointer; min-height: 46px; }
.rc-check input { width: 18px; height: 18px; accent-color: var(--h2-navy); margin: 0; }

.rc-actions { display: flex; gap: 10px; margin-top: 26px; }
.rc-main { flex: 1; height: 58px; border: 0; border-radius: 999px; background: var(--h2-accent); color: #fff; font: inherit; font-size: 17px; font-weight: 700; cursor: pointer; transition: background .2s, transform .2s; }
.rc-main:hover { background: var(--h2-accent-dark); transform: translateY(-1px); }
.rc-reset { height: 58px; padding: 0 22px; border: 1.5px solid var(--h2-line); border-radius: 999px; background: #fff; font: inherit; font-size: 15px; font-weight: 700; color: var(--h2-sub); cursor: pointer; }
.rc-reset:hover { border-color: var(--h2-navy); color: var(--h2-navy); }

/* 결과 */
.rc-result { background: var(--h2-navy); color: #fff; border-radius: 22px; padding: 26px; }
.rc-empty { margin: 0; font-size: 16px; line-height: 1.7; color: rgba(255,255,255,.75); padding: 24px 0; text-align: center; word-break: keep-all; }
.rc-empty b { color: #fff; }
.rc-k { font-size: 14px; color: rgba(255,255,255,.7); font-weight: 600; }
.rc-v { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }
.rc-v b { font-size: 20px; font-weight: 700; letter-spacing: -.01em; word-break: break-all; }
.rc-big { padding-bottom: 18px; border-bottom: 1px solid rgba(255,255,255,.15); }
.rc-big .rc-v b { font-size: clamp(30px, 3.4vw, 40px); color: #ffb79f; letter-spacing: -.03em; }
.rc-line { padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.15); }
.rc-copy { flex: none; height: 34px; padding: 0 14px; border: 1px solid rgba(255,255,255,.3); border-radius: 999px; background: none; color: #fff; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; transition: background .15s; }
.rc-copy:hover { background: rgba(255,255,255,.12); }
.rc-warn { margin: 16px 0 0; padding: 12px 14px; border-radius: 12px; background: #fff3ec; color: #8a3014; font-size: 14px; line-height: 1.6; }
.rc-warn p { margin: 0; }
.rc-warn p + p { margin-top: 6px; }
.rc-formula-head { display: flex; justify-content: space-between; align-items: center; margin: 20px 0 10px; }
.rc-formula { margin: 0; max-height: 360px; overflow: auto; background: rgba(255,255,255,.07); border-radius: 12px; padding: 14px; font-family: ui-monospace, 'D2Coding', Menlo, Consolas, monospace; font-size: 13px; line-height: 1.7; color: rgba(255,255,255,.92); white-space: pre-wrap; word-break: keep-all; overflow-wrap: anywhere; }
.rc-caution { margin: 14px 0 0; font-size: 13px; line-height: 1.6; color: rgba(255,255,255,.65); word-break: keep-all; }

.rc-toast { position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 20px); background: var(--h2-ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-size: 15px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 1000; white-space: nowrap; }
.rc-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 안내 */
.rc-info { padding: 8px 0 96px; }
.rc-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 32px; }
.rc-steps b { display: inline-flex; width: 34px; height: 34px; border-radius: 50%; align-items: center; justify-content: center; background: var(--h2-navy); color: #fff; font-size: 15px; margin-bottom: 14px; }
.rc-steps h2 { font-size: 19px; margin: 0 0 8px; letter-spacing: -.02em; }
.rc-steps p { font-size: 16px; line-height: 1.75; color: var(--h2-sub); margin: 0; word-break: keep-all; }
.rc-faq { margin-top: 64px; }
.rc-faq summary { font-size: 17px; padding: 22px 4px; }
.rc-faq .h2-faq-a p { font-size: 16px; line-height: 1.8; color: var(--h2-sub); margin: 0 4px 22px; word-break: keep-all; }
.rc-related { margin-top: 64px; }
.rc-related h2 { font-size: 22px; margin: 0; letter-spacing: -.02em; }
.rc-rel-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 16px; }
.rc-rel-grid a { display: block; text-decoration: none; padding: 18px; border: 1px solid var(--h2-line); border-radius: 16px; background: #fff; transition: border-color .2s, transform .2s; }
.rc-rel-grid a:hover { border-color: var(--h2-accent); transform: translateY(-2px); }
.rc-rel-grid b { display: block; font-size: 15px; }
.rc-rel-grid span { display: block; font-size: 13px; color: var(--h2-sub); margin-top: 4px; }

/* 저장 */
.rc-save { margin-top: 14px; border-top: 1px solid var(--h2-line); padding-top: 12px; }
.rc-save-open { width: 100%; border: 0; background: none; font: inherit; font-size: 14px; font-weight: 700; color: var(--h2-navy); cursor: pointer; padding: 8px 0; text-align: left; }
.rc-save-open::before { content: '+ '; color: var(--h2-accent); }
.rc-save-open[aria-expanded="true"]::before { content: '− '; }
.rc-save-open span { display: inline-block; min-width: 20px; margin-left: 6px; padding: 0 7px; border-radius: 999px; background: var(--h2-tint); font-size: 12px; text-align: center; }
.rc-save-open span:empty { display: none; }
.rc-save-panel > .rc-hint { margin: 4px 0 12px; }
.rc-save-row { display: flex; gap: 8px; margin-bottom: 10px; }
.rc-save-name { flex: 1; min-width: 0; height: 42px; border: 1.5px solid var(--h2-line); border-radius: 12px; padding: 0 12px; font: inherit; font-size: 15px; color: var(--h2-ink); background: #fff; }
.rc-save-name:focus { outline: none; border-color: var(--h2-navy); }
.rc-save-row .rc-chip { height: 42px; padding: 0 18px; }
.rc-chip-on { background: var(--h2-navy); border-color: var(--h2-navy); color: #fff; }
.rc-chip-on:hover { background: var(--h2-ink); }
.rc-save-item { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--h2-line); }
.rc-save-item > div { flex: 1; min-width: 0; }
.rc-save-item b { display: block; font-size: 15px; color: var(--h2-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-save-item small { font-size: 12px; color: var(--h2-sub); }
.rc-save-item .rc-chip { height: 34px; padding: 0 12px; font-size: 13px; }
.rc-save-file { display: flex; gap: 8px; margin-top: 12px; }
.rc-save-file .rc-chip { flex: 1; }

/* 법원식 계산표 */
.rc-court-link { display: inline-block; margin-top: 14px; color: #ffb79f; font-size: 14px; font-weight: 700; text-decoration: none; }
.rc-court-link:hover { text-decoration: underline; }
.rc-court { margin-top: 28px; background: #fff; border: 1px solid var(--h2-line); border-radius: 22px; padding: 26px; scroll-margin-top: 92px; }
.rc-court-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.rc-court-head h2 { font-size: 20px; font-weight: 800; color: var(--h2-ink); margin: 0; }
.rc-court-head .rc-chip { flex: none; }
.rc-court-table { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--h2-line); border-radius: 12px; margin-bottom: 12px; }
.rc-court-table table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 1.5; white-space: nowrap; color: var(--h2-ink); font-variant-numeric: tabular-nums; }
.rc-court-table th, .rc-court-table td { padding: 8px 10px; border-bottom: 1px solid var(--h2-line); text-align: left; }
.rc-court-table th { background: var(--h2-tint); font-size: 12px; font-weight: 700; color: var(--h2-sub); position: sticky; top: 0; }
.rc-court-table .n { text-align: right; }
.rc-court-table th:first-child, .rc-court-table td:first-child { position: sticky; left: 0; background: #fff; z-index: 1; font-weight: 700; }
.rc-court-table th:first-child { background: var(--h2-tint); z-index: 2; }
.rc-court-table tr.cr-sub td { color: var(--h2-sub); }
.rc-court-table tr.cr-sub td, .rc-court-table tr.cr-sub td:first-child { background: #fbf9f5; }
.rc-court-table tr.cr-cost td, .rc-court-table tr.cr-cost td:first-child { background: #fdfcf9; }
.rc-court-table tr.cr-pay td, .rc-court-table tr.cr-pay td:first-child { background: var(--h2-tint); font-weight: 700; }
.rc-court-table tr.cr-pay-sub td:first-child, .rc-court-table tr.cr-end-sub td:first-child { font-weight: 600; }
.rc-court-table tr.cr-end td, .rc-court-table tr.cr-end td:first-child { background: var(--h2-navy); color: #fff; font-weight: 700; border-bottom: 0; }
.rc-court > .rc-hint { margin: 0; }
.rc-swipe { display: none; }

@media (max-width: 960px) {
  .rc-app { grid-template-columns: minmax(0, 1fr); }
  .rc-side { position: static; }
  .rc-rel-grid { grid-template-columns: repeat(2, 1fr); }
  .rc-steps { grid-template-columns: 1fr; gap: 22px; }
}
@media (max-width: 560px) {
  .rc-court { padding: 20px 16px; border-radius: 18px; }
  .rc-court-head h2 { font-size: 18px; }
  .rc-court > .rc-swipe { display: block; margin: 0 0 8px; }
  .h2-wrap { padding: 0 16px; }
  .rc-asof { flex-direction: column; align-items: stretch; }
  .rc-asof-in .rc-input { flex: 1; width: auto; }
  .rc-claim { padding: 14px 12px 14px; }
  .rc-cost { grid-template-columns: minmax(0, 1fr) 120px auto; }
  .rc-sum { grid-template-columns: 1fr; gap: 10px; }
  .rc-copies { flex-direction: column; }
  /* 휴대폰에서는 표를 줄 단위 카드로 */
  .rc-table table, .rc-table tbody, .rc-table tr, .rc-table td { display: block; white-space: normal; }
  .rc-table thead { display: none; }
  .rc-table tr { padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.14); }
  .rc-table td { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; border: 0; text-align: right; }
  .rc-table td::before { content: attr(data-l); color: rgba(255,255,255,.7); flex: none; }
  .rc-table td.rc-td-h { display: block; text-align: left; font-weight: 700; color: #fff; padding-bottom: 6px; }
  .rc-table td.rc-td-h::before { content: none; }
  .rc-hero { padding: 28px 0 16px; }
  .rc-hero .h2-crumb { margin-bottom: 18px; }
  .rc-lead { font-size: 15px; }
  .rc-panel, .rc-result { padding: 20px 16px; border-radius: 18px; }
  .rc-opts { grid-template-columns: 1fr; }
  .rc-period { padding: 12px 12px 14px; }
  .rc-pgrid { gap: 8px; }
  .rc-period input[type="date"] { font-size: 15px; padding: 0 8px; max-width: 100%; }
  .rc-formula { font-size: 12px; padding: 12px; }
  .rc-rate-in { width: 100px; }
  .rc-quick button { padding: 0 10px; }
  .rc-reset { padding: 0 16px; }
}
