:root{--bg:#f6f5f0;--ink:#243d35;--green:#285745;--muted:#7b857c;--line:#e6e8df;--orange:#bd7544}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:"Segoe UI","Microsoft JhengHei",sans-serif;font-size:14px}button,input,select{font:inherit}button{cursor:pointer;border:1px solid var(--line);background:white;color:var(--ink);padding:11px 16px;border-radius:12px}button:hover{filter:brightness(.96)}button:focus-visible,a:focus-visible{outline:3px solid #be9c5d}button.primary{background:var(--green);color:white;border-color:var(--green)}aside{position:fixed;inset:0 auto 0 0;width:224px;background:#fffefa;border-right:1px solid var(--line);padding:38px 24px;display:flex;flex-direction:column}.brand{display:flex;gap:12px;align-items:center;font-size:25px;font-weight:650;letter-spacing:3px}.brand b{display:grid;place-items:center;background:var(--green);color:#fff;border-radius:15px;width:48px;height:48px;font-size:26px}.brand small{display:block;font-size:8px;letter-spacing:1.3px;margin-top:6px;color:var(--muted)}nav{display:grid;gap:10px;margin-top:54px}nav button{text-align:left;background:transparent;border:0;padding:15px 18px;color:var(--muted);display:flex;align-items:center;gap:15px}nav button.active{background:#eaf0e7;color:var(--green);font-weight:700}nav button span{font-size:20px}.aside-foot{margin-top:auto;font-size:13px;line-height:2;color:#889286}.aside-foot small{display:block;font-size:10px;margin-top:24px}main{max-width:1490px;margin-left:224px;padding:42px 48px 20px}.eyebrow{font-size:10px;letter-spacing:2px;color:#929b8d}.heading{display:flex;align-items:center;justify-content:space-between;gap:15px}h1{font-size:30px;letter-spacing:1px;margin:14px 0 8px}p{color:var(--muted);line-height:1.7;margin:0}h2{font-size:17px;margin:0}h3{font-size:15px;margin:0}.toolbar{display:flex;justify-content:space-between;align-items:center;margin:28px 0 20px}.badge{font-size:11px;color:#86927c;background:#eaf0e3;padding:7px 11px;border-radius:8px}input,select{border:1px solid var(--line);border-radius:9px;padding:10px;background:#fff;color:var(--ink);min-width:0}input[type=month]{max-width:160px}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.stat{background:white;border:1px solid var(--line);border-radius:18px;padding:24px}.stat.featured{background:var(--green);color:#fff;border-color:var(--green);position:relative;overflow:hidden}.stat.featured:after{content:'◎';position:absolute;font-size:160px;right:-27px;bottom:-64px;color:#ffffff0b}.stat label{font-size:12px;color:var(--muted)}.stat.featured label,.stat.featured small{color:#c3d5c5}.stat strong{display:block;font-size:31px;letter-spacing:-1px;margin:16px 0}.stat small{color:var(--muted);font-size:11px}.split{display:grid;grid-template-columns:1.25fr 1fr;gap:20px;margin-top:22px}.panel{background:white;border:1px solid var(--line);border-radius:18px;padding:24px}.section-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:18px}.section-head small{font-size:11px;color:var(--muted)}.count{background:#f3eadb;color:#976538;padding:5px 10px;border-radius:20px;font-size:11px}.row{display:flex;align-items:center;gap:12px;padding:17px 0;border-top:1px solid #eff0e9}.house-icon{width:40px;height:40px;border-radius:12px;background:#f1f3e9;display:grid;place-items:center;font-size:20px;flex-shrink:0}.row-info{flex:1;min-width:0}.row-info small{display:block;color:var(--muted);font-size:11px;margin-top:7px}.amount{font-weight:650;white-space:nowrap}.row button{padding:8px 11px;font-size:12px}.row .amount{margin-right:4px}.overdue{color:#b36c4d!important}.reminder{background:#f9f7ee;border-radius:12px;padding:14px;margin-top:10px;border-left:3px solid #c5ad78}.reminder p{font-size:11px;margin-top:6px}.reminder .section-head{margin:0}.reminder button{padding:7px 10px;font-size:11px}.chart{height:168px;display:flex;align-items:stretch;gap:18px;padding-top:12px;border-bottom:1px solid var(--line)}.chart-col{flex:1;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:8px}.bars{display:flex;gap:5px;height:132px;align-items:flex-end;width:100%;justify-content:center}.bar{width:20px;border-radius:5px 5px 0 0;background:#6d9176;min-height:2px}.bar.expense{background:#d9b78b}.chart-col small{font-size:10px;color:var(--muted);margin-bottom:-22px}.legend{display:flex;gap:16px;justify-content:flex-end;font-size:10px;color:var(--muted)}.legend i{display:inline-block;width:8px;height:8px;border-radius:2px;background:#6d9176;margin-right:5px}.legend i.expense{background:#d9b78b}.chart-panel{padding-bottom:42px}.ratio-wrap{display:flex;align-items:center;justify-content:space-around;gap:15px;padding:20px 0}.donut{width:130px;height:130px;border-radius:50%;display:grid;place-items:center}.donut div{background:white;width:100px;height:100px;border-radius:50%;display:grid;place-content:center;text-align:center}.donut strong{font-size:23px}.donut small{font-size:10px;color:var(--muted);margin-top:4px}.ratio-list p{font-size:12px;margin:12px 0}.ratio-list strong{display:block;font-size:19px;color:var(--ink)}footer{font-size:10px;text-align:center;letter-spacing:1px;color:#a2a899;padding:35px 0 16px}.property-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:20px}.property{background:#fff;border:1px solid var(--line);border-radius:18px;overflow:hidden}.property-top{padding:22px;background:#edf1e8}.property-top p{font-size:12px;margin-top:10px}.property-body{padding:22px}.pill{font-size:10px;background:#e5eddf;padding:4px 8px;border-radius:6px;color:var(--green);display:inline-block}.details{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin:20px 0}.details small{display:block;color:var(--muted);font-size:11px;margin-bottom:7px}.details strong{font-size:18px}.subsidy{border-top:1px solid var(--line);padding-top:15px;font-size:11px;color:var(--muted)}progress{width:100%;height:7px;accent-color:var(--green);margin:10px 0}.ledger-filter{display:flex;gap:10px;margin-bottom:20px;flex-wrap:wrap}.ledger .row{padding:19px 0}.positive{color:#397651}.negative{color:#b87550}.empty{padding:30px;text-align:center;color:var(--muted)}.settings{max-width:650px}.settings p{font-size:13px;margin:10px 0 20px}.settings button{margin:0 8px 10px 0}dialog{border:1px solid var(--line);border-radius:20px;padding:25px;width:min(94vw,520px);max-height:90vh;color:var(--ink)}dialog::backdrop{background:#162e2766;backdrop-filter:blur(3px)}.modal-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}.icon{border:0;padding:8px}.field{display:grid;gap:6px;margin-bottom:13px}.field label{font-size:12px;color:var(--muted)}.field input,.field select{width:100%}.actions{display:flex;justify-content:flex-end;gap:10px;margin-top:22px}#toast{position:fixed;bottom:90px;left:50%;transform:translateX(-50%);background:var(--ink);color:white;padding:13px 22px;border-radius:12px;display:none;z-index:10}.note{font-size:11px;color:var(--muted);line-height:1.8;margin-top:14px}a{color:var(--green)}@media(min-width:1500px){main{margin-right:auto}}@media(max-width:1100px){main{padding:30px 25px}.split{grid-template-columns:1fr}.property-grid{grid-template-columns:1fr}.stat{padding:20px}.stat strong{font-size:27px}}@media(max-width:700px){aside{width:auto;inset:auto 0 0;height:74px;padding:0 12px;z-index:5;border-right:0;border-top:1px solid var(--line);background:#fffefaf5;padding-bottom:env(safe-area-inset-bottom)}.brand,.aside-foot{display:none}nav{display:flex;justify-content:space-around;margin:0;gap:0;height:100%}nav button{display:flex;flex-direction:column;gap:3px;justify-content:center;align-items:center;font-size:10px;padding:8px 18px;border-radius:0}nav button.active{background:transparent;color:var(--green)}nav button span{font-size:22px}main{margin:0;padding:28px 18px 80px}h1{font-size:25px;letter-spacing:0}.heading>button{font-size:12px;padding:10px 12px;white-space:nowrap}.heading p{font-size:12px}.eyebrow{font-size:9px}.toolbar{margin:22px 0 16px}.stats{gap:10px;grid-template-columns:1fr 1fr}.stat{padding:17px;border-radius:15px}.stat.featured{grid-column:1/-1}.stat.featured strong{font-size:38px;margin:14px 0}.stat strong{font-size:24px;margin:12px 0}.stat label{font-size:11px}.stat small{font-size:10px}.split{gap:16px;margin-top:16px}.panel{padding:19px;border-radius:16px}.row{gap:9px}.row h3{font-size:13px}.house-icon{width:34px;height:36px}.row .amount{font-size:13px}.row button{padding:8px;font-size:11px}.row-info small{font-size:10px}.property-grid{gap:16px}.property-top,.property-body{padding:20px}.chart{gap:12px}.bar{width:16px}footer{padding:25px 0 8px}}
/* 手機優先：全尺寸底部導覽與清晰收支色彩 */
:root{--bg:#f2f5ff;--ink:#18264b;--green:#5145e5;--muted:#586582;--line:#dce3f2;--orange:#e05a28}
body{padding-bottom:env(safe-area-inset-bottom)}
aside{inset:auto 0 0;width:100%;height:calc(76px + env(safe-area-inset-bottom));padding:0 16px env(safe-area-inset-bottom);z-index:5;border:0;border-top:1px solid #dce3f2;background:#fffffff5;box-shadow:0 -4px 24px #233ca30d;display:block}
.brand,.aside-foot{display:none}
nav{display:flex;justify-content:space-around;gap:8px;margin:0 auto;height:76px;max-width:650px}
nav button{flex:1;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:3px;font-size:12px;padding:7px 10px;border-radius:14px;color:#586582;margin:7px 0}
nav button span{font-size:24px;line-height:1.1}
nav button.active{background:#eceaff;color:#4935d8;font-weight:750}
main{margin:0 auto;max-width:1120px;padding:36px 32px 100px}
.eyebrow{color:#6556d8}.heading p{color:#586582}h1{color:#1c2852}
button.primary{background:#5145e5;border-color:#5145e5;box-shadow:0 4px 10px #5145e51c}
button:focus-visible,a:focus-visible{outline:3px solid #786bff;outline-offset:2px}
.badge{background:#e8eaff;color:#4935c3}
.stat{box-shadow:0 5px 18px #233ca308;border:1px solid #dce3f2}
.stat.featured{background:linear-gradient(120deg,#6246ed,#3e5be9);border:0;box-shadow:0 8px 22px #5145e52b}
.stat.featured label,.stat.featured small{color:#f0edff}.stat.featured:after{color:#ffffff12}
.stat:not(.featured):nth-child(2){background:#e8fbf3;border-color:#b8ecd6}
.stat:not(.featured):nth-child(2) label,.stat:not(.featured):nth-child(2) strong{color:#08754c}
.stat:not(.featured):nth-child(3){background:#fff0eb;border-color:#ffd1c0}
.stat:not(.featured):nth-child(3) label,.stat:not(.featured):nth-child(3) strong{color:#bb3b1b}
.stat small{color:#526277}.stat label{font-weight:650}
.panel,.property{box-shadow:0 4px 18px #233ca305}.count{background:#ffead1;color:#a54d04;font-weight:650}
.house-icon{background:#edeaff;color:#5640db}.row{border-color:#e8ecf5}.row button{background:#eeebff;border-color:#d9d2ff;color:#4c36c5;font-weight:650;min-height:38px}
.row .amount{color:#4935cf}.overdue{color:#d13e35!important;font-weight:600}
.reminder{background:#fff6e5;border-left-color:#ffac24}.reminder p{color:#765328}.reminder button{color:#a64e00;background:#fff;border-color:#f0cb84}
.bar,.legend i{background:#09ae77}.bar.expense,.legend i.expense{background:#fb704a}
.chart-col small{color:#586582}.ratio-list p:first-child strong{color:#08754c}.ratio-list p:last-child strong{color:#bb3b1b}
.property-top{background:#eeecff}.pill{background:#dedaff;color:#4d35bb}.details strong{color:#4935cf}
.positive{color:#08754c!important}.negative{color:#bf3e1d!important}progress{accent-color:#6650ec}
footer{color:#64718d}.note,.subsidy{color:#586582}
@media(max-width:700px){main{padding:25px 18px 100px}.heading{gap:10px}h1{font-size:22px;line-height:1.45}.heading>div{min-width:0}.heading>button{flex-shrink:0}nav button{font-size:11px;padding:7px 10px}.stat.featured strong{font-size:40px}.stat strong{font-weight:750}.stats{gap:12px}.row-info small{font-size:11px}.stat small{font-size:11px}.stat label{font-size:12px}.section-head small{font-size:11px}}
/* Account connection and cloud status */
.cloud-account{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:24px;padding:15px 17px;background:#fff;border:1px solid #dcd6ff;border-radius:15px;box-shadow:0 3px 12px #5145e508}
.cloud-person{display:flex;align-items:center;gap:11px;min-width:0}.cloud-person>div{min-width:0}.cloud-avatar{display:grid;place-items:center;width:35px;height:35px;flex-shrink:0;background:#eeebff;border-radius:11px;color:#5145e5;font-size:20px;font-weight:750}.cloud-person strong{display:block;font-size:13px;overflow-wrap:anywhere}.cloud-person small{display:block;font-size:11px;color:#596585;line-height:1.7;margin-top:4px;overflow-wrap:anywhere}.cloud-account>button{flex-shrink:0;background:#5145e5;color:white;border-color:#5145e5;font-size:12px;min-height:40px}.cloud-warning{background:#fff6e5;border-color:#edb855}.cloud-settings{margin-bottom:20px}.cloud-status{padding:10px;background:#f2f0ff;border-radius:9px;font-size:12px!important;overflow-wrap:anywhere}.google-login b{background:#fff;color:#4285f4;padding:3px 6px;border-radius:5px;margin-right:7px}button:disabled{opacity:.55;cursor:wait}
@media(max-width:700px){.cloud-account{margin-top:20px;padding:13px 12px;gap:8px}.cloud-person{gap:8px}.cloud-person strong{font-size:12px}.cloud-avatar{width:31px;height:33px}.cloud-account>button{padding:9px 12px}.cloud-settings button{font-size:12px}}
