:root { color-scheme: light; --text:#17191b; --muted:#72777d; --line:#e7e8eb; --light:#f5f6f7; --track:#e4e6e9; }
*, *:before, *:after {box-sizing:border-box}
html {-webkit-text-size-adjust:100%;}
body { margin:0; background:#fff; color:var(--text); font-family:-apple-system,BlinkMacSystemFont,"Hiragino Kaku Gothic ProN","Helvetica Neue",sans-serif; font-size:15px; line-height:1.45; }
button,input { font:inherit; }
button { -webkit-tap-highlight-color:transparent; cursor:pointer; }
.app { max-width:548px; margin:0 auto; padding:calc(27px + env(safe-area-inset-top)) 22px calc(36px + env(safe-area-inset-bottom)); }
.header { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:27px; }
h1 { margin:0; font-size:22px; font-weight:760; letter-spacing:-.035em; }
.reset { border:1px solid var(--line); border-radius:10px; padding:9px 13px; background:#fff; font-size:12px; font-weight:600; color:#585e65; }
.reset:active,.share:active {transform:scale(.985)}
.field-section { display:flex; flex-direction:column; gap:23px; }
.field { border-bottom:1px solid var(--line); padding-bottom:18px; }
.field-heading { display:flex; align-items:baseline; justify-content:space-between; gap:12px; padding-bottom:16px; }
.field-heading label { font-size:14px; font-weight:610; color:#3f454b; }
.field-heading output {font-size:27px; font-weight:740; letter-spacing:-.055em; font-variant-numeric:tabular-nums; white-space:nowrap; }
input[type=range] { display:block; appearance:none; -webkit-appearance:none; width:100%; height:7px; border-radius:999px; border:0; outline:none; background:linear-gradient(to right, #20252a 0%,#20252a var(--fill),var(--track) var(--fill),var(--track) 100%); touch-action:pan-y; margin:4px 0 12px; }
input[type=range]::-webkit-slider-thumb { appearance:none; -webkit-appearance:none; width:25px; height:25px; border-radius:50%; background:#fff; border:2px solid #20252a; box-shadow:0 1px 5px #0000001a; }
input[type=range]::-moz-range-thumb { width:21px; height:21px; border-radius:50%; background:#fff; border:2px solid #20252a; box-shadow:0 1px 5px #0000001a; }
input[type=range]:focus-visible {outline:3px solid #9ba3ac; outline-offset:7px}
.bounds { display:flex; justify-content:space-between; font-size:12px; color:#858a90; }
.simulation { padding-top:24px; }
.method-heading,.result-heading,.metric-title,.breakdown-heading { font-size:13px; font-weight:600; color:#686e75; }
.method { background:var(--light); display:flex; gap:3px; border-radius:13px; padding:4px; margin-top:10px; }
.method-button { width:50%; border:0; border-radius:10px; padding:11px 6px; background:transparent; color:#747981; font-size:14px; font-weight:650; transition:background-color .17s, color .17s, box-shadow .17s; }
.method-button.selected { background:#fff; color:#17191b; box-shadow:0 1px 5px #00000017; }
.result-main {padding:29px 0 23px; border-bottom:1px solid var(--line); }
.result-number { font-size:clamp(43px,13vw,62px); letter-spacing:-.08em; line-height:1.1; font-weight:780; padding-top:7px; font-variant-numeric:tabular-nums; }
.result-extra { min-height:20px; padding-top:8px; font-size:13px; color:var(--muted); }
.result-grid { display:grid; grid-template-columns:1fr 1fr; gap:13px; padding:20px 0 25px; border-bottom:1px solid var(--line); }
.metric { min-width:0; }
.metric-value { font-size:clamp(18px,5.2vw,24px); font-weight:710; line-height:1.3; letter-spacing:-.045em; padding-top:6px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.breakdown { padding:23px 0 22px; }
.breakdown-bar { display:flex; height:13px; width:100%; border-radius:99px; background:#d8dce0; overflow:hidden; margin:15px 0 11px; }
.principal-bar { background:#282d32; height:100%; transition:width .17s ease; }
.interest-bar { flex:1; background:#c4c8ce; }
.legend { display:flex; justify-content:space-between; flex-wrap:wrap; gap:7px 14px; font-size:12px; color:#62676e; }
.legend>span { white-space:nowrap; }
.legend b {font-weight:650; color:#33383e; font-variant-numeric:tabular-nums; }
.dot { display:inline-block; height:8px; width:8px; border-radius:50%; margin-right:4px; }
.dot-dark { background:#282d32; }
.dot-light { background:#c4c8ce; }
.details { border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.details summary { padding:18px 0; display:flex; align-items:center; justify-content:space-between; gap:12px; font-size:14px; font-weight:650; cursor:pointer; list-style:none; }
.details summary::-webkit-details-marker { display:none; }
.details summary::after {content:'⌄'; color:#787f86; font-size:21px; font-weight:400; margin-left:auto; line-height:1; transition:transform .15s; }
.details[open] summary::after { transform:rotate(180deg); }
.details summary span { color:#8c9299; font-weight:400; font-size:12px; }
.table-viewport { max-height:335px; overflow:auto; padding-bottom:8px; -webkit-overflow-scrolling:touch; }
table { border-collapse:collapse; width:100%; font-size:12px; font-variant-numeric:tabular-nums; white-space:nowrap; }
th,td { text-align:right; padding:11px 4px; border-bottom:1px solid #f0f1f3; }
th:first-child,td:first-child { text-align:left; }
th { position:sticky; top:0; background:#fff; color:#7a8087; font-weight:600; }
td { font-weight:510; }
.share { width:100%; border:1px solid var(--line); background:#fff; padding:13px 10px; border-radius:12px; font-size:13px; font-weight:660; margin-top:22px; }
.footnote {font-size:11px; line-height:1.6; color:#8a9097; margin:19px 0 0; }
.toast {position:fixed; bottom:calc(30px + env(safe-area-inset-bottom)); left:50%; transform:translate(-50%,10px); background:#21262b; color:#fff; font-size:13px; padding:12px 19px; border-radius:99px; opacity:0; pointer-events:none; transition:opacity .2s,transform .2s; white-space:nowrap; }
.toast.show { opacity:1; transform:translate(-50%,0); }
@media (max-width:360px) { .app {padding-left:17px; padding-right:17px;} h1 {font-size:20px;} .result-number {font-size:45px;} .legend {font-size:11px;} }
@media (prefers-reduced-motion:reduce) { *,*:before,*:after {transition:none!important; animation:none!important; scroll-behavior:auto!important;} }
