:root{--bg:#f4f5f2;--surface:#fff;--text:#1c211e;--muted:#5d665f;--line:#e1e4de;--primary:#c2540d;--primary-text:#fff;--alert-bg:#fdecea;--alert-text:#9b1c1c;--note-bg:#fff4d6;--note-text:#6b4e00;--ok:#2f7d4a;--toast-bg:#22272a;--toast-text:#f4f6f3;--pa:#2a68ad;--pa-soft:#e2edf8;--pm:#c24e78;--pm-soft:#f8e3eb;--ph:#5f6b63;--ph-soft:#e7ebe6;--c0:#b8901a;--c1:#2f9584;--c2:#8660c2;--c3:#5a8a2c;--c4:#7a7d85;--c5:#b0703c;--c6:#3f7fb8;--c7:#b8578f;--c-other:#a39780;--tabs-h:0px;--bar-h:0px;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light dark;font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,Roboto,Arial,Hiragino Sans,Noto Sans JP,sans-serif;font-size:16px;line-height:1.5}@media (prefers-color-scheme:dark){:root{--lightningcss-light: ;--lightningcss-dark:initial;--bg:#121413;--surface:#1e2220;--text:#e9ece7;--muted:#a2aba3;--line:#2e3330;--primary:#f2994a;--primary-text:#2a1606;--alert-bg:#3b1716;--alert-text:#ffb4ab;--note-bg:#3a2f10;--note-text:#f3d98b;--ok:#6fcf8f;--toast-bg:#e9ece7;--toast-text:#151816;--pa:#7fb2ec;--pa-soft:#1d2d40;--pm:#f08db1;--pm-soft:#3d2030;--ph:#a9b4ac;--ph-soft:#2a302c;--c0:#e0bd52;--c1:#4fc0ad;--c2:#b195e8;--c3:#8cbd57;--c4:#a3a6ae;--c5:#d9955c;--c6:#7fb2ec;--c7:#e08bbb;--c-other:#cbbda4}}*{box-sizing:border-box}body{background:var(--bg);color:var(--text);margin:0}.app{max-width:560px;padding:8px 16px calc(24px + var(--tabs-h) + var(--bar-h) + env(safe-area-inset-bottom));margin:0 auto}h2{color:var(--muted);margin:8px 2px -4px;font-size:.85rem;font-weight:500}.stack{flex-direction:column;gap:12px;display:flex}.center{align-items:center}.num{font-variant-numeric:proportional-nums;letter-spacing:-.01em}.muted{color:var(--muted)}.small{font-size:.82rem}button,input,select{font:inherit;color:inherit}button{border:1px solid var(--line);background:var(--surface);cursor:pointer;border-radius:12px;min-height:48px;padding:8px 16px;font-weight:600}button.primary{background:var(--primary);border-color:var(--primary);color:var(--primary-text)}button.big{min-height:56px;font-size:1.05rem}button.link{color:var(--primary);text-align:left;background:0 0;border:none;min-height:44px;padding:0;font-weight:700}button.icon{min-width:44px;padding:0}button.danger{color:var(--alert-text);border-color:var(--alert-text);background:0 0}button:disabled{opacity:.45;cursor:default}button:focus-visible,input:focus-visible,summary:focus-visible{outline:2px solid var(--primary);outline-offset:2px}input{border:1px solid var(--line);background:var(--surface);border-radius:10px;width:100%;min-height:44px;padding:8px 12px}input.bare{background:var(--bg);border-color:#0000}.field{flex-direction:column;gap:4px;display:flex}.field>span:first-child{color:var(--muted);font-size:.82rem}.row{align-items:center;gap:8px;display:flex}.row>.grow{flex:1;min-width:0}.row2{grid-template-columns:1fr 1fr;gap:8px;display:grid}.alert,.note{border-radius:10px;margin:0;padding:10px 12px;font-size:.9rem}.alert{background:var(--alert-bg);color:var(--alert-text);font-weight:600}.note{background:var(--note-bg);color:var(--note-text)}.hint{color:var(--muted);margin:0;font-size:.82rem}.empty{color:var(--muted);text-align:center;margin:0;padding:24px 0}.badge-new{color:var(--note-text);background:var(--note-bg);border-radius:4px;flex:none;padding:0 5px;font-size:.7rem;font-weight:700}.who{font-weight:700}.who.pa{color:var(--pa)}.who.pm{color:var(--pm)}.screen-header{grid-template-columns:1fr auto 1fr;align-items:center;min-height:48px;margin:0 0 8px;display:grid}.screen-header h1{text-align:center;margin:0;font-size:1.05rem}.screen-header .back{color:var(--primary);background:0 0;border:none;justify-self:start;padding:0 12px 0 0;font-size:1.6rem;font-weight:400;line-height:1}.screen-header-right{justify-self:end}.hero{background:var(--surface);text-align:left;border:none;border-radius:18px;flex-direction:column;gap:2px;padding:18px;display:flex}.hero-label{color:var(--muted);font-size:.82rem;font-weight:400}.hero-sentence{margin-top:4px;font-size:1.1rem;font-weight:400}.hero-amount{font-variant-numeric:proportional-nums;letter-spacing:-.01em;font-size:2.5rem;font-weight:700;line-height:1.15}.hero-amount small{margin-left:2px;font-size:1.05rem;font-weight:500}.hero-link{color:var(--primary);margin-top:6px;font-weight:700}.rowcard{text-align:left;background:var(--surface);border:0;border-radius:14px;align-items:center;gap:10px;width:100%;min-height:56px;padding:12px 16px;font-weight:400;display:flex}.rowcard .main{flex-direction:column;flex:1;min-width:0;display:flex}.rowcard .label{color:var(--muted);font-size:.8rem}.rowcard .value{font-variant-numeric:proportional-nums;letter-spacing:-.01em;font-weight:700}.chev{color:var(--muted);flex:none;font-size:.85rem}.segmented{background:var(--surface);border-radius:12px;gap:3px;padding:3px;display:flex}.segmented button{background:0 0;border:none;border-radius:9px;flex:1;min-height:40px;padding:4px 6px;font-weight:500}.segmented button.on{background:var(--text);color:var(--bg);font-weight:700}.segmented button.on.pa{background:var(--pa);color:var(--surface)}.segmented button.on.pm{background:var(--pm);color:var(--surface)}.share-toggle{flex-wrap:wrap;gap:6px;display:flex}.share-toggle button{min-height:34px;color:var(--muted);border-radius:999px;padding:2px 12px;font-size:.85rem;font-weight:500}.share-toggle button.on.ph{background:var(--ph-soft);border-color:var(--ph);color:var(--text);font-weight:700}.share-toggle button.on.pa{background:var(--pa-soft);border-color:var(--pa);color:var(--pa);font-weight:700}.share-toggle button.on.pm{background:var(--pm-soft);border-color:var(--pm);color:var(--pm);font-weight:700}.share-toggle.highlight button:not(.on){border-style:dashed}.cat-dot{background:var(--cc);border-radius:50%;flex:none;width:9px;height:9px;display:inline-block}.cat-tag{color:var(--cc);border:1px solid var(--cc);white-space:nowrap;border-radius:999px;align-items:center;padding:0 7px;font-size:.72rem;font-weight:700;line-height:1.6;display:inline-flex}.chips{scrollbar-width:none;gap:6px;padding-bottom:2px;display:flex;overflow-x:auto}.chips.wrap{flex-wrap:wrap;overflow:visible}.chip{border-radius:999px;flex:none;align-items:center;gap:6px;min-height:36px;padding:2px 12px;font-size:.85rem;font-weight:500;display:inline-flex}.chip.on{border-color:var(--cc);background:var(--cc);color:var(--surface);font-weight:700}.chip.on .cat-dot{background:var(--surface)}.panel{background:var(--surface);border-radius:16px;flex-direction:column;gap:10px;padding:12px 14px;display:flex}.items{background:var(--surface);border-radius:16px;margin:0;padding:0;list-style:none}.items>li{border-top:1px solid var(--line);flex-direction:column;gap:8px;padding:10px 14px;display:flex}.items>li:first-child{border-top:0}.items>li.unknown{background:color-mix(in srgb, var(--note-bg) 55%, transparent)}.item-top{align-items:center;gap:8px;display:flex}.item-name{text-align:left;background:0 0;border:0;flex-wrap:wrap;flex:1;align-items:center;gap:6px;min-width:0;min-height:36px;padding:4px 0;font-weight:500;display:flex}.item-name .placeholder{color:var(--muted);font-weight:400}.amount-input{background:color-mix(in srgb, var(--primary) 10%, var(--surface));border-color:color-mix(in srgb, var(--primary) 35%, var(--line));text-align:right;font-variant-numeric:proportional-nums;letter-spacing:-.01em;padding:6px 8px;font-size:1.35rem;line-height:1.2}.item-amount{flex:none;width:6.2rem;font-weight:700}.item-name-input{flex:1;min-width:0;font-weight:500}.item-bottom{align-items:center;gap:6px;display:flex}.item-bottom .share-toggle{flex:1;min-width:0}.tag-button{background:0 0;border:0;min-height:36px;padding:0 2px}.expand{width:44px;min-height:36px;color:var(--muted);border-radius:10px;flex:none;padding:0;font-size:1rem}.expand.open{background:var(--bg);color:var(--text)}@media (prefers-reduced-motion:no-preference){.expand{transition:transform .15s}}.expand.open{transform:rotate(180deg)}.item-panel{background:var(--bg);border-radius:12px;flex-direction:column;gap:8px;padding:10px;display:flex}details.fold{background:var(--surface);border-radius:14px;padding:0 14px}details.fold>summary{cursor:pointer;justify-content:space-between;gap:8px;padding:14px 0;list-style:none;display:flex}details.fold>summary::-webkit-details-marker{display:none}details.fold>summary:after{content:"＋";color:var(--muted)}details.fold[open]>summary:after{content:"－"}details.fold>.fold-body{flex-direction:column;gap:10px;padding:0 0 14px;display:flex}.switch-row{align-items:center;gap:10px;min-height:44px;display:flex}.switch-row input{width:22px;height:22px;min-height:22px;accent-color:var(--primary);flex:none}.burdens{flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:8px;font-size:.9rem;display:flex}.burdens b{font-variant-numeric:proportional-nums;letter-spacing:-.01em;font-size:1.05rem}.match{color:var(--ok);font-size:.78rem;font-weight:700}.full{border-radius:8px;width:100%}.thumb{opacity:.7;border-radius:8px;max-width:60%;max-height:50vh}.debug pre{white-space:pre-wrap;word-break:break-all;background:var(--bg);border-radius:8px;max-height:50vh;padding:8px;font-size:.75rem;overflow:auto}.list{background:var(--surface);border-radius:16px;margin:0;padding:0;list-style:none}.list>li{border-top:1px solid var(--line)}.list>li:first-child{border-top:0}.list-row{text-align:left;background:0 0;border:0;border-radius:0;align-items:center;gap:10px;width:100%;min-height:54px;padding:8px 16px;font-weight:400;display:flex}.list-row .main{flex-direction:column;flex:1;min-width:0;display:flex}.list-row .side{text-align:right;font-variant-numeric:proportional-nums;flex:none}.check{border:2px solid var(--line);border-radius:50%;flex:none;place-items:center;width:26px;height:26px;display:grid}.done .check{background:var(--primary);border-color:var(--primary)}.done .check:after{content:"";border:2px solid var(--primary-text);border-top:0;border-right:0;width:10px;height:5px;transform:rotate(-45deg)translate(1px,-1px)}.done .main{color:var(--muted);text-decoration:line-through}.toggle{background:var(--line);border:0;border-radius:14px;flex:none;width:48px;height:28px;min-height:28px;padding:0;position:relative}.toggle:after{content:"";background:var(--surface);border-radius:50%;width:22px;height:22px;transition:left .15s;position:absolute;top:3px;left:3px}.toggle.on{background:var(--primary)}.toggle.on:after{left:23px}.check-row{cursor:pointer;align-items:center;gap:12px;min-height:56px;padding:10px 16px;display:flex}.check-row input{width:22px;height:22px;min-height:22px;accent-color:var(--primary);flex:none}.check-row.disabled{opacity:.45}.result{background:var(--surface);border-radius:16px;flex-direction:column;gap:4px;padding:14px 16px;display:flex}.result .big{font-variant-numeric:proportional-nums;letter-spacing:-.01em;font-size:1.3rem;font-weight:700}.result .line{color:var(--muted);justify-content:space-between;gap:8px;font-size:.85rem;display:flex}.tsuke-card{background:var(--surface);border-radius:16px;flex-direction:column;gap:8px;padding:14px 16px;display:flex}.tsuke-card .top{justify-content:space-between;align-items:baseline;gap:8px;display:flex}.tsuke-card .memo{font-size:1.05rem;font-weight:700}.tsuke-card .rest{font-variant-numeric:proportional-nums;letter-spacing:-.01em;font-size:1.35rem;font-weight:700}.progress{background:var(--bg);border-radius:3px;height:6px;overflow:hidden}.progress i{background:var(--primary);height:100%;display:block}.cal-head{justify-content:space-between;align-items:center;gap:6px;display:flex}.cal-head button{width:44px;height:44px;min-height:44px;color:var(--muted);border:0;border-radius:50%;padding:0;font-size:1.3rem}.cal-head .range{text-align:center;font-weight:700}.total-block{text-align:center;flex-direction:column;display:flex}.total-block .k{color:var(--muted);font-size:.82rem}.total-block .v{font-variant-numeric:proportional-nums;letter-spacing:-.01em;font-size:2.6rem;font-weight:700;line-height:1.15}.total-block .v small{font-size:1.05rem;font-weight:500}.cal-grid{background:var(--surface);border-radius:14px;grid-template-columns:repeat(7,minmax(0,1fr));row-gap:2px;padding:6px 4px;display:grid}.cal-grid .wd{text-align:center;color:var(--muted);padding-bottom:2px;font-size:.72rem}.cell{background:0 0;border:0;border-radius:10px;flex-direction:column;align-items:center;gap:1px;min-height:50px;padding:4px 0 3px;font-weight:400;display:flex}.cell .d{font-size:.8rem;line-height:1.35}.cell .y{font-variant-numeric:proportional-nums;text-overflow:clip;letter-spacing:-.01em;max-width:100%;font-size:.68rem;font-weight:500;line-height:1.2;overflow:hidden}.cell .y.big{color:var(--primary);font-weight:700}.cell.out .d{color:var(--muted);opacity:.45}.cell.future .d{color:var(--muted)}.cell.today .d{background:var(--text);color:var(--surface);border-radius:999px;padding:0 7px;font-weight:700}.cell.sel{background:var(--ph-soft)}.breakdown{background:var(--surface);border-radius:14px;flex-direction:column;gap:10px;padding:12px 16px;display:flex}.bd-row{grid-template-columns:5.5em 1fr auto;align-items:center;gap:10px;font-size:.9rem;display:grid}.bd-row .nm{white-space:nowrap;align-items:center;gap:6px;min-width:0;display:flex;overflow:hidden}.bar{background:var(--bg);border-radius:4px;height:8px;overflow:hidden}.bar i{background:var(--cc);border-radius:4px;height:100%;display:block}.bd-row .am{font-variant-numeric:proportional-nums;text-align:right;letter-spacing:-.01em;font-weight:700}.bd-row .am small{color:var(--muted);margin-left:4px;font-size:.75rem;font-weight:400}.sheet-bg{z-index:30;background:#00000059;justify-content:center;align-items:flex-end;display:flex;position:fixed;inset:0}.sheet{background:var(--bg);width:100%;max-width:560px;padding:8px 16px calc(16px + env(safe-area-inset-bottom));border-radius:20px 20px 0 0;flex-direction:column;gap:10px;max-height:75vh;display:flex;overflow-y:auto}.sheet .grab{background:var(--line);border-radius:2px;align-self:center;width:40px;height:4px}.sheet-head{justify-content:space-between;align-items:center;display:flex}.sheet-head h3{margin:0;font-size:1.05rem}.exp{background:var(--surface);text-align:left;border:0;border-radius:14px;flex-direction:column;gap:4px;width:100%;padding:10px 14px;font-weight:400;display:flex}.exp .r1{justify-content:space-between;gap:8px;font-weight:700;display:flex}.exp .r2{color:var(--muted);flex-wrap:wrap;align-items:center;gap:6px;font-size:.8rem;display:flex}.bottom-bar{left:0;right:0;bottom:calc(var(--tabs-h) + env(safe-area-inset-bottom));z-index:10;background:var(--bg);border-top:1px solid var(--line);position:fixed}.bottom-bar-inner{flex-direction:column;gap:8px;max-width:560px;margin:0 auto;padding:10px 16px;display:flex}.bottom-bar .actions{grid-template-columns:1.6fr 1fr;gap:8px;display:grid}.tabs{z-index:11;background:var(--surface);border-top:1px solid var(--line);padding-bottom:env(safe-area-inset-bottom);grid-template-columns:repeat(4,1fr);display:grid;position:fixed;bottom:0;left:0;right:0}.tabs button{min-height:58px;color:var(--muted);background:0 0;border:none;border-radius:0;flex-direction:column;align-items:center;gap:2px;padding:6px 0 4px;font-size:.72rem;font-weight:500;display:flex}.tabs button.on{color:var(--primary);font-weight:700}.tabs svg{fill:none;stroke:currentColor;stroke-width:1.8px;stroke-linecap:round;stroke-linejoin:round;width:24px;height:24px}.toast{width:min(528px,100% - 24px);left:50%;bottom:calc(var(--tabs-h) + var(--bar-h) + env(safe-area-inset-bottom) + 12px);z-index:40;background:var(--toast-bg);color:var(--toast-text);border-radius:14px;align-items:center;gap:12px;padding:10px 14px;font-size:.92rem;display:flex;position:fixed;transform:translate(-50%);box-shadow:0 6px 24px #00000040}.toast .msg{flex:1;min-width:0}.toast .who.pa,.toast .who.pm{color:inherit}.toast button{color:inherit;white-space:nowrap;background:0 0;border:0;min-height:40px;padding:0 4px;text-decoration:underline}@media (prefers-reduced-motion:no-preference){.toast{animation:.2s ease-out toast-up}@keyframes toast-up{0%{opacity:.4;transform:translate(-50%,8px)}}}.app.login{flex-direction:column;justify-content:center;gap:24px;min-height:100vh;display:flex}.login-title{text-align:center;margin:8px 0;font-size:1.4rem}.app-title{margin:8px 2px 4px;font-size:1.05rem}.big-text{font-size:1.15rem}
