:root{color-scheme:light;--bg: #f4f5f4;--card: #ffffff;--text: #1c211d;--muted: #6d756f;--line: #e3e7e3;--green: #3f6b52;--green-soft: #e7f2eb;--green-press: #31543f;--danger: #8a4b3c;font-family:PingFang TC,Noto Sans TC,Microsoft JhengHei,sans-serif;color:var(--text);background:var(--bg)}*{box-sizing:border-box}body{margin:0;min-height:100dvh;background:var(--bg);overflow-x:hidden}button,input{font:inherit}button{border:0;background:transparent;color:inherit;cursor:pointer}.app{width:min(480px,100%);min-height:100dvh;margin:0 auto;background:var(--bg);overflow-x:hidden}.page{padding:calc(16px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom) + var(--keyboard-inset, 0px))}.with-tabs .page{padding-bottom:calc(128px + env(safe-area-inset-bottom))}html.keyboard-open .with-tabs .page{padding-bottom:calc(24px + env(safe-area-inset-bottom) + var(--keyboard-inset, 0px))}html.keyboard-open .tabbar,html.keyboard-open .add-bar{display:none}h1{margin:0;font-size:20px;font-weight:650}.month-bar,.page-header{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:16px}.month-bar button,.page-header button{min-width:64px;min-height:44px;color:var(--green);font-size:15px}.daily-quote{margin:0 0 16px;padding:14px 16px;background:var(--green-soft);border-radius:16px;overflow-wrap:anywhere}.daily-quote-title,.daily-quote-body,.daily-quote-foot{margin:0;overflow-wrap:anywhere}.daily-quote-title{margin-bottom:8px;color:var(--green);font-size:14px;font-weight:650;line-height:1.4}.daily-quote-body{color:var(--text);font-size:17px;font-weight:400;line-height:1.6}.daily-quote-foot{margin-top:10px;color:var(--green);font-size:12px;line-height:1.5}.summary{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:16px;padding:16px 8px;background:var(--card);border:1px solid var(--line);border-radius:16px}.summary div{min-width:0;text-align:center}.summary span{display:block;margin-bottom:6px;color:var(--muted);font-size:13px}.summary strong{font-size:16px;font-weight:650;overflow-wrap:anywhere}.notice,.status,.confirm-box{margin-bottom:12px;padding:12px;background:var(--green-soft);border-radius:12px}.notice{display:flex;align-items:center;justify-content:space-between;gap:8px}.notice p,.status,.confirm-box p{margin:0}.notice button,.confirm-box button{min-height:44px;margin-left:8px;padding:0 12px;background:var(--card);border-radius:999px;color:var(--green)}.records{display:flex;flex-direction:column;gap:8px}.record{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:64px;padding:12px;text-align:left;background:var(--card);border:1px solid var(--line);border-radius:14px}.record span{display:flex;flex-direction:column;gap:2px}.record strong{font-size:15px}.record em{color:var(--muted);font-style:normal;font-size:13px}.record b{font-size:16px;overflow-wrap:anywhere}.income{color:var(--green)}.empty{margin:24px 0;color:var(--muted);text-align:center;line-height:1.6}.add-bar{position:fixed;z-index:2;left:0;right:0;bottom:calc(64px + env(safe-area-inset-bottom));display:flex;justify-content:center;padding:0 16px}.add-button{width:min(448px,100%);min-height:48px;background:var(--green);color:#fff;border-radius:14px;font-size:17px}.add-button:active{background:var(--green-press)}.tabbar{position:fixed;z-index:2;left:50%;bottom:0;transform:translate(-50%);display:grid;grid-template-columns:repeat(3,1fr);width:min(480px,100%);background:var(--card);border-top:1px solid var(--line);padding-bottom:env(safe-area-inset-bottom)}.tabbar a{min-height:52px;display:flex;align-items:center;justify-content:center;color:var(--muted);text-decoration:none}.tabbar a.active{color:var(--green);font-weight:650}.amount-field,.line-field{display:block;margin-bottom:12px}.amount-field span,.line-field span{display:block;margin-bottom:6px;color:var(--muted);font-size:13px}.amount-field input,.line-field input{width:100%;min-height:48px;padding:8px 12px;font-size:16px;scroll-margin:16px 0 24px;color:var(--text);background:var(--card);border:1px solid var(--line);border-radius:12px}.amount-field input{font-size:32px}.segment{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:12px}.segment.three{grid-template-columns:repeat(3,minmax(0,1fr))}.segment button{min-height:44px;background:var(--card);border:1px solid var(--line);border-radius:12px}.segment button.active{background:var(--green-soft);color:var(--green);border-color:transparent}.hint{color:var(--muted);font-size:14px}.form-error{color:var(--danger)}.categories{display:grid;grid-template-columns:1fr 1fr;gap:8px}.category-choice{display:flex;flex-direction:column;gap:4px}.category-choice .category{width:100%}.category-choice em{color:var(--muted);font-style:normal;font-size:12px;text-align:center}.category{min-height:48px;background:var(--card);border:1px solid var(--line);border-radius:12px}.category.selected{background:var(--green-soft);color:var(--green);border-color:transparent}.edit-actions{margin-top:16px}.primary,.danger,.text-danger{width:100%;min-height:48px;border-radius:12px}.primary{background:var(--green);color:#fff}.primary.secondary{background:var(--card);color:var(--green);border:1px solid var(--line)}.stack-button{margin-top:8px}.file-input{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}.confirm-box{display:grid;grid-template-columns:1fr 1fr;gap:8px}.confirm-box p{grid-column:1 / -1}.confirm-box button{width:100%;margin:0}.danger{background:var(--danger);color:#fff}.text-danger{margin-top:8px;color:var(--danger)}.group-label{margin:16px 0 8px;color:var(--muted);font-size:13px}.save-snapshot{margin-top:8px}h2{margin:28px 0 12px;font-size:16px}.snapshot-card{margin-bottom:8px;padding:12px;background:var(--card);border:1px solid var(--line);border-radius:14px}.snapshot-card p{margin:4px 0}.snapshot-actions{display:flex;gap:8px;margin-top:8px}.snapshot-actions button{min-height:44px;padding:0 12px;background:var(--bg);border-radius:999px;color:var(--green)}.snapshot-actions .primary{width:auto;background:var(--green);color:#fff}.date-range{margin-bottom:8px}.pie-layout{display:flex;flex-direction:column;align-items:center;gap:12px;margin-bottom:8px;padding:16px;background:var(--card);border:1px solid var(--line);border-radius:16px}.pie-layout svg{width:140px;height:140px}.slice-list{display:flex;flex-direction:column;gap:8px;width:100%}.slice{display:flex;align-items:center;gap:8px;width:100%;min-height:44px;padding:8px 12px;text-align:left;background:var(--card);border:1px solid var(--line);border-radius:12px}.slice.selected{background:var(--green-soft);border-color:transparent}.slice i{width:12px;height:12px;flex:0 0 auto;border-radius:999px}.slice span{flex:1;min-width:0}.slice b,.slice em{font-style:normal;overflow-wrap:anywhere}.slice em{color:var(--muted)}.category-list{display:flex;flex-direction:column;gap:8px;margin-top:16px}.category-row{padding:12px;background:var(--card);border:1px solid var(--line);border-radius:14px}.settings-link{display:flex;flex-direction:column;align-items:flex-start;gap:4px;width:100%;min-height:64px;margin-bottom:8px;padding:14px 16px;text-align:left;background:var(--card);border:1px solid var(--line);border-radius:14px}.settings-link-title{color:var(--text);font-size:16px;font-weight:650}.settings-link-note{color:var(--muted);font-size:14px}.category-fold{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:48px;margin-top:8px;padding:0 4px;color:var(--text);font-size:16px;font-weight:650}.category-fold:after{content:"展開";color:var(--green);font-size:14px;font-weight:400}.category-fold.open:after{content:"收合"}.category-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}.category-heading strong{display:flex;flex:1 1 auto;align-items:center;justify-content:space-between;gap:8px;min-width:0;overflow-wrap:anywhere}.category-menu-button{flex:0 0 auto;width:44px;height:44px;background:var(--bg);border-radius:12px;color:var(--text);font-size:22px;line-height:1}.category-menu{display:flex;flex-direction:column;gap:4px;margin-top:8px}.category-menu button{width:100%;min-height:44px;padding:0 12px;text-align:left;background:var(--bg);border-radius:10px;color:var(--text)}.category-add{width:100%;min-height:44px;background:var(--green-soft);color:var(--green);border-radius:12px;font-weight:650}.category-editor{scroll-margin:16px 0 24px}.category-edit-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.4fr);gap:8px}.category-edit-actions button{min-height:44px}.category-row em{color:var(--muted);font-style:normal;font-size:13px;font-weight:400}.category-row .line-field{margin-bottom:8px}.category-row .snapshot-actions{flex-wrap:wrap}.net-worth{margin-top:28px}
