:root{font-family:Segoe UI,Noto Sans JP,Yu Gothic UI,Meiryo,sans-serif;color:var(--ink);background:var(--bg);font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;--bg: #f5f7f6;--card: #fff;--ink: #203731;--muted: #65776f;--line: #e1e8e3;--accent: #087f73;--accent-dark: #06665d;--soft: #edf6f2;--income: #087761;--expense: #b3503a;--error-bg: #fff1ec;--shadow: 0 5px 24px #173b2b05;color-scheme:light dark}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer;border:0;background:none;color:inherit;min-height:44px;touch-action:manipulation}button:disabled{opacity:.45;cursor:default}button:not(:disabled):active{transform:translateY(1px)}button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible,a:focus-visible{outline:3px solid #609fcd;outline-offset:3px}button{transition:background .15s,color .15s,box-shadow .15s}h1,h2,h3,p{margin:0}h1{font-size:clamp(23px,4.5vw,31px);line-height:1.5;letter-spacing:.01em;font-weight:750}h2{font-size:17px;font-weight:700;line-height:1.5}h2 svg{vertical-align:middle;flex-shrink:0}small{font-size:12px}.app-shell{max-width:1120px;margin:auto;min-height:100dvh}.app-header{height:84px;display:flex;align-items:center;justify-content:space-between;margin:0 40px;border-bottom:1px solid var(--line);gap:12px}.brand{display:flex;align-items:center;gap:10px;padding:0;font-size:19px;font-weight:750;letter-spacing:.035em;white-space:nowrap}.brand-icon{display:grid;place-items:center;width:36px;height:39px;border-radius:10px;background:var(--accent);color:#fff}.brand-light{font-weight:450;margin-left:2px}.connection-status{font-size:11px;color:var(--muted);display:flex;align-items:center;gap:6px;white-space:nowrap}.connection-status svg{color:var(--accent)}.connection-status.offline{color:var(--expense)}.connection-status.offline svg{color:inherit}.main-content{padding:34px 40px 140px}.page-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:27px;gap:12px}.eyebrow{font-size:10px;color:var(--accent);font-weight:750;letter-spacing:.18em;margin-bottom:8px}.subtitle{font-size:13px;color:var(--muted);line-height:1.8;margin-top:7px}.heading-mark{font-family:Georgia,serif;font-size:61px;color:#7caa9b;line-height:1;opacity:.6;padding-right:15px;transform:rotate(-8deg)}.card{background:var(--card);border:1px solid var(--line);border-radius:19px;padding:24px;margin-bottom:20px;box-shadow:var(--shadow)}.section-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:20px}.section-title h2{display:flex;align-items:center;gap:8px}.section-title h2 svg{color:var(--accent)}.section-title.outside{margin:4px 0 18px}.subtle-label{font-size:11px;letter-spacing:.02em;color:var(--muted);white-space:nowrap}.text-button{display:inline-flex;align-items:center;justify-content:center;gap:5px;font-size:12px;font-weight:650;color:var(--accent);padding:0 4px}.text-button:hover{color:var(--accent-dark);text-decoration:underline}.month-overview{padding:21px 25px 26px;background:var(--accent);color:#fff;border-radius:19px;margin-bottom:26px;position:relative;overflow:hidden}.month-overview:after{content:"";position:absolute;right:-40px;bottom:-85px;width:220px;height:220px;border:1px solid #ffffff18;border-radius:50%;pointer-events:none}.month-overview .section-title{margin-bottom:8px}.month-overview h2{font-size:14px;font-weight:600}.month-overview .text-button{color:#fff;font-weight:500}.summary{display:grid;grid-template-columns:1fr 1fr 1fr;gap:16px;min-width:0}.summary>div{display:flex;flex-direction:column;gap:10px;min-width:0}.summary>div+div{border-left:1px solid var(--line);padding-left:20px}.summary span{color:var(--muted);font-size:12px}.summary strong{font-size:clamp(17px,2.4vw,25px);font-weight:700;letter-spacing:-.03em;overflow-wrap:anywhere;font-variant-numeric:tabular-nums;line-height:1.5}.hero-summary>div+div{border-color:#ffffff30}.hero-summary span{color:#d7ebe4}.hero-summary strong,.hero-summary .income-text,.hero-summary .expense-text{color:#fff;font-size:clamp(19px,2.8vw,30px)}.hero-summary>div:last-child strong{color:#e2f6bc}.income-text{color:var(--income)}.expense-text{color:var(--expense)}.home-grid{display:grid;grid-template-columns:1.15fr 1fr;gap:22px;align-items:start}.home-grid>.card{margin:0}.input-card{padding-top:23px}.history-card{position:sticky;top:20px}.segmented{display:flex;background:var(--bg);padding:4px;border:1px solid var(--line);border-radius:12px;gap:4px}.segmented button{flex:1;display:flex;align-items:center;justify-content:center;gap:7px;border-radius:8px;font-size:14px;font-weight:600;min-width:0}.segmented button.selected{background:var(--card);box-shadow:0 2px 7px #163a2712;color:var(--accent)}.kind-switch{margin-bottom:22px}.kind-switch button.selected:not(.income){color:var(--expense)}label{display:block;font-size:13px;font-weight:600;color:var(--ink)}input,select,textarea{display:block;width:100%;min-width:0;min-height:46px;color:var(--ink);background:var(--card);border:1px solid var(--line);border-radius:9px;padding:11px 12px;line-height:1.5;margin-top:8px;font-size:16px;font-weight:400}input::placeholder{color:var(--muted);opacity:.8}input[type=date],input[type=month]{min-height:46px;max-width:100%;text-align:left}input[type=number]{appearance:textfield}fieldset{padding:0;border:0;min-width:0;margin:0 0 23px}legend{font-size:13px;font-weight:600;margin-bottom:10px}.amount-field{margin-bottom:24px}.amount-input-wrap{display:flex;align-items:baseline;border-bottom:2px solid var(--line);gap:9px;padding:8px 1px 9px}.amount-input-wrap>span:first-child{font-size:24px;color:var(--muted);font-weight:400}.amount-input-wrap input{background:none;border:0;font-size:40px;font-weight:650;letter-spacing:-.025em;padding:0;margin:0;border-radius:0;min-height:55px;outline-offset:5px}.amount-input-wrap input::placeholder{color:#a3b1a9}.amount-input-wrap .yen-unit{font-size:14px;color:var(--muted)}.chips{display:flex;flex-wrap:wrap;gap:8px}.chip{border:1px solid var(--line);border-radius:9px;padding:9px 13px;font-size:13px;font-weight:500;background:var(--card);min-height:44px;line-height:1.5;overflow-wrap:anywhere;max-width:100%}.chip.selected{border-color:var(--accent);background:var(--soft);color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}.chip:hover:not(:disabled){background:var(--soft)}.edit-chip{border-style:dashed;color:var(--muted);display:flex;align-items:center;gap:5px;font-size:11px}.form-date{display:flex;align-items:end;gap:10px;margin-bottom:20px}.form-date>label{flex:1;min-width:0}.date-quick{display:flex;gap:5px;padding-bottom:0}.small-button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;border:1px solid var(--line);border-radius:8px;padding:8px 12px;background:var(--card);font-size:12px;white-space:nowrap}.small-button.active{color:var(--accent);background:var(--soft);border-color:#9fcabd}.small-button:hover:not(:disabled){background:var(--soft)}.optional{font-size:10px;font-weight:400;color:var(--muted);background:var(--bg);padding:2px 6px;margin-left:4px;border-radius:4px}.primary,.secondary,.danger-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;border-radius:10px;padding:12px 18px;font-size:14px;font-weight:650;line-height:1.5}.primary{color:#fff;background:var(--accent);border:1px solid var(--accent)}.primary:hover:not(:disabled){background:var(--accent-dark);box-shadow:0 3px 10px #087f7320}.secondary{background:var(--card);border:1px solid var(--line);color:var(--ink)}.secondary:hover:not(:disabled){background:var(--soft)}.full{width:100%}.entry-form>.primary{margin-top:23px}.form-error{background:var(--error-bg);color:var(--expense);border-radius:8px;padding:12px;font-size:13px;line-height:1.8;margin-top:14px}.hint{font-size:12px;color:var(--muted);line-height:1.9;margin-top:15px}.transaction-list{margin:0 -6px}.transaction-row{display:flex;align-items:center;gap:10px;width:100%;text-align:left;min-height:77px;border-bottom:1px solid var(--line);padding:12px 6px;min-width:0}.transaction-row:last-child{border:0}.transaction-row:hover{background:var(--soft);border-radius:9px}.transaction-icon{width:35px;height:38px;display:grid;place-items:center;flex-shrink:0;border-radius:11px;background:#fcf1eb;color:var(--expense)}.transaction-icon.income{background:var(--soft);color:var(--income)}.transaction-detail{display:flex;flex-direction:column;gap:5px;min-width:0;flex:1}.transaction-detail>strong{font-size:13px;line-height:1.6;overflow-wrap:anywhere}.transaction-detail small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--muted);font-size:10px}.transaction-amount{font-size:14px;font-variant-numeric:tabular-nums;white-space:nowrap}.row-chevron{flex-shrink:0;color:var(--muted)}.history-link{width:100%;margin-top:15px}.card-footnote{text-align:center;color:var(--muted);font-size:10px;margin-top:4px}.empty{text-align:center;color:var(--muted);padding:34px 5px;line-height:1.9;font-size:13px}.empty-icon{display:grid;place-items:center;background:var(--soft);color:var(--accent);border-radius:18px;width:60px;height:60px;margin:0 auto 16px}.empty-small{font-size:13px;color:var(--muted);line-height:1.8;padding:14px 0}.bottom-nav{position:fixed;bottom:20px;left:50%;transform:translate(-50%);width:min(570px,calc(100% - 48px));display:grid;grid-template-columns:repeat(4,1fr);padding:9px 12px;background:var(--card);border:1px solid var(--line);box-shadow:0 8px 40px #1c38231a;border-radius:20px;z-index:20}.nav-item{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font-size:10px;color:var(--muted);padding:0;min-height:57px;font-weight:500}.nav-item>span{display:grid;place-items:center;width:44px;height:32px;border-radius:10px}.nav-item.selected{color:var(--accent);font-weight:750}.nav-item.selected>span{background:var(--soft)}.period-tabs{max-width:400px;margin:0 auto 23px}.period-card{padding:20px 25px 17px}.period-navigation{display:flex;align-items:center;justify-content:space-between;gap:5px}.period-navigation h2{font-size:21px;letter-spacing:.02em;text-align:center}.icon-button{display:inline-flex;align-items:center;justify-content:center;width:44px;min-width:44px;height:44px;min-height:44px;border-radius:9px;color:var(--muted);padding:0;flex-shrink:0}.icon-button:hover:not(:disabled){background:var(--soft);color:var(--accent)}.period-picker{display:flex;justify-content:center;align-items:center;gap:8px;margin:8px 0 25px}.period-picker>input{width:175px;margin:0;font-size:13px}.period-picker>label{width:120px;font-size:0}.period-picker>label>input{margin:0;font-size:14px}.record-count{text-align:right;margin-top:16px;font-size:11px;color:var(--muted)}.breakdown-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.breakdown-row{margin-bottom:23px}.breakdown-row:last-child{margin-bottom:0}.breakdown-row>div:first-child{display:flex;justify-content:space-between;align-items:baseline;gap:10px;font-size:13px}.breakdown-row>div:first-child span{overflow-wrap:anywhere;min-width:0}.breakdown-row strong{font-size:14px;white-space:nowrap}.hidden-tag{font-size:9px;color:var(--muted);padding-left:4px;white-space:nowrap}.bar-line{display:flex;align-items:center;gap:10px;margin-top:10px}.bar-line>span{min-width:43px;font-size:10px;color:var(--muted);text-align:right;font-variant-numeric:tabular-nums}.bar-track{height:7px;border-radius:10px;background:var(--bg);flex:1;overflow:hidden}.bar-fill{height:100%;background:#c07e64;border-radius:10px;min-width:1px}.bar-fill.income{background:#409b7e}.table-scroll{width:100%;overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:13px;font-variant-numeric:tabular-nums}thead th{padding:12px 8px;background:var(--bg);font-size:11px;font-weight:500;color:var(--muted);text-align:right;white-space:nowrap}thead th:first-child{text-align:left;border-radius:7px 0 0 7px}thead th:last-child{border-radius:0 7px 7px 0}tbody th,tbody td{border-bottom:1px solid var(--line);padding:6px 8px;white-space:nowrap;text-align:right}tbody th{width:1%;text-align:left;font-weight:500;padding-left:0}tbody th button{display:flex;align-items:center;justify-content:space-between;gap:4px;color:var(--accent);padding:5px 8px;min-width:57px;font-size:13px}tbody tr:last-child td,tbody tr:last-child th{border:0}.no-record td{color:var(--muted);font-weight:400}.no-record th button{color:var(--muted)}tbody tr:hover{background:var(--soft)}.preset-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:17px}.preset-card{border:1px solid var(--line);border-radius:16px;background:var(--card);box-shadow:var(--shadow);overflow:hidden;min-width:0}.preset-main{display:flex;flex-direction:column;align-items:start;width:100%;padding:20px;text-align:left;min-height:210px}.preset-main:hover:not(:disabled){background:var(--soft)}.preset-main:disabled{opacity:.75}.preset-type{display:flex;align-items:center;justify-content:space-between;width:100%;font-size:10px;color:var(--expense);margin-bottom:19px}.preset-type svg{color:var(--accent)}.preset-card.income .preset-type{color:var(--income)}.preset-name{font-size:16px;line-height:1.6;overflow-wrap:anywhere}.preset-main small{font-size:10px;color:var(--muted);margin-top:2px}.preset-amount{font-size:25px;font-weight:700;letter-spacing:-.03em;margin-top:15px;overflow-wrap:anywhere;max-width:100%;font-variant-numeric:tabular-nums}.preset-caption{font-size:10px;color:var(--muted);margin-top:8px}.preset-actions{display:flex;align-items:center;justify-content:space-between;border-top:1px solid var(--line);padding:4px}.move-buttons{display:flex;gap:0}.add-preset{margin-top:19px;width:100%;min-height:60px;border:1px dashed #9cb7a9;border-radius:13px;display:flex;align-items:center;justify-content:center;gap:8px;font-size:13px;color:var(--accent)}.notice{font-size:12px;line-height:1.8;color:var(--muted);padding:0 0 15px}.page-footnote{font-size:11px;color:var(--muted);text-align:center;line-height:1.9;margin:26px 0 10px}.category-list{margin-top:6px}.category-row{display:flex;align-items:center;border-bottom:1px solid var(--line);padding:4px 0;gap:3px;min-height:57px}.category-row:last-child{border:0}.category-name{font-size:13px;flex:1;min-width:0;overflow-wrap:anywhere}.danger{color:var(--expense)}.danger-button{border:1px solid #d3a498;background:var(--card);color:var(--expense)}.danger-button:hover:not(:disabled){background:var(--error-bg)}.hidden-categories{border-top:1px solid var(--line);margin-top:15px;padding-top:8px}.hidden-categories summary{font-size:12px;color:var(--muted);padding:13px 0;cursor:pointer;min-height:44px}.section-description{font-size:13px;color:var(--muted);line-height:1.95;margin-bottom:17px}.backup-meta{background:var(--bg);padding:15px;border-radius:10px;display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:18px}.backup-meta span{font-size:11px;color:var(--muted)}.backup-meta strong{font-size:12px;font-weight:550}.backup-actions{display:grid;gap:10px}.storage-status{display:flex;justify-content:space-between;gap:10px;margin-bottom:20px;font-size:11px;color:var(--muted)}.storage-status strong{font-weight:550;color:var(--accent)}.local-badge{font-size:9px;letter-spacing:.08em;color:var(--accent);background:var(--soft);border-radius:5px;padding:5px 7px}.modal{padding:0;border:1px solid var(--line);border-radius:20px;max-width:490px;width:calc(100% - 24px);max-height:calc(100dvh - 36px);background:var(--card);color:var(--ink);box-shadow:0 24px 100px #0004;overflow:auto}.modal::backdrop{background:#102d2566;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}.modal-header{display:flex;align-items:center;justify-content:space-between;padding:14px 19px;border-bottom:1px solid var(--line);position:sticky;top:0;background:var(--card);z-index:2}.modal-body{padding:22px}.stack-form{display:flex;flex-direction:column;gap:20px}.stack-form .kind-switch,.stack-form .hint{margin:0}.delete-entry{margin-top:15px}.toast{position:fixed;bottom:115px;left:50%;transform:translate(-50%);width:max-content;max-width:min(600px,calc(100% - 24px));background:#213e34;color:#fff;border:1px solid #486559;border-radius:13px;padding:10px 12px 10px 18px;display:flex;align-items:center;gap:12px;box-shadow:0 8px 28px #0002;z-index:100;font-size:12px;line-height:1.8}.toast>span{min-width:0;overflow-wrap:anywhere}.toast button{font-size:12px;color:#dcf7ad;font-weight:650;white-space:nowrap}.toast .toast-close{display:grid;place-items:center;min-width:44px;flex-shrink:0;color:#fff}.backup-reminder,.update-banner{display:flex;align-items:center;gap:9px;padding:10px 12px;background:#edf1e5;border:1px solid #dce5cd;border-radius:12px;margin-bottom:22px;color:#546641;font-size:11px;line-height:1.8}.backup-reminder>svg{flex-shrink:0}.backup-reminder p,.update-banner p{flex:1}.backup-reminder .text-button{min-height:44px;font-size:11px;margin-left:4px}.backup-reminder .icon-button{width:32px;min-width:44px}.global-error{border:1px solid #d3a498;background:var(--error-bg);color:var(--expense);border-radius:12px;padding:13px;margin-bottom:20px;font-size:13px;line-height:1.8}.global-error>div{display:flex;gap:10px;justify-content:flex-end}.loading{text-align:center;padding:50px 15px;font-size:14px;line-height:2}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.skip-link{position:absolute;left:10px;top:-100px;background:var(--card);color:var(--accent);padding:12px;z-index:200}.skip-link:focus{top:10px}@media(min-width:760px){.main-content:has(#categories){max-width:780px;margin:auto}.period-card .summary{padding:0 12px}.preset-grid:empty{display:none}}@media(max-width:759px){.app-header{margin:0 20px;height:70px}.brand{font-size:17px;gap:8px}.brand-icon{width:32px;height:35px;border-radius:9px}.connection-status{font-size:9px;gap:4px}.connection-status svg{width:12px}.main-content{padding:26px 20px 125px}.page-heading{margin-bottom:24px}.heading-mark{font-size:51px;padding-right:6px}.month-overview{padding:15px 19px 23px;margin-bottom:22px}.month-overview .section-title{margin-bottom:7px}.summary{gap:10px}.summary>div{gap:8px}.summary>div+div{padding-left:12px}.summary strong{font-size:19px}.hero-summary strong,.hero-summary .income-text,.hero-summary .expense-text{font-size:22px}.summary span{font-size:11px}.home-grid{display:flex;flex-direction:column;gap:20px}.home-grid>.card{width:100%}.card{padding:20px;border-radius:16px}.history-card{position:static}.input-card>.section-title{margin-bottom:19px}.bottom-nav{bottom:0;width:100%;border-radius:18px 18px 0 0;padding:8px 10px calc(8px + env(safe-area-inset-bottom));box-shadow:0 -5px 24px #15392907}.nav-item{font-size:10px;min-height:56px}.nav-item>span{width:49px}.toast{bottom:calc(90px + env(safe-area-inset-bottom))}.transaction-amount{font-size:15px}.transaction-detail small{font-size:11px}.row-chevron{width:12px}.breakdown-grid{grid-template-columns:1fr;gap:0}.preset-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.preset-main{padding:17px;min-height:210px}.preset-name{font-size:14px}.preset-amount{font-size:23px}.preset-actions{flex-wrap:wrap;justify-content:center;padding:4px 0}.preset-actions .icon-button{width:44px;min-width:44px}.preset-actions>.move-buttons{width:100%;justify-content:center}.section-title.outside h2{font-size:15px}.section-title.outside .secondary{padding:9px 12px;font-size:12px}.period-navigation h2{font-size:19px}.period-card{padding:15px 14px}.period-card .summary{margin:0 4px}.period-table{padding:18px 12px}.period-table>.section-title{margin-left:6px;margin-right:6px}.period-table table{font-size:12px}thead th,tbody td{padding-left:5px;padding-right:5px}.period-picker{margin-bottom:23px}.backup-reminder{margin-bottom:20px;padding:6px 8px}.backup-reminder .text-button{margin:0}.backup-reminder>svg{display:none}.category-row{gap:0}.category-row .icon-button{width:44px;min-width:44px}.category-row .category-name{font-size:12px}.storage-status{flex-direction:column;gap:7px}.section-title h2{font-size:16px}.update-banner{flex-wrap:wrap}.update-banner p{flex-basis:100%}}@media(max-width:374px){.app-header{margin:0 15px}.brand{font-size:15px}.connection-status{font-size:9px}.main-content{padding-left:14px;padding-right:14px}.card{padding:18px}.month-overview{padding:15px 16px 22px}.hero-summary strong,.hero-summary .income-text,.hero-summary .expense-text{font-size:20px}.summary strong{font-size:17px}.summary>div+div{padding-left:9px}.summary{gap:8px}.form-date{gap:7px}.date-quick{gap:4px}.date-quick .small-button{padding:8px 10px}.preset-main{padding:15px}.preset-amount{font-size:20px}.category-row .icon-button{width:44px;min-width:44px}.category-name{max-width:calc(100% - 176px)}.period-table{padding:18px 9px}.period-table .section-title h2{font-size:15px}.modal-body{padding:18px}.backup-meta{gap:9px}.transaction-amount{font-size:14px}.transaction-row{gap:8px}.transaction-icon{width:30px;height:35px}.transaction-detail small{font-size:10px}}@media(prefers-color-scheme:dark){:root{--bg: #131e1a;--card: #1c2b24;--ink: #e4eee6;--muted: #a5b6aa;--line: #35463c;--accent: #62cab1;--accent-dark: #97dfcd;--soft: #263e32;--income: #82d2b0;--expense: #f0ab92;--error-bg: #422c25;--shadow: none}.brand-icon,.primary{background:#147b68;color:#fff;border-color:#278d79}.primary:hover:not(:disabled){background:#096450}.month-overview{background:#205443}.month-overview .text-button{color:#e6f5ec}.transaction-icon{background:#3b3028}.bar-fill{background:#da9a7f}.bar-fill.income{background:#64b698}.backup-reminder,.update-banner{background:#2c3725;border-color:#445239;color:#cfdbb9}.modal::backdrop{background:#0008}.amount-input-wrap input::placeholder{color:#809589}.danger-button{border-color:#925d49}.toast{background:#30493b}.small-button.active{border-color:#699886}.chip.selected{box-shadow:inset 0 0 0 1px var(--accent)}.no-record td{color:#a5b6aa}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition:none!important}}:root{--income: #185abd;--expense: #c62828}.page-heading{margin-bottom:16px}.page-heading h1{font-size:22px}.app-header{height:56px}.main-content{padding-top:18px}.home-shell{height:100dvh;min-height:0;display:flex;flex-direction:column;overflow:hidden}.home-shell .app-header{flex:0 0 50px}.home-shell .main-content{flex:1;min-height:0;padding:10px 20px calc(88px + env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:6px}.home-entry{flex:1;min-height:0;margin:0;padding:14px;display:flex;flex-direction:column;width:100%;max-width:680px;align-self:center}.home-entry h1{font-size:18px;margin:0 0 8px;flex-shrink:0}.home-entry .entry-form{display:flex;flex-direction:column;flex:1;min-height:0;gap:9px}.home-entry .kind-switch,.home-entry .amount-field{margin:0;flex-shrink:0}.home-entry .amount-input-wrap{padding:2px 0}.home-entry .amount-input-wrap input{font-size:32px;min-height:44px}.home-entry .category-field{display:flex;flex-direction:column;flex:1;min-height:48px;margin:0;overflow:hidden}.home-entry legend{margin-bottom:5px}.home-entry .chips{overflow-y:auto;overscroll-behavior-y:contain;align-content:flex-start;flex:1;min-height:0;padding:2px 3px 3px;scrollbar-gutter:stable}.home-entry .chip{padding:7px 10px}.home-entry .form-date{margin:0;flex-shrink:0}.home-entry .form-date input,.home-entry .memo-field input{margin-top:4px;padding:8px 10px;min-height:44px}.home-entry .memo-field{flex-shrink:0}.home-entry .entry-form>.primary{margin:0;flex-shrink:0}.home-entry .form-error{margin:0;padding:6px 10px;flex-shrink:0;font-size:12px}.home-shell .update-banner,.home-shell .global-error{margin:0;flex-shrink:0;padding:6px}.home-shell .global-error>div{display:none}.kind-switch button:first-child{color:var(--expense)}.kind-switch button:last-child{color:var(--income)}.entry-form[data-kind=income] .amount-input-wrap input{color:var(--income)}.entry-form[data-kind=expense] .amount-input-wrap input{color:var(--expense)}.entry-form[data-kind=income] .chip.selected{color:var(--income)}.entry-form[data-kind=expense] .chip.selected{color:var(--expense)}.bar-fill.income{background:var(--income)}.bar-fill.expense{background:var(--expense)}.preset-grid{grid-template-columns:repeat(auto-fill,minmax(145px,1fr));gap:10px}.preset-main{min-height:112px;padding:12px;gap:3px}.preset-type{margin:0;font-size:11px}.preset-name{font-size:14px}.preset-amount{margin:1px 0 0;font-size:20px}.preset-card.income .preset-name,.preset-card.income .preset-amount{color:var(--income)}.preset-card.expense .preset-name,.preset-card.expense .preset-amount{color:var(--expense)}.section-title.outside{margin:0 0 10px}.page-footnote{margin:12px 0}.text-button{min-width:44px}@media(max-width:759px){.main-content{padding:14px 14px 110px}.preset-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.preset-main{min-height:110px;padding:10px 12px}.preset-actions .icon-button{min-width:44px;width:44px}.page-heading{margin-bottom:10px}.home-shell .main-content{padding:6px 10px calc(78px + env(safe-area-inset-bottom))}.home-entry{padding:10px;border-radius:12px}.home-entry .entry-form{gap:7px}.home-entry h1{font-size:16px;margin-bottom:5px}.connection-status{font-size:9px}}@media(max-height:520px){.home-shell .main-content{overflow-y:auto}.home-entry{min-height:480px;flex-shrink:0}}@media(prefers-color-scheme:dark){:root{--bg: #000;--card: #000;--ink: #fff;--muted: #fff;--soft: #000;--income: #71aaff;--expense: #ff7373;--accent: #36ce78;--accent-dark: #36ce78;--line: #505050}.month-overview,.card,.modal,.modal-header,.bottom-nav,.segmented,.chip,.small-button,.backup-meta,.backup-reminder,.update-banner,.toast{background:#000}.text-button,.nav-item.selected,.local-badge,.storage-status strong,.icon-button,.preset-type svg,.small-button.active,.toast button,.segmented button.selected,.backup-reminder,.update-banner{color:#fff}.kind-switch button.selected:not(.income),.kind-switch button:first-child{color:var(--expense)}.kind-switch button.selected.income,.kind-switch button:last-child{color:var(--income)}.transaction-icon.income{color:var(--income);background:#000}.transaction-icon.expense{color:var(--expense);background:#000}.primary{background:#087a38;border-color:var(--accent);color:#fff}.primary:hover:not(:disabled){background:#096a34}.form-error{background:#000;color:#fff;border:1px solid var(--expense)}.global-error{color:#fff;background:#000}.danger,.danger-button{color:#fff}.chip.selected,.nav-item.selected>span{background:#000}}:root{--nav-height: 76px}.bottom-nav{bottom:0;width:100%;max-width:1120px;border-radius:14px 14px 0 0;height:calc(var(--nav-height) + env(safe-area-inset-bottom));padding:6px 10px calc(6px + env(safe-area-inset-bottom))}.home-shell .main-content{padding-bottom:calc(var(--nav-height) + 72px + env(safe-area-inset-bottom))}.home-entry .entry-form>.primary{position:fixed;z-index:21;left:50%;transform:translate(-50%);bottom:calc(var(--nav-height) + env(safe-area-inset-bottom));width:min(680px,calc(100% - 20px));min-height:52px;margin:0 0 8px;box-shadow:0 0 0 5px var(--bg)}.home-entry .entry-form>.primary:active{transform:translate(-50%)}.home-quick{display:flex;gap:4px;overflow-x:auto;flex-shrink:0;margin-bottom:5px;padding:2px}.home-quick .chip{white-space:nowrap;flex-shrink:0;font-size:11px}.today-empty{font-size:11px;margin-bottom:4px;color:var(--muted)}.calculation-preview{display:block;font-size:12px;color:var(--ink);line-height:1.7}.home-entry .calculation-preview{margin:0}.report-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.report-filters label:first-child{grid-column:1/-1}.report-filters .hint{margin:0;align-self:center}.delete-confirm{padding:14px 0;line-height:1.8}.delete-confirm button{margin:10px 8px 0 0}.modal .secondary.full{margin-top:12px}.backup-reminder{flex-shrink:0}.home-shell .backup-reminder{font-size:10px;margin:0;padding:3px 6px}.toast{bottom:calc(var(--nav-height) + 78px + env(safe-area-inset-bottom))}@media(max-width:759px){:root{--nav-height: 72px}.home-shell .main-content{padding-bottom:calc(var(--nav-height) + 72px + env(safe-area-inset-bottom))}}.amount-operators{display:flex;gap:6px;flex-shrink:0}.amount-operators button{border:1px solid var(--line);border-radius:8px;min-width:44px;height:44px}.home-entry .amount-field{position:relative;padding-right:100px;min-height:61px}.home-entry .amount-operators{align-self:flex-end;position:absolute;top:0;right:0}.home-entry .entry-form{position:relative}.home-entry .amount-operators{top:64px}.home-entry .amount-field .calculation-preview{font-size:11px;white-space:nowrap}@media(max-height:700px){.home-entry .entry-form{gap:4px}.home-entry .amount-operators{top:61px}.home-entry .amount-input-wrap input{font-size:27px}.home-entry .amount-field{min-height:60px}.home-shell .backup-reminder{position:relative}}.home-shell .backup-reminder p{display:flex;align-items:center;gap:5px;white-space:nowrap}.home-shell .backup-reminder .text-button{margin:0}.home-entry .form-date>label{display:flex;align-items:center;gap:5px}.home-entry .form-date input{flex:1;width:0;margin:0}.home-entry .date-caption{font-size:11px;flex-shrink:0}.home-entry .memo-field{display:flex;align-items:center;gap:6px}.home-entry .memo-caption{font-size:11px;flex-shrink:0}.home-entry .memo-caption .optional{padding:1px 3px;margin-left:2px}.home-entry .memo-field input{flex:1;width:0;margin:0}.home-quick .text-button{position:sticky;right:0;white-space:nowrap;background:var(--card);flex-shrink:0;padding:0 8px}.card{padding:14px;margin-bottom:12px;border-radius:12px}.main-content{padding-top:12px}.page-heading,.section-title{margin-bottom:10px}.hint{margin-top:8px;line-height:1.7}.stack-form{gap:12px}.empty{padding:20px 5px}.empty-small{padding:8px 0}.kind-switch{margin-bottom:12px}.settings-details>summary{min-height:44px;display:list-item;align-content:center;cursor:pointer;font-size:16px;font-weight:700}.settings-details[open]>summary{margin-bottom:12px}.compact-form{margin-top:8px;gap:10px}.compact-form .hint{margin-top:0}.budget-inputs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:8px}.checkbox-label{display:flex;gap:8px;align-items:center;min-height:44px}.checkbox-label input{width:24px;min-width:24px;height:24px;min-height:24px;margin:0;accent-color:var(--accent)}.rule-row{padding:12px 0;border-bottom:1px solid var(--line);font-size:13px;line-height:1.8;overflow-wrap:anywhere}.rule-row>small{color:var(--muted)}.next-recurring{font-size:12px;margin:4px 0}.inline-actions{display:flex;flex-wrap:wrap;gap:6px}.cost-tag,.recurring-badge{font-size:10px;border:1px solid var(--line);border-radius:4px;padding:1px 4px;margin-left:4px;white-space:nowrap;color:var(--ink)}.recurring-badge{display:inline-block;margin-left:3px;line-height:1.5}.period-navigation h2{min-width:0;overflow-wrap:anywhere;font-size:17px}.period-picker{margin-bottom:16px}.breakdown-row{margin-bottom:14px}.breakdown-action{width:100%;padding:0 2px 6px;text-align:left;display:block}.breakdown-action>div:first-child{display:flex;align-items:baseline;justify-content:space-between;gap:8px;font-size:13px}.breakdown-action strong{white-space:nowrap}.comparison{display:block;font-size:11px;color:var(--muted);line-height:1.8;overflow-wrap:anywhere}.month-comparisons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:10px;border-top:1px solid var(--line);padding-top:8px}.month-comparisons small{font-size:11px;color:var(--muted)}.budget-heading{display:flex;justify-content:space-between;gap:8px;font-size:13px;margin-bottom:6px}.budget-progress{margin-top:12px}.budget-bar{height:8px;border-radius:8px;background:var(--bg);border:1px solid var(--line);overflow:hidden}.budget-bar>div{height:100%;background:var(--accent)}.budget-bar.yellow>div{background:#a66d00}.budget-bar.red>div{background:#cc3030}.budget-numbers{display:flex;flex-wrap:wrap;gap:4px 12px;margin-top:6px;font-size:11px}.daily-budget,.budget-exceeded{font-size:12px;line-height:1.8;margin-top:8px}.cost-totals>div{display:flex;flex-wrap:wrap;gap:10px 20px;font-size:12px;margin-top:8px}.cost-totals strong{display:block;font-size:16px}.payment-field{display:block}.payment-field>span>small{font-size:10px;color:var(--muted)}.home-entry .payment-field{display:flex;align-items:center;gap:6px;flex-shrink:0}.home-entry .payment-field>span{flex-shrink:0;font-size:11px}.home-entry .payment-field select{flex:1;min-width:0;width:0;min-height:44px;padding:8px 10px;margin:0}@media(max-width:759px){.card{padding:12px;margin-bottom:10px}.main-content{padding-top:8px}.report-filters{gap:6px}.report-filters input,.report-filters select{margin-top:4px}.period-card{padding:12px}.transaction-row{min-height:64px;padding-top:8px;padding-bottom:8px}.budget-numbers{font-size:11px}.month-comparisons{gap:6px}.month-comparisons .comparison{font-size:10px}}@media(max-height:700px){.home-entry h1{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0)}.home-entry .kind-switch{padding:0;border:0;min-height:44px}.home-entry .amount-field{min-height:44px}.home-entry .amount-field>span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.home-entry .amount-operators{top:48px}.home-shell .main-content{padding-bottom:calc(var(--nav-height) + 64px + env(safe-area-inset-bottom))}.home-entry .entry-form{gap:4px}}@media(prefers-color-scheme:dark){.budget-bar.yellow>div{background:#efc44c}.budget-bar.red>div{background:#ff7373}}.home-entry .category-field{min-height:70px}.home-shell .home-entry{padding:8px}.home-entry .home-quick{margin-bottom:2px;padding:0 2px}.home-shell .backup-reminder{padding:0 4px;border:0;min-height:44px}@media(max-height:700px){.home-entry .entry-form{gap:3px}.home-entry .amount-operators{top:47px}.home-shell .main-content{padding-bottom:calc(var(--nav-height) + 58px + env(safe-area-inset-bottom))}}.main-content{padding-bottom:calc(var(--nav-height) + 12px + env(safe-area-inset-bottom))}.main-content>.page-footnote{margin-top:8px;margin-bottom:0}@media(max-height:700px){.home-entry .amount-field .calculation-preview{position:absolute;left:0;bottom:0;line-height:12px;font-size:10px}.home-entry .amount-field:has(.calculation-preview) .amount-input-wrap input{padding-bottom:12px;font-size:22px}}.home-entry .form-error{position:fixed;left:50%;transform:translate(-50%);bottom:calc(var(--nav-height) + 70px + env(safe-area-inset-bottom));width:min(680px,calc(100% - 20px));max-height:110px;overflow:auto;z-index:25;border:1px solid var(--expense);box-shadow:0 3px 16px #0002}:root{--bg: #fff;--card: #fff;--ink: #111;--muted: #555;--line: #ccc;--accent: #087a38;--accent-dark: #06612e;--soft: #eef9f2;--selected-bg: #e5f6eb;--selected-border: #087a38}button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible,a:focus-visible{outline-color:var(--accent)}.home-entry .entry-form{flex:0 0 auto}.home-entry .category-field{display:block;flex:0 0 auto;min-height:0;max-height:none;overflow:visible}.home-entry .category-field .chips{flex:none;max-height:100px;min-height:0;padding:2px 3px;overflow-y:auto}.home-entry legend{margin-bottom:3px}.segmented button{border:1px solid transparent}.segmented button.selected,.chip.selected,.small-button.active,.small-button[aria-pressed=true],.secondary[aria-pressed=true]{background:var(--selected-bg);border-color:var(--selected-border);box-shadow:inset 0 0 0 1px var(--selected-border);font-weight:750}.selection-check{color:var(--accent);margin-right:3px;vertical-align:-2px}.small-button.active,.nav-item.selected{color:var(--ink)}.nav-item>span{border:1px solid transparent}.nav-item.selected>span{background:var(--selected-bg);color:var(--accent);border-color:var(--selected-border)}.settings-details[open]>summary,.hidden-categories[open]>summary{border-left:3px solid var(--accent);background:var(--selected-bg);padding-left:8px;color:var(--ink)}.breakdown-action[aria-pressed=true]{border-left:3px solid var(--accent);background:var(--selected-bg);padding-left:8px}.filter-toggle{padding:6px 10px;font-size:12px;white-space:nowrap;gap:5px}.filter-toggle .expanded{transform:rotate(180deg)}.filter-summary{display:flex;gap:8px;align-items:center;justify-content:space-between;border-left:3px solid var(--accent);background:var(--selected-bg);padding:0 8px;margin-bottom:10px;border-radius:5px;font-size:12px}.filter-summary>span{overflow-wrap:anywhere;min-width:0}.filter-summary button{flex-shrink:0}.modal-with-footer[open]{display:flex;flex-direction:column;overflow:hidden}.modal-with-footer .modal-header{position:static;flex-shrink:0;padding:8px 12px}.modal-with-footer .modal-body{min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:12px}.modal-footer{flex-shrink:0;padding:8px 12px max(10px,env(safe-area-inset-bottom));border-top:1px solid var(--line);background:var(--card)}.entry-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.entry-actions .delete-entry,.modal .entry-actions .secondary.full{margin:0;min-height:48px;font-size:12px;padding:8px;gap:4px}.modal-with-footer .entry-form{display:flex;flex-direction:column;gap:10px}.modal-with-footer .entry-form>*{margin-bottom:0}.modal-with-footer .category-field .chips{max-height:148px;overflow-y:auto;padding:2px}@media(max-height:800px){.home-entry .category-field .chips{max-height:48px}}@media(prefers-color-scheme:dark){:root{--bg: #000;--card: #000;--ink: #fff;--muted: #fff;--line: #666;--accent: #36ce78;--accent-dark: #69e69b;--soft: #092d19;--selected-bg: #092d19;--selected-border: #36ce78}.text-button,.connection-status svg,.toast button:not(.toast-close){color:var(--accent)}}.brand-icon{background:#087a38;color:#fff}.home-entry .category-field legend{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%}.home-entry .today-empty{margin:0;font-size:10px;font-weight:400}
