:root{--bg: #f4f5f8;--surface: #ffffff;--surface-muted: #f8fafc;--border: #e5e7eb;--text: #111827;--text-muted: #6b7280;--accent: #4f46e5;--accent-soft: #eef2ff;--danger: #b91c1c;--success: #15803d;--radius-lg: 18px;--radius-md: 12px;--shadow: 0 1px 2px rgba(17, 24, 39, .06), 0 8px 24px rgba(17, 24, 39, .06);color-scheme:light}*{box-sizing:border-box}html,body{margin:0;padding:0}body{min-height:100vh;background:var(--bg);color:var(--text);font-family:Pretendard,-apple-system,BlinkMacSystemFont,Apple SD Gothic Neo,Malgun Gothic,system-ui,sans-serif;-webkit-font-smoothing:antialiased;line-height:1.5}#root{min-height:100vh}button{font:inherit;color:inherit;cursor:pointer}input{font:inherit;color:inherit}h1,h2,p,ol,ul{margin:0}ol,ul{padding:0;list-style:none}.button{border:1px solid var(--border);background:var(--surface);border-radius:10px;padding:10px 16px;font-weight:600;transition:background .15s ease,border-color .15s ease}.button:hover{background:var(--surface-muted)}.button:disabled{opacity:.6;cursor:progress}.button--primary{width:100%;border-color:transparent;background:var(--accent);color:#fff;padding:14px 16px;font-size:16px}.button--primary:hover{background:#4338ca}.button--ghost{padding:8px 12px;font-size:13px;color:var(--text-muted)}.button--small{padding:6px 12px;font-size:13px}.icon-button{border:1px solid var(--border);background:var(--surface);border-radius:999px;width:32px;height:32px;line-height:1;font-size:18px;display:inline-flex;align-items:center;justify-content:center}.badge{display:inline-flex;align-items:center;border-radius:999px;background:var(--accent-soft);color:var(--accent);font-size:12px;font-weight:600;padding:4px 10px;white-space:nowrap}.segmented{display:inline-flex;background:#eef0f4;border-radius:999px;padding:3px;gap:2px}.segmented-item{border:0;background:transparent;border-radius:999px;padding:7px 14px;font-size:13px;font-weight:600;color:var(--text-muted)}.segmented-item.is-active{background:var(--surface);color:var(--text);box-shadow:0 1px 2px #1118271f}.app-loading{min-height:100vh;display:grid;place-items:center;color:var(--text-muted)}.auth-screen{min-height:100vh;display:grid;place-items:center;padding:24px}.auth-card{width:100%;max-width:400px;background:var(--surface);border-radius:var(--radius-lg);border:1px solid var(--border);box-shadow:var(--shadow);padding:28px 24px 24px;display:flex;flex-direction:column;gap:20px}.auth-brand{text-align:center;display:flex;flex-direction:column;gap:6px}.auth-logo{font-size:34px}.auth-brand h1{font-size:22px;letter-spacing:-.02em}.auth-subtitle{color:var(--text-muted);font-size:14px}.auth-form{display:flex;flex-direction:column;gap:14px}.field{display:flex;flex-direction:column;gap:6px}.field-label{font-size:13px;font-weight:600;color:var(--text-muted)}.field input{border:1px solid var(--border);border-radius:10px;padding:12px 14px;font-size:15px;background:var(--surface-muted)}.field input:focus{outline:2px solid var(--accent-soft);border-color:var(--accent);background:#fff}.form-message{font-size:13px;border-radius:10px;padding:10px 12px}.form-message--error{background:#fef2f2;color:var(--danger)}.form-message--notice{background:#f0fdf4;color:var(--success)}.auth-hint{font-size:12px;color:var(--text-muted);text-align:center;line-height:1.6}.app-shell{min-height:100vh;max-width:720px;margin:0 auto;padding-bottom:84px;display:flex;flex-direction:column}.app-header{position:sticky;top:0;z-index:10;background:#f4f5f8f0;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border-bottom:1px solid var(--border);padding:14px 16px 12px;display:flex;flex-direction:column;gap:12px}.app-header-top{display:flex;align-items:center;justify-content:space-between;gap:12px}.app-identity{display:flex;align-items:center;gap:10px;min-width:0}.app-logo{font-size:24px}.app-name{font-weight:700;letter-spacing:-.02em}.app-user{font-size:12px;color:var(--text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.period-bar{display:flex;flex-wrap:wrap;align-items:center;gap:10px}.payday-field{display:inline-flex;align-items:center;gap:6px;font-size:13px}.payday-label,.payday-unit{font-size:13px;color:var(--text-muted)}.payday-field input{width:56px;border:1px solid var(--border);border-radius:8px;padding:6px 8px;text-align:center;background:var(--surface)}.period-nav{display:flex;align-items:center;gap:8px;flex:1 1 100%}.period-label{flex:1;text-align:center;font-weight:700;font-size:15px;font-variant-numeric:tabular-nums}.period-meta{font-size:12px;color:var(--text-muted);flex:1 1 100%}.app-main{padding:16px;display:flex;flex-direction:column;gap:16px}.tab-panel{display:flex;flex-direction:column;gap:16px}.panel-title{font-size:18px;letter-spacing:-.01em}.panel-description{font-size:13px;color:var(--text-muted);margin-top:-8px}.metric-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.metric-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-md);padding:14px;box-shadow:var(--shadow)}.metric-label{font-size:12px;color:var(--text-muted)}.metric-value{font-size:22px;font-weight:700;margin:4px 0 2px;letter-spacing:-.02em}.metric-hint{font-size:11px;color:var(--text-muted)}.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);padding:16px;box-shadow:var(--shadow)}.card-header{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:6px 8px;margin-bottom:12px}.card-header h2{font-size:15px;letter-spacing:-.01em;flex-shrink:0;white-space:nowrap}.card-subtitle{font-size:12px;color:var(--text-muted)}.notice-card h2{font-size:15px;margin-bottom:8px}.notice-card p{font-size:13px;color:var(--text-muted);line-height:1.7}.calendar-grid{display:flex;flex-direction:column;gap:4px}.calendar-row{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}.calendar-cell{position:relative;min-height:44px;border-radius:10px;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:13px;font-variant-numeric:tabular-nums}.calendar-head-cell{min-height:24px;font-size:11px;color:var(--text-muted);font-weight:600}.calendar-head-cell.is-sat{color:#2563eb}.calendar-head-cell.is-sun{color:#dc2626}.calendar-cell.is-in-period{background:var(--accent-soft);color:#312e81;font-weight:600}.calendar-cell.is-outside{color:#cbd5e1}.calendar-cell.is-today{outline:2px solid var(--accent);outline-offset:-2px}.calendar-cell.is-period-start,.calendar-cell.is-period-end{background:var(--accent);color:#fff}.calendar-day-number{line-height:1.1}.calendar-month-tag{font-size:9px;opacity:.75;margin-top:1px}.feature-list,.manage-list{display:flex;flex-direction:column;gap:8px}.feature-item,.manage-item{display:flex;align-items:center;gap:12px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-md);padding:14px}.feature-item>div,.manage-body{flex:1;min-width:0}.feature-title,.manage-title{font-size:14px;font-weight:600}.feature-description,.manage-description{font-size:12px;color:var(--text-muted);margin-top:2px;word-break:keep-all}.manage-index{width:26px;height:26px;border-radius:999px;background:var(--accent-soft);color:var(--accent);display:inline-flex;align-items:center;justify-content:center;font-size:13px;font-weight:700;flex-shrink:0}.tab-bar{position:fixed;bottom:0;left:0;right:0;z-index:10;display:flex;justify-content:center;gap:4px;background:#fffffff5;border-top:1px solid var(--border);padding:8px 12px calc(8px + env(safe-area-inset-bottom));-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.tab-button{flex:1;max-width:160px;border:0;background:transparent;border-radius:10px;padding:8px 4px;display:flex;flex-direction:column;align-items:center;gap:2px;font-size:11px;color:var(--text-muted)}.tab-button.is-active{color:var(--accent);background:var(--accent-soft);font-weight:700}@media (min-width: 560px){.metric-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}.home,.add-page{display:flex;flex-direction:column;gap:16px}.data-warning{font-size:12px;color:var(--danger);background:#fef2f2;border-radius:10px;padding:10px 12px}.metric-value.is-negative{color:var(--danger)}.metric-card--wide{grid-column:span 2}.progress{height:6px;border-radius:999px;background:var(--surface-muted);overflow:hidden;margin:6px 0 4px}.progress-fill{height:100%;background:var(--accent);border-radius:999px;transition:width .25s ease}.progress-fill.is-over{background:var(--danger)}.budget-summary-row{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:13px;color:var(--text-muted);padding:0 4px}.budget-summary-text{font-variant-numeric:tabular-nums}.inline-form{display:flex;flex-wrap:wrap;align-items:flex-end;gap:10px}.field--grow{flex:1 1 140px}.field-row{display:flex;flex-wrap:wrap;gap:10px}.field-row>.field{flex:1 1 120px}.field span{font-size:12px;color:var(--text-muted);font-weight:600}.field select{border:1px solid var(--border);border-radius:10px;padding:11px 12px;font-size:15px;background:var(--surface-muted);color:var(--text)}.field select:focus{outline:2px solid var(--accent-soft);border-color:var(--accent);background:#fff}.comparison-total-row{display:flex;align-items:baseline;justify-content:space-between;gap:10px;flex-wrap:wrap}.comparison-total{font-size:22px;font-weight:700;letter-spacing:-.02em}.comparison-diff{font-size:13px;font-weight:700;font-variant-numeric:tabular-nums;color:var(--text-muted)}.comparison-diff.is-up{color:var(--danger)}.comparison-diff.is-down{color:var(--success)}.comparison-list{list-style:none;padding:0;margin:12px 0 0;display:flex;flex-direction:column;gap:8px}.comparison-item{display:grid;grid-template-columns:1fr auto;align-items:baseline;gap:2px 10px;font-size:13px;padding-top:8px;border-top:1px solid var(--border)}.comparison-name{font-weight:600}.comparison-amounts{grid-column:1 / -1;color:var(--text-muted);font-size:12px;font-variant-numeric:tabular-nums}.comparison-arrow{opacity:.5}.comparison-change{font-size:12px;font-weight:700;font-variant-numeric:tabular-nums;text-align:right;white-space:nowrap}.comparison-change.is-up{color:var(--danger)}.comparison-change.is-down{color:var(--success)}button.calendar-cell{border:1px solid transparent;background:transparent;padding:2px;cursor:pointer}button.calendar-cell:disabled{cursor:default}button.calendar-cell.is-in-period:hover{outline:2px solid var(--accent);outline-offset:-2px}button.calendar-cell.is-selected{box-shadow:inset 0 0 0 2px var(--accent)}.calendar-cell.has-spend .calendar-day-number{font-weight:700}.calendar-day-amount{font-size:9px;line-height:1.2;color:#4338ca;font-weight:700;margin-top:1px;font-variant-numeric:tabular-nums}button.calendar-cell.is-outside .calendar-day-amount{color:transparent}button.calendar-cell.is-period-start .calendar-day-amount,button.calendar-cell.is-period-end .calendar-day-amount{color:#fff}.tx-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:10px}.tx-item{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:10px;border-top:1px solid var(--border)}.tx-item:first-child{border-top:0;padding-top:0}.tx-main{min-width:0}.tx-merchant{font-size:14px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tx-meta{font-size:12px;color:var(--text-muted);overflow:hidden;text-overflow:ellipsis}.tx-amount{font-size:14px;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}.tx-amount.is-income{color:var(--success)}.trend-chart{display:flex;flex-direction:column;gap:8px}.trend-svg{width:100%;height:auto;overflow:visible}.trend-axis{stroke:var(--border);stroke-width:1}.trend-line{stroke:#c7d2fe;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.trend-bar-rect{fill:#c7d2fe;transition:fill .15s ease}.trend-bar.is-active .trend-bar-rect,.trend-bar:hover .trend-bar-rect{fill:var(--accent)}.trend-value{font-size:9px;fill:var(--text-muted);font-variant-numeric:tabular-nums}.trend-label{font-size:10px;fill:var(--text-muted)}.trend-bar.is-active .trend-label{fill:var(--accent)}.trend-label.is-active{fill:var(--accent);font-weight:700}.trend-tooltip{font-size:12px;color:var(--text-muted);text-align:center;font-variant-numeric:tabular-nums}.chart-empty{font-size:13px;color:var(--text-muted)}.favorite-grid{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:10px}.favorite-item{position:relative}.favorite-button{width:100%;border:1px solid var(--border);background:var(--surface-muted);border-radius:var(--radius-md);padding:14px 12px;display:flex;flex-direction:column;align-items:flex-start;gap:4px;text-align:left}.favorite-button:hover{border-color:var(--accent)}.favorite-button:disabled{opacity:.6}.favorite-label{font-size:13px;font-weight:700}.favorite-amount{font-size:12px;color:var(--text-muted);font-variant-numeric:tabular-nums}.favorite-delete{position:absolute;top:-6px;right:-6px;width:24px;height:24px;border-radius:999px;border:1px solid var(--border);background:var(--surface);color:var(--danger);font-size:12px;line-height:1;display:grid;place-items:center}.stack-form{display:flex;flex-direction:column;gap:12px;margin-top:12px}.toggle-row{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--text)}.toggle-row input{width:18px;height:18px;accent-color:var(--accent)}.split-box{border:1px dashed var(--border);border-radius:var(--radius-md);padding:12px;display:flex;flex-direction:column;gap:10px;background:var(--surface-muted)}.split-summary{font-size:12px;color:#3730a3;background:var(--accent-soft);border-radius:8px;padding:8px 10px;font-variant-numeric:tabular-nums}.auto-category{font-size:12px;color:var(--accent);background:var(--accent-soft);border-radius:8px;padding:8px 10px}.rule-list{list-style:none;padding:0;margin:0 0 12px;display:flex;flex-direction:column;gap:8px}.rule-item{display:flex;align-items:center;gap:8px;font-size:13px;background:var(--surface-muted);border-radius:10px;padding:8px 10px}.rule-pattern{font-weight:700;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rule-arrow{color:var(--text-muted)}.rule-category{flex:1;color:var(--text-muted)}.suggestion-block{margin-top:12px;display:flex;flex-direction:column;gap:8px}.chip-row{display:flex;flex-wrap:wrap;gap:8px}.chip{border:1px solid var(--border);background:var(--surface);border-radius:999px;padding:6px 12px;font-size:12px;color:var(--text)}.chip:hover{border-color:var(--accent);color:var(--accent)}.toast{position:fixed;left:50%;bottom:88px;transform:translate(-50%);z-index:20;background:#111827eb;color:#fff;font-size:13px;padding:10px 16px;border-radius:999px;box-shadow:var(--shadow);max-width:calc(100% - 32px);text-align:center}.manage-page,.manage-section{display:flex;flex-direction:column;gap:14px}.manage-section-head{display:flex;align-items:flex-start;gap:12px}.manage-section-head .manage-title{font-size:16px}.manage-block{display:flex;flex-direction:column;gap:10px;border-top:1px dashed var(--border);padding-top:12px}.manage-section>.manage-block:first-of-type{border-top:none;padding-top:0}.manage-block-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px 8px}.manage-subtitle{font-size:13px;font-weight:700;letter-spacing:-.01em}.manage-metrics{display:flex;flex-wrap:wrap;gap:6px}.manage-amount{font-size:13px;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}.manage-item--column{flex-direction:column;align-items:stretch;gap:8px}.manage-select{font:inherit;font-size:12px;font-weight:600;padding:6px 8px;border:1px solid var(--border);border-radius:8px;background:var(--surface)}.summary-list{display:flex;flex-direction:column;gap:6px}.summary-item{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;font-size:12px;background:var(--surface-muted);border-radius:var(--radius-md);padding:8px 10px}.manage-page .toggle-row{flex-shrink:0}.manage-item-title{font-size:14px;font-weight:600;word-break:keep-all}.manage-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:6px}.manage-actions .button{width:auto;flex:0 0 auto}.manage-actions .button--primary{font-size:13px;padding:6px 12px}.reconcile-page{display:flex;flex-direction:column;gap:16px;padding-bottom:104px}.reconcile-upload{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:12px}.reconcile-upload-button{position:relative;overflow:hidden}.reconcile-file-input{position:absolute;top:0;right:0;bottom:0;left:0;opacity:0;cursor:pointer}.reconcile-password-form{margin-top:12px}.reconcile-files,.reconcile-issues{display:flex;flex-direction:column;gap:6px;margin-top:12px;font-size:12px;color:var(--text-muted)}.reconcile-files li{display:flex;flex-wrap:wrap;align-items:center;gap:6px}.reconcile-file-name{color:var(--text);font-weight:600;word-break:break-all}.reconcile-issues li{background:var(--surface-muted);border-radius:var(--radius-md);padding:8px 10px;color:var(--danger)}.reconcile-metric-grid{grid-template-columns:repeat(auto-fit,minmax(110px,1fr))}.reconcile-list{display:flex;flex-direction:column;gap:8px}.reconcile-item{display:flex;align-items:flex-start;gap:10px;background:var(--surface-muted);border:1px solid var(--border);border-radius:var(--radius-md);padding:10px 12px}.reconcile-item input[type=checkbox]{width:18px;height:18px;margin-top:2px;flex-shrink:0;accent-color:var(--accent)}.reconcile-body{flex:1;min-width:0}.reconcile-title{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:4px 10px;font-size:14px;font-weight:600;word-break:keep-all}.reconcile-amount{font-variant-numeric:tabular-nums}.reconcile-description{margin-top:2px;font-size:12px;color:var(--text-muted);word-break:keep-all}.reconcile-category{flex-shrink:0;max-width:130px;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--surface);padding:6px 8px;font-size:12px}.reconcile-item--split{border-color:var(--accent);background:var(--accent-soft)}.reconcile-deposits{display:flex;flex-direction:column;gap:2px;margin-top:6px;font-size:12px;color:var(--text)}.reconcile-deposits li:before{content:"↳ ";color:var(--accent)}.reconcile-memo{margin-top:6px;font-size:11px;color:var(--text-muted);word-break:break-all}.reconcile-item--excluded{opacity:.92}.reconcile-reason{flex-shrink:0;font-size:11px;font-weight:600;border-radius:999px;padding:4px 8px;white-space:nowrap;background:#f1f5f9;color:#475569}.reconcile-reason--cancelled{background:#fef2f2;color:var(--danger)}.reconcile-reason--duplicate{background:#fff7ed;color:#c2410c}.reconcile-reason--own-transfer{background:#eff6ff;color:#1d4ed8}.reconcile-reason--card-payment{background:#f0fdf4;color:var(--success)}.reconcile-restore{display:inline-flex;align-items:center;gap:4px;flex-shrink:0;font-size:12px;color:var(--text-muted);cursor:pointer}.reconcile-restore input{width:16px;height:16px;accent-color:var(--accent)}.reconcile-actions{position:sticky;bottom:76px;display:flex;align-items:center;justify-content:space-between;gap:12px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:var(--shadow);padding:12px 16px}.reconcile-selection{font-size:13px;font-weight:600;font-variant-numeric:tabular-nums}@media (max-width: 480px){.reconcile-item{flex-wrap:wrap}.reconcile-category{max-width:none;width:100%}}
