*{box-sizing:border-box}body{margin:0;font-family:system-ui,-apple-system,Hiragino Sans,Noto Sans JP,sans-serif;background:#f6f7f9;color:#1a1d21;line-height:1.6}main{max-width:640px;margin:0 auto;padding:24px 16px calc(80px + env(safe-area-inset-bottom))}h1{font-size:1.4rem}h2{font-size:1.05rem;margin:0 0 12px}section.card{background:#fff;border:1px solid #e3e6ea;border-radius:12px;padding:16px;margin-bottom:16px}button{font:inherit;color:#1a1d21;padding:8px 14px;border-radius:8px;border:1px solid #cfd4da;background:#fff;cursor:pointer}button.primary{background:#2563eb;border-color:#2563eb;color:#fff}button.danger{background:#fff;border-color:#dc2626;color:#dc2626}button:disabled{opacity:.5;cursor:default}input,select{font:inherit;padding:8px 10px;border:1px solid #cfd4da;border-radius:8px;width:100%}form.row{display:flex;flex-direction:column;gap:8px}.amount{font-size:2rem;font-weight:700}.muted{color:#6b7280;font-size:.85rem}.error{color:#dc2626;font-size:.9rem}ul.plain{list-style:none;padding:0;margin:0}ul.plain li{display:flex;justify-content:space-between;padding:6px 0;border-bottom:1px solid #eef0f2}.stack{display:flex;flex-direction:column;gap:8px}.toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.tx-filters{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px}.tx-filters select{width:auto;flex:0 1 auto;padding:6px 8px;font-size:.9rem}.tx-filters button{padding:6px 10px;font-size:.85rem}.tx-summary{display:flex;flex-wrap:wrap;gap:12px;margin:0 0 8px;padding:8px 10px;background:#f6f7f9;border-radius:8px;font-size:.9rem;font-weight:600}.tx-summary .expense{color:#dc2626}.tx-summary .income{color:#16a34a}.tx-row{display:flex;justify-content:space-between;align-items:center;padding:10px 0;border-bottom:1px solid #eef0f2;gap:8px}.tx-main{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1 1 auto}.tx-side{display:flex;flex-direction:column;align-items:flex-end;gap:4px;flex-shrink:0}.tx-actions{display:flex;gap:6px}.tx-actions button{padding:4px 10px;font-size:.85rem}.tx-title{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tx-amount{font-weight:700;white-space:nowrap}.tx-amount.expense{color:#dc2626}.tx-amount.income{color:#16a34a}.tx-amount.transfer{color:#6b7280}.tx-amount.adjustment{color:#b45309}.dialog-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#0006;z-index:40}.dialog-content{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);z-index:50;background:#fff;border-radius:12px;padding:20px;width:min(420px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow-y:auto}.dialog-title{font-size:1.05rem;font-weight:600;margin:0 0 12px}.user-menu-trigger{color:#6b7280;font-size:.85rem;padding:6px 10px}.dropdown-content{z-index:50;background:#fff;border:1px solid #e3e6ea;border-radius:8px;padding:4px;min-width:160px;box-shadow:0 4px 16px #0000001f}.dropdown-item{padding:8px 10px;border-radius:6px;cursor:pointer;font-size:.9rem;outline:none}.dropdown-item[data-highlighted]{background:#f1f4f8}[data-radio-group-item][data-state=checked]{background:#2563eb;border-color:#2563eb;color:#fff}.summary-header{position:sticky;top:0;z-index:30;display:flex;justify-content:space-between;align-items:flex-end;gap:12px;width:100%;background:#fff;border:1px solid #e3e6ea;border-radius:12px;padding:12px 16px;margin-bottom:16px;box-shadow:0 8px 16px -12px #00000040;font:inherit;color:inherit;text-align:left;cursor:pointer}.summary-header .muted{display:block;font-size:.75rem}.summary-header .amount{font-size:1.6rem;line-height:1.2;font-variant-numeric:tabular-nums}.summary-main:last-child{text-align:right}.tabbar{position:fixed;left:0;right:0;bottom:0;z-index:30;display:flex;max-width:640px;margin:0 auto;background:#fff;border-top:1px solid #e3e6ea;padding-bottom:env(safe-area-inset-bottom)}.tabbar .tab{flex:1;padding:12px 0;border:none;border-radius:0;background:none;font-size:.9rem;color:#6b7280}.tabbar .tab.active{color:#2563eb;font-weight:700}.toast{position:fixed;left:50%;transform:translate(-50%);bottom:calc(64px + env(safe-area-inset-bottom));z-index:60;max-width:calc(100vw - 32px);background:#1a1d21;color:#fff;font-size:.9rem;padding:10px 16px;border-radius:10px;box-shadow:0 8px 24px #00000040;animation:toast-in .2s ease-out}@keyframes toast-in{0%{opacity:0;transform:translate(-50%) translateY(8px)}to{opacity:1;transform:translate(-50%) translateY(0)}}.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.record-type-row{display:flex;gap:8px;align-items:flex-start;flex-wrap:wrap}.receipt-scan{display:flex;flex-direction:column;align-items:flex-start;gap:4px}.icon-button{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;padding:0;border-radius:8px;color:#2563eb}.receipt-preview{position:relative;display:inline-block;margin-top:4px}.receipt-preview img{max-width:160px;max-height:220px;border-radius:8px;border:1px solid #e3e6ea;display:block}.receipt-preview-close{position:absolute;top:-8px;right:-8px;width:24px;height:24px;padding:0;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;background:#1a1d21;color:#fff;border-color:#1a1d21}.report-cards{display:flex;flex-direction:column;gap:8px;margin-bottom:8px}.report-cards .report-card{display:block;border:1px solid #e3e6ea;border-radius:10px;padding:12px 14px}.report-card-row,.report-cards .report-card:not(:last-child){display:flex;justify-content:space-between;align-items:baseline;gap:8px;border-bottom:none}.report-card-label{font-weight:600;font-size:.9rem}.report-card-label.income{color:#0d9488}.report-card-label.expense{color:#b91c1c}.report-card-value{font-size:1.35rem;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}.report-card-value.income{color:#0d9488}.report-card-value.expense{color:#b91c1c}.report-usage{height:10px;border-radius:5px;background:#0d9488;overflow:hidden;margin:8px 0 4px}.report-usage-fill{height:100%;background:#b91c1c;border-radius:5px 0 0 5px}.report-view h3{font-size:.9rem;margin:16px 0 8px}.report-legend{display:flex;gap:12px;font-size:.8rem;color:#6b7280;margin-bottom:4px}.report-legend span{display:inline-flex;align-items:center;gap:4px}.report-chip{width:10px;height:10px;border-radius:3px;display:inline-block}.report-chip.expense,.report-bar-fill.expense,.report-fill.expense{fill:#b91c1c;background:#b91c1c}.report-chip.income,.report-bar-fill.income,.report-fill.income{fill:#0d9488;background:#0d9488}.report-flow{width:100%;height:auto;display:block;margin-bottom:8px}.flow-seg.income{fill:#0d9488}.flow-seg.expense{fill:#b91c1c}.flow-seg.neutral{fill:#6b7280}.flow-band{fill:url(#flow-grad)}.flow-label{font-size:10px;fill:#1a1d21}.flow-pct{fill:#6b7280}.report-line-chip{width:12px;height:0;border-top:2px solid #6b7280;display:inline-block}.report-trend{width:100%;height:auto;display:block}.report-baseline{stroke:#cfd4da;stroke-width:1}.report-net-line{fill:none;stroke:#6b7280;stroke-width:2;stroke-linejoin:round}.report-net-dot{fill:#6b7280;stroke:#fff;stroke-width:1}.report-trend-toggle{display:block;width:100%;margin-top:16px;border:1px dashed #cfd4da;background:#fafbfc;color:#6b7280;font-size:.9rem}.report-months{display:grid;gap:2px;margin-bottom:4px}.report-month{border:none;background:none;padding:4px 0;font-size:.8rem;color:#6b7280;border-radius:6px}.report-month.active{color:#2563eb;font-weight:700;background:#eff6ff}.report-rows .report-row{display:block;padding:8px 0}.report-row-head{display:flex;justify-content:space-between;gap:8px}.report-row-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.report-row-amount{font-variant-numeric:tabular-nums;white-space:nowrap}.report-track{height:8px;border-radius:4px;background:#eef0f2;margin-top:4px;overflow:hidden}.report-fill{height:100%;border-radius:4px}.report-row-net{margin-top:2px}input[type=date],input[type=month]{min-height:42px;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:#fff}@media (max-width: 480px){main{padding:16px 12px calc(72px + env(safe-area-inset-bottom))}h1{font-size:1.15rem}section.card{padding:14px 12px;border-radius:10px}button{padding:7px 11px;font-size:.9rem}.amount{font-size:1.5rem}.tx-title{white-space:normal}}
