:root{font-family:"Source Sans 3","Segoe UI","Microsoft JhengHei",sans-serif;color:#36271f;background:#fbf8f5;font-size:16px;--ink:#422c22;--orange:#EA5116;--border:#e4d9d1}
*{box-sizing:border-box}body{margin:0}.wrap{max-width:1232px;margin:auto;padding:0 40px}header{background:white;border-bottom:1px solid var(--border)}.mast,.brand,.heading,.actions,.ledger-title,.toolbar,.form-actions,footer,.payment{display:flex;align-items:center}.mast,.heading,.ledger-title,footer{justify-content:space-between}.mast{height:72px}.brand{gap:12px}.brand strong{display:block;color:var(--ink);font:700 1.35rem Georgia,serif}.brand small{color:#745a45;font:italic .9rem Georgia,serif}.brand img{border-radius:9px}.mast-label{font-size:.9rem;color:#705e52}.heading{padding:34px 0 23px;gap:12px}h1,h2,p{margin:0}h1{font-size:clamp(1.8rem,4vw,2.55rem);letter-spacing:.015em}h2{font-size:1.45rem}.actions{gap:8px}
button,select,input{font:inherit}button,select{cursor:pointer}button,select,input:not([type=checkbox]){border:1px solid #cdbeb2;border-radius:7px;padding:8px 13px;background:#fff;color:inherit}button{font-weight:600}button:hover{background:#fff1e3}button.primary{background:var(--ink);border-color:var(--ink);color:#fff}button.primary:hover{background:#62402d}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #FFA726;outline-offset:2px}
.overview{display:grid;grid-template-columns:1.65fr 1fr;border-radius:15px;overflow:hidden;background:var(--ink);color:white}.hero{padding:30px 38px 26px}.total-label{font-size:1.05rem;font-weight:600;color:#fff1e4}.hero-amount{margin:7px 0 18px;display:flex;flex-wrap:wrap;align-items:baseline;gap:10px}.hero-amount strong{font-size:clamp(2rem,4.2vw,3.35rem);font-weight:600;line-height:1.15;font-variant-numeric:tabular-nums}.hero-amount span{color:#f2d4bd;font-size:.95rem}.store{min-height:185px;background:linear-gradient(90deg,rgba(66,44,34,.12),transparent 30%),url("assets/store.webp") center 55%/cover}.progress-track{height:5px;background:#765442;max-width:360px;border-radius:5px;overflow:hidden}.progress-track i{display:block;height:100%;background:#FFA726}#coverage{font-size:.9rem;color:#f8e8d9;margin-top:9px}
.cards{display:grid;grid-template-columns:repeat(3,1fr);margin:14px 0 27px;gap:14px}.card,.ledger{background:white;border:1px solid var(--border);border-radius:12px}.card{padding:19px 22px}.card h3{font-size:1rem;margin:0;display:flex;align-items:center;gap:8px}.card h3:before{content:"";height:14px;width:4px;border-radius:3px;background:var(--stripe)}.card strong{display:block;font-size:1.55rem;line-height:1.35;margin:7px 0 2px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.card small,.ledger-title p,footer,.toolbar #count{color:#746153;font-size:.875rem}.ledger{overflow:hidden}.ledger-title{padding:23px 24px 15px;gap:14px}.ledger-title p{margin-top:4px}.toolbar{gap:20px;padding:0 24px 16px;font-size:.9rem;flex-wrap:wrap}.toolbar label{display:flex;align-items:center;gap:8px}.toolbar #count{margin-left:auto}input[type=checkbox]{accent-color:var(--ink);width:17px;height:17px}select{appearance:none;padding-right:34px;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='10' viewBox='0 0 15 10'%3E%3Cpath d='m2 2 5 5 5-5' fill='none' stroke='%23705849' stroke-width='1.6'/%3E%3C/svg%3E") right 11px center/14px no-repeat}
.table-wrap{overflow:auto}table{border-collapse:collapse;width:100%;font-variant-numeric:tabular-nums}td,th{padding:11px 9px;border-top:1px solid #ebe2db;text-align:right;white-space:nowrap}td:first-child,th:first-child{text-align:left;padding-left:24px;white-space:normal}th:last-child,td:last-child{padding-right:24px}td:first-child{min-width:180px}thead th{font-size:.9rem;color:#625247;font-weight:600;background:#f7f2ec}thead small{font-size:.72rem}td .note{display:block;font-size:.85rem;color:#715e51;font-weight:400;margin-top:3px;overflow-wrap:anywhere}.group th:first-child{background:#f8efe5;color:#6b4229;font-size:.91rem;padding-top:9px;padding-bottom:9px}.estimate{font-size:.85rem;color:#884918}.edit{color:var(--ink);font-size:.875rem;padding:5px 10px}.empty{color:#776352}.payment{gap:15px 30px;justify-content:flex-end;flex-wrap:wrap;background:#faf4ed;padding:15px 24px;font-size:.9rem}.payment b{margin-left:5px}.sr{position:absolute;clip-path:inset(50%);width:1px;height:1px;overflow:hidden}footer{font-size:.85rem;padding:21px 0 35px}
dialog{border:1px solid var(--border);border-radius:15px;padding:24px;width:min(440px,94vw);color:inherit;max-height:90vh}dialog::backdrop{background:#39271ba6}dialog h2{margin-bottom:13px}dialog label{display:grid;gap:4px;margin:9px 0;font-size:.9rem;font-weight:600}dialog input,dialog select{width:100%;min-width:0;font-weight:400}.pair{display:grid;grid-template-columns:1fr 1fr;gap:12px}.form-actions{gap:8px;justify-content:flex-end;margin-top:18px}#remove{margin-right:auto;color:#913b29}
@media(max-width:760px){.wrap{padding:0 16px}.mast{height:60px}.heading{align-items:flex-start;flex-wrap:wrap;padding:23px 0 15px}.actions button{font-size:.875rem}.overview{grid-template-columns:1.6fr 1fr}.hero{padding:21px 16px}.store{min-height:145px}.cards{gap:6px;margin:9px 0 16px}.card{padding:12px 8px}.card h3{font-size:.86rem;gap:4px}.card strong{font-size:1.1rem}.card small{font-size:.78rem}.ledger-title{padding:16px 12px}.ledger-title h2{font-size:1.25rem}.toolbar{padding:0 12px 12px;gap:8px}.toolbar #count{margin-left:0}.payment{justify-content:flex-start}.table-wrap table{min-width:670px}.hero-amount{overflow-wrap:anywhere}.hero{min-width:0}.hero-amount strong{max-width:100%}}
@media print{@page{size:A4 landscape;margin:12mm}body{background:white;font-size:10pt}.wrap{max-width:none;padding:0}.mast{height:42px}.brand img{width:32px;height:32px}.heading{padding:10px 0}h1{font-size:20pt}.actions,.store,.progress-track,.toolbar,.primary,.edit,.edit-head,.ledger-title p,dialog,footer{display:none!important}.overview,.hero,.hero-amount span,#coverage,.total-label{background:white;color:black}.overview{display:block;border:1px solid #bbc8bf}.hero{padding:8px 14px}.hero-amount{margin:2px 0}.hero-amount strong{font-size:21pt}.cards{margin:6px 0;gap:6px}.card{padding:6px 14px}.card strong{font-size:14pt}.ledger,.table-wrap{overflow:visible}.ledger-title{padding:7px 14px}.table-wrap table{min-width:0}td,th{padding:4px 8px}.group{break-after:avoid}tr,.card{break-inside:avoid}.payment{border-top:1px solid #999}.note{color:black}thead{display:table-header-group}}

.table-wrap{position:relative}.capital-line{display:flex;gap:6px 22px;flex-wrap:wrap;margin:0 0 14px;color:#fff4eb;font-size:.95rem}.allocation{display:grid;grid-template-columns:156px minmax(0,1fr);align-items:center;gap:26px;margin:16px 0 26px;padding:20px 34px;border:1px solid var(--border);border-radius:14px;background:white}.chart{width:148px;aspect-ratio:1;display:grid;place-items:center;border-radius:50%;background:#eee6df;print-color-adjust:exact;-webkit-print-color-adjust:exact}.chart img{width:67%;height:67%;padding:12%;border-radius:50%;background:white}.allocation h2{font-size:1.18rem}.allocation .cards{margin:8px 0;gap:12px}.allocation .card{padding:6px 0;border:0;border-radius:0}.allocation .card strong{font-size:clamp(1.05rem,2.1vw,1.5rem)}#chart-note{font-size:.85rem;color:#735e50}.primary{box-shadow:inset 3px 0 #EA5116}.brand strong{color:#713114}
@media(max-width:760px){.allocation{grid-template-columns:85px minmax(0,1fr);padding:14px;gap:12px}.chart{width:85px}.allocation .cards{grid-template-columns:1fr;gap:2px}.allocation .card{display:grid;grid-template-columns:1fr auto;gap:0 4px;align-items:center}.allocation .card small{grid-column:1/-1}.allocation .card strong{margin:0}.hero-amount strong{font-size:clamp(1.65rem,5.9vw,2.8rem)}.capital-line{font-size:.85rem}.store{min-height:0}}
@media(max-width:500px){.overview{grid-template-columns:minmax(0,1fr) 24%}.store{background-position:54% center}.hero-amount{gap:6px}.allocation{grid-template-columns:66px minmax(0,1fr)}.chart{width:66px}}
@media print{.allocation{grid-template-columns:85px 1fr;padding:6px 14px;margin:6px 0;break-inside:avoid}.chart{width:78px}.allocation .cards{margin:2px 0}.allocation .card strong{font-size:12pt}.capital-line{color:black;margin:3px 0}#chart-note{font-size:9pt}.card h3:before{print-color-adjust:exact}}
.stock{border:1px solid var(--border);border-radius:12px;background:#fff9f2;margin:0 0 20px;padding:14px 20px;color:#513b2c}.stock summary{cursor:pointer;font-weight:700}.stock summary b{margin-left:12px;color:#893809}.stock p{max-width:85ch;margin:10px 0;line-height:1.6}.stock a{color:#8a3b13}.stock button{margin-top:4px}@media print{.stock button{display:none}}