*{box-sizing:border-box}body{margin:0;background:#f6f8f5;color:#20302b;font-family:system-ui,-apple-system,"Segoe UI",sans-serif;line-height:1.5}a{color:#176847}button,input{font:inherit}button{cursor:pointer}button:disabled{opacity:.5;cursor:not-allowed}input{min-width:0;width:100%;border:1px solid #cdd8d0;border-radius:9px;padding:11px;background:#fff;color:inherit}input:focus,button:focus-visible,a:focus-visible{outline:3px solid #95ccb0;outline-offset:2px}input[type=number]{appearance:textfield}input::-webkit-inner-spin-button{appearance:none}.calc-shell{max-width:980px;margin:auto;padding:26px 18px 50px}header{margin-bottom:24px}h1{font-size:clamp(1.55rem,4vw,2.1rem);margin:6px 0}h2{font-size:1.1rem;margin:0}.eyebrow{font-size:.72rem;font-weight:800;letter-spacing:.15em;color:#28774f;margin:24px 0 0}.intro,.help,.muted{color:#64756c}.intro{margin:8px 0}.thresholds{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.threshold-card,.panel{background:#fff;border:1px solid #dae3db;border-radius:16px;padding:20px}.threshold-card label{display:block;font-size:.8rem;font-weight:700;margin-bottom:8px}.threshold-card input{font-size:1.2rem;font-weight:750;text-align:right}.threshold-status{font-size:.85rem;min-height:1.5em;margin:10px 0 6px}.reached{color:#127146;font-weight:750}.threshold-card progress{width:100%;height:7px;accent-color:#257951}.totals{position:sticky;top:0;z-index:5;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;background:#193f2e;color:#fff;padding:18px;border-radius:14px;margin:18px 0;box-shadow:0 5px 20px #102c1810}.totals span{display:block;font-size:.8rem;color:#d4e3d9}.totals strong{display:block;font-size:clamp(1rem,3vw,1.6rem);font-variant-numeric:tabular-nums;margin-top:4px;overflow-wrap:anywhere}.eligible strong{color:#c0ed92}.panel{margin:16px 0}.section-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:16px}.section-heading p,.help{font-size:.8rem;margin:6px 0}.section-heading>span{white-space:nowrap;color:#64756c;font-size:.8rem}.row-head,.item-row{display:grid;grid-template-columns:28px minmax(0,1fr) minmax(110px,.55fr) 68px 36px;gap:10px;align-items:center}.row-head{font-size:.75rem;color:#607264;padding:0 0 9px}.item-row{padding:8px 0;border-top:1px solid #eef1ec}.item-row>span{font-size:.75rem;color:#758276}.item-row input.amount{text-align:right;font-variant-numeric:tabular-nums}.exclude-label{display:flex;justify-content:center;align-items:center;min-height:44px;cursor:pointer}.exclude-label input{width:22px;height:22px;accent-color:#257951}.item-row.is-excluded{background:#f6f7f4}.clear-row{border:0;border-radius:8px;background:#f1f4ef;color:#728074;width:36px;height:40px}.button{display:inline-flex;justify-content:center;align-items:center;border:1px solid transparent;border-radius:10px;padding:11px 17px;font-weight:650;min-height:44px}.primary{background:#206d46;color:#fff}.secondary{border-color:#d4dfd5;background:#f7faf6;color:#31523d}.full{width:100%;margin-top:14px}.save-panel>label{display:block;margin-bottom:8px;font-size:.88rem;font-weight:650}.save-actions{display:flex;gap:10px;margin-top:14px}.save-actions .primary{flex:1}#save-status{font-size:.86rem;font-weight:600}#message{font-size:.86rem;color:#196e47}#message.error{color:#b33131}.privacy-note{background:#f2f6ee;border-radius:9px;padding:12px;font-size:.8rem;color:#5c6d60}.history-entry{border-top:1px solid #e4ebe1;padding:14px 0;display:flex;align-items:center;gap:12px;justify-content:space-between}.history-copy{min-width:0;overflow-wrap:anywhere}.history-copy strong{display:block}.history-copy p{margin:4px 0;font-size:.8rem;color:#627463}.history-entry button{flex-shrink:0}.pagination{display:flex;align-items:center;justify-content:center;gap:14px;font-size:.8rem;margin-top:12px}footer{text-align:center;font-size:.85rem;margin-top:24px}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
@media(max-width:600px){.calc-shell{padding:18px 12px 36px}.thresholds{gap:6px}.threshold-card{padding:10px 8px;border-radius:11px}.threshold-card input{font-size:.95rem;padding:8px 3px}.threshold-card label{font-size:.68rem}.threshold-status{font-size:.7rem;min-height:3em}.totals{gap:6px;padding:13px 10px}.totals span{font-size:.68rem}.panel{padding:15px 10px}.row-head,.item-row{grid-template-columns:18px minmax(0,1fr) 96px 44px 28px;gap:5px}.item-row input{padding:10px 6px;font-size:.85rem}.clear-row{width:28px}.row-head{font-size:.65rem}.section-heading{align-items:flex-start}.section-heading p{max-width:240px}.history-copy strong{font-size:.9rem}}
/* 행 작업 버튼은 좁은 화면에서 세로로 배치합니다. */
.row-head,.item-row{grid-template-columns:28px minmax(0,1fr) minmax(110px,.55fr) 68px 84px}
.row-actions{display:flex;gap:4px;align-items:center}
.copy-row{border:1px solid #d4dfd5;border-radius:8px;background:#f1f6ef;color:#31523d;width:44px;min-height:40px;font-size:.75rem;padding:0}
@media(max-width:600px){.row-head,.item-row{grid-template-columns:18px minmax(0,1fr) 96px 40px 40px;gap:4px}.row-actions{flex-direction:column;gap:3px}.copy-row,.row-actions .clear-row{width:40px;min-height:32px;height:32px}.item-row{scroll-margin-top:100px}}
