:root{color-scheme:dark;--bg:#202124;--panel:#2b2c30;--line:#383a3e;--text:#e9eaed;--muted:#aaadb4;--blue:#a8c7fa;--record:#263e58;font-family:"Meiryo UI",Meiryo,-apple-system,BlinkMacSystemFont,"Hiragino Sans",sans-serif;font-size:16px}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text)}button,input,select{font:inherit}button{cursor:pointer;color:inherit;background:transparent;border:0;touch-action:manipulation}button:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--blue);outline-offset:3px}button:hover{filter:brightness(1.13)}.app{height:100svh;height:100dvh;min-height:540px;display:flex;flex-direction:column;padding-top:env(safe-area-inset-top);max-width:1200px;margin:auto;position:relative}header{padding:18px 18px 0;background:#292a2e}.topbar{display:flex;align-items:center;justify-content:space-between;gap:12px}.eyebrow{font-size:.75rem;color:var(--muted);margin:0 0 3px;letter-spacing:.08em}.month-title{font-size:1.7rem;padding:2px 0;display:flex;gap:12px;align-items:center}.chevron{font-size:1.2rem;color:var(--muted)}.top-actions{display:flex;align-items:center;gap:12px}.today{border:1px solid #686b72;border-radius:12px;padding:9px 15px;font-size:.875rem}.icon-button{width:44px;height:44px;border-radius:50%;font-size:1.5rem;display:inline-grid;place-items:center;flex-shrink:0}#help{font-size:1rem;border:1px solid #686b72;width:30px;height:30px}.summary{display:flex;gap:16px;align-items:center;padding:15px 0;color:var(--muted);font-size:.875rem}.summary strong{color:var(--text);font-size:1rem;font-weight:500}.total{margin-left:auto;color:var(--blue);font-size:1.3rem;font-variant-numeric:tabular-nums}.months{display:flex;align-items:center;gap:3px;border-top:1px solid var(--line);padding:10px 0}#monthTabs{display:flex;gap:7px;flex:1;justify-content:center}#monthTabs button{padding:8px 0;flex:1;max-width:100px;border:1px solid #66686d;border-radius:24px;font-size:.875rem;white-space:nowrap}#monthTabs button.active{background:#005480;color:#d6eeff;border-color:#005480}.weekdays{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));text-align:center;color:var(--muted);font-size:.875rem;padding:12px 0}.weekdays span:first-child{color:#d6a5a4}.weekdays span:last-child{color:#a8c7fa}.calendar{flex:1;min-height:0;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));grid-template-rows:repeat(6,minmax(0,1fr));border-top:1px solid var(--line)}.day{min-width:0;overflow:hidden;border-right:1px solid var(--line);border-bottom:1px solid var(--line);padding:5px 3px;display:flex;flex-direction:column;align-items:center;gap:4px;position:relative}.day:nth-child(7n){border-right:0}.day.other{color:#7c8088}.day.saved{background:var(--record);box-shadow:inset 0 3px #719ed4}.day-number{width:29px;min-height:29px;display:grid;place-items:center;font-size:.875rem;border-radius:50%}.day.is-today .day-number{background:var(--blue);color:#16273e}.day-count{font-size:.75rem;color:#c4ddff;line-height:1.25}.day-name{display:block;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:#d8e7fc;font-size:.75rem}.day-sum{font-size:.75rem;color:#c4ddff;max-width:100%;overflow:hidden;text-overflow:ellipsis}footer{display:flex;justify-content:space-between;padding:11px 16px calc(11px + env(safe-area-inset-bottom));color:var(--muted);font-size:.75rem;gap:10px}.legend{display:flex;align-items:center;gap:7px}.legend i{height:8px;width:8px;background:#719ed4;border-radius:2px}.fab{position:absolute;right:18px;bottom:calc(53px + env(safe-area-inset-bottom));width:58px;height:58px;border-radius:18px;background:#084bb4;border:1px solid #3474d3;color:#d9e6ff;font-size:2.3rem;box-shadow:0 4px 15px #0004}dialog{color:var(--text);background:var(--panel);border:1px solid #44464b;padding:24px;max-height:90dvh;overflow:auto}dialog::backdrop{background:#0009;backdrop-filter:blur(3px)}.sheet{width:min(100%,520px);margin:auto auto 0;border-radius:24px 24px 0 0;padding-bottom:calc(24px + env(safe-area-inset-bottom))}.sheet-head{display:flex;justify-content:space-between;align-items:center}h1{font-size:1.5rem;font-weight:500;margin:4px 0}h2{font-size:1rem;font-weight:500;margin:0}p{line-height:1.7}.records{display:grid;gap:8px;margin:20px 0}.record{background:#363b43;border:1px solid #535e6e;padding:12px;border-radius:12px;text-align:left;display:flex;gap:12px;justify-content:space-between;align-items:center;min-width:0}.record span{min-width:0;overflow-wrap:anywhere}.record strong{font-weight:500}.record small{display:block;margin-top:5px;color:#bdc7d6;font-size:.75rem}.record.active{border-color:var(--blue);background:#30445e}.record b{font-weight:500;white-space:nowrap}.form-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.text-button{font-size:.875rem;color:var(--blue);padding:8px}label{display:block;font-size:.875rem;margin:16px 0 8px;color:#c8cbd1}input,select{width:100%;height:50px;background:#202124;border:1px solid #5e626b;border-radius:10px;color:var(--text);padding:0 13px;min-width:0}input::placeholder{color:#8e929a}.amount-wrap{position:relative}.amount-wrap span{position:absolute;top:14px;left:15px;color:var(--muted)}.amount-wrap input{padding-left:35px}.form-actions{display:flex;gap:12px;margin-top:22px}.form-actions button,.primary{padding:14px 18px;border-radius:12px}.primary{background:var(--blue);color:#142d4d;font-weight:600;flex:1}.danger{color:#ffb4ab;border:1px solid #8d5c59}.error{color:#ffb4ab;font-size:.875rem;margin:10px 0 0}.error:empty{display:none}.small-dialog{width:min(90%,450px);border-radius:20px}.small-dialog>h2{font-size:1.2rem}.small-dialog p{font-size:.875rem;color:#c5c8cf}.small-dialog>.primary{width:100%;margin-top:12px}#toast{position:fixed;bottom:calc(30px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);background:#dce7f8;color:#16304f;padding:12px 22px;border-radius:30px;font-size:.875rem;z-index:5;box-shadow:0 4px 20px #0004;pointer-events:none;opacity:0;transition:opacity .15s;white-space:nowrap}#toast.visible{opacity:1}[hidden]{display:none!important}@media(min-width:700px){header{padding:24px 30px 0}.app{border-left:1px solid var(--line);border-right:1px solid var(--line)}.sheet{margin:auto;border-radius:24px}.day{align-items:flex-start;padding:9px 12px}.day-number{font-size:1rem}.day-name,.day-count,.day-sum{font-size:.875rem}.fab{right:28px}.month-title{font-size:2rem}#monthTabs{gap:16px}.summary{max-width:420px}}@media(max-height:720px){.day-name{display:none}header{padding-top:8px}.summary{padding:9px 0}.months{padding:6px 0}.weekdays{padding:8px 0}.day{gap:2px}.day-sum{display:none}}

.record-card{background:#363b43;border:1px solid #535e6e;border-radius:12px;overflow:hidden}.record-card.active{border-color:var(--blue);background:#30445e}.record-card .record{width:100%;border:0;border-radius:0;background:transparent}.record-actions{display:flex;gap:10px;padding:0 12px 12px}.record-actions button{min-height:44px;flex:1;border-radius:9px;font-size:.875rem;font-weight:500}.record-edit{background:#a8c7fa;color:#142d4d}.record-delete{border:1px solid #9c6a66;color:#ffb4ab}.form-heading{scroll-margin-top:18px}


