:root{--bg: #fafaf8;--surface: #ffffff;--surface-2: #f3f3f0;--text: #151515;--muted: #8a8a85;--line: #ebebe7;--empty: #ebebe7;--accent: #2f6b5f;--accent-ink: #ffffff;--shadow: 0 1px 2px rgba(20, 20, 20, .04), 0 8px 24px rgba(20, 20, 20, .04);--backdrop: rgba(20, 20, 20, .28);--radius: 20px;--sat: env(safe-area-inset-top, 0px);--sab: env(safe-area-inset-bottom, 0px);--sal: env(safe-area-inset-left, 0px);--sar: env(safe-area-inset-right, 0px);color-scheme:light}@media(prefers-color-scheme:dark){:root:not([data-theme=light]){--bg: #0e0e0f;--surface: #17171a;--surface-2: #1f1f23;--text: #f1f1ee;--muted: #8d8d93;--line: #26262b;--empty: #26262b;--accent: #8cc2b3;--accent-ink: #0e0e0f;--shadow: none;--backdrop: rgba(0, 0, 0, .55);color-scheme:dark}}:root[data-theme=dark]{--bg: #0e0e0f;--surface: #17171a;--surface-2: #1f1f23;--text: #f1f1ee;--muted: #8d8d93;--line: #26262b;--empty: #26262b;--accent: #8cc2b3;--accent-ink: #0e0e0f;--shadow: none;--backdrop: rgba(0, 0, 0, .55);color-scheme:dark}*{box-sizing:border-box}html{-webkit-text-size-adjust:100%;text-size-adjust:100%;background:var(--bg);overscroll-behavior:none}body{margin:0;min-height:100vh;min-height:100dvh;background:var(--bg);color:var(--text);font-family:-apple-system,BlinkMacSystemFont,SF Pro Text,Inter,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:16px;line-height:1.4;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent;overscroll-behavior-y:none}button{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer;touch-action:manipulation;-webkit-user-select:none;user-select:none;transition:transform .12s ease,background-color .15s ease,opacity .15s ease}button:active:not(:disabled){transform:scale(.96)}button:disabled{opacity:.35;cursor:default}button:focus-visible,input:focus-visible,textarea:focus-visible{outline:2px solid var(--accent);outline-offset:2px}input,textarea{font:inherit;font-size:16px;color:var(--text);background:var(--surface-2);border:1px solid transparent;border-radius:14px;padding:12px 14px;width:100%;-webkit-appearance:none;appearance:none}input:focus,textarea:focus{border-color:var(--line);background:var(--surface);outline:none}textarea{resize:none}.screen{max-width:560px;margin:0 auto;padding:calc(var(--sat) + 12px) calc(var(--sar) + 20px) calc(var(--sab) + 32px) calc(var(--sal) + 20px);animation:fade .18s ease}@keyframes fade{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}.topbar{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:52px;margin-bottom:8px}.topbar-title{font-size:17px;font-weight:600;margin:0}.title{font-size:34px;font-weight:700;letter-spacing:-.03em;margin:0;line-height:1.1}.eyebrow{font-size:13px;color:var(--muted);font-weight:500;letter-spacing:.01em}.muted{color:var(--muted)}.small{font-size:13px}.icon-btn{width:40px;height:40px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:var(--surface);box-shadow:var(--shadow);border:1px solid var(--line);font-size:18px}.icon-btn.sm{width:32px;height:32px;font-size:16px;box-shadow:none}.link{color:var(--accent);font-weight:500;padding:8px 4px}.link.strong{font-weight:600}.cards{display:flex;flex-direction:column;gap:14px;margin-top:16px}.card{background:var(--surface);border-radius:var(--radius);padding:16px 16px 14px;box-shadow:var(--shadow);border:1px solid var(--line)}.card-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.card-title{display:flex;align-items:center;gap:12px;text-align:left;flex:1;min-width:0}.card-title:active{transform:none}.card-title .name{display:block;font-weight:600;font-size:17px;letter-spacing:-.01em}.card-title .sub{display:block;font-size:13px;color:var(--muted)}.emoji{width:36px;height:36px;border-radius:12px;background:var(--surface-2);display:inline-flex;align-items:center;justify-content:center;font-size:18px;flex:none}.emoji.big{width:56px;height:56px;border-radius:18px;font-size:28px}.log-btn{width:44px;height:44px;border-radius:50%;flex:none;border:1.5px dashed var(--muted);color:var(--muted);display:inline-flex;align-items:center;justify-content:center}.log-btn.done{border-style:solid}.card-grid{cursor:pointer}.grid-svg{display:block}.grid-label{fill:var(--muted);font-family:inherit}.grid-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch;margin:0 -16px;padding:0 16px;scrollbar-width:none;overscroll-behavior-x:contain}.grid-scroll::-webkit-scrollbar{display:none}.grid-svg.full{cursor:pointer}.new-btn{width:100%;margin-top:14px;padding:16px;border-radius:var(--radius);border:1.5px dashed var(--line);color:var(--muted);font-weight:500}.footnote{text-align:center;color:var(--muted);font-size:12px;margin-top:24px}.nudge{margin-top:16px;display:flex;flex-direction:column;gap:10px;padding:14px 16px;border-radius:16px;background:var(--surface-2)}.nudge strong{display:block;font-size:15px}.nudge span{font-size:14px;color:var(--muted)}.nudge-actions{display:flex;align-items:center;gap:12px}.btn{padding:12px 18px;border-radius:999px;background:var(--surface-2);font-weight:600;font-size:15px}.btn.small{padding:8px 14px;font-size:14px;background:var(--text);color:var(--bg)}.btn.primary{background:var(--text);color:var(--bg)}.btn.ghost{background:transparent;border:1px solid var(--line)}.btn-row{display:flex;gap:10px;flex-wrap:wrap}.danger-text{color:#b4533a}.detail-head{display:flex;align-items:center;gap:14px;margin:4px 0 18px}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.stat{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:12px 8px;text-align:center;min-width:0}.stat b{display:block;font-size:22px;font-weight:650;letter-spacing:-.02em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.stat b.text{font-size:16px;line-height:27px;letter-spacing:-.01em}.stat span{display:block;font-size:11px;color:var(--muted);line-height:1.2;margin-top:2px}.toolbar{display:flex;align-items:center;justify-content:space-between;margin:20px 0 10px;gap:8px}.switcher{display:flex;align-items:center;gap:8px;font-weight:600;font-variant-numeric:tabular-nums}.switcher span{min-width:74px;text-align:center}.panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:16px;overflow:hidden}.hint{font-size:13px;color:var(--muted);text-align:center;margin:10px 0 0}.hint.warn{text-align:left}.legend{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;margin-top:14px;font-size:12px;color:var(--muted)}.legend span{display:inline-flex;align-items:center;gap:6px}.legend i{display:inline-block;width:10px;height:10px;border-radius:50%}.seg{display:inline-flex;background:var(--surface-2);border-radius:999px;padding:3px}.seg button{padding:7px 14px;border-radius:999px;font-size:14px;font-weight:500;color:var(--muted)}.seg button.on{background:var(--surface);color:var(--text);box-shadow:0 1px 3px #00000014}.seg.full{display:flex;width:100%}.seg.full button{flex:1}.seg.big{display:flex;width:100%;margin:8px 0 4px}.seg.big button{flex:1;padding:14px;font-size:16px}.month{display:grid;grid-template-columns:repeat(7,1fr);gap:6px}.month-wd{text-align:center;font-size:12px;color:var(--muted);padding-bottom:4px}.month-day{position:relative;aspect-ratio:1;display:flex;align-items:center;justify-content:center}.month-dot{width:86%;aspect-ratio:1;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:13px;font-variant-numeric:tabular-nums;color:var(--muted)}.month-day.filled .month-dot{color:#fff;font-weight:600}.month-day.today .month-dot{box-shadow:0 0 0 1.5px var(--text)}.month-note{position:absolute;bottom:1px;width:4px;height:4px;border-radius:50%;background:var(--muted)}.section{font-size:13px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);font-weight:600;margin:26px 4px 10px}.notes{display:flex;flex-direction:column;gap:8px}.note{text-align:left;background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:12px 14px}.note-meta{display:flex;justify-content:space-between;font-size:12px;color:var(--muted)}.note p{margin:4px 0 0;font-size:15px;white-space:pre-wrap}.sheet-backdrop{position:fixed;inset:0;background:var(--backdrop);display:flex;align-items:flex-end;justify-content:center;z-index:10;animation:fadein .18s ease}@keyframes fadein{0%{opacity:0}to{opacity:1}}.sheet{width:100%;max-width:560px;background:var(--surface);border-radius:24px 24px 0 0;padding:8px calc(var(--sar) + 20px) calc(var(--sab) + 20px) calc(var(--sal) + 20px);max-height:92dvh;overflow-y:auto;overscroll-behavior:contain;animation:up .24s cubic-bezier(.2,.8,.2,1)}@keyframes up{0%{transform:translateY(40px);opacity:.6}to{transform:none;opacity:1}}.sheet-handle{width:36px;height:5px;border-radius:3px;background:var(--line);margin:0 auto 12px}.sheet-head{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:18px}.sheet-title{font-size:22px;margin:2px 0 0;letter-spacing:-.02em}.sheet-actions{display:flex;justify-content:space-between;align-items:center;margin-top:18px}.sheet-actions .primary{min-width:120px}.mood-row{display:grid;grid-template-columns:repeat(5,1fr);gap:6px}.mood-opt,.scale-opt{display:flex;flex-direction:column;align-items:center;gap:8px;padding:12px 0 10px;border-radius:16px;font-size:12px;font-weight:500;color:var(--muted);border:1px solid transparent}.mood-opt.on,.scale-opt.on{background:var(--surface-2);color:var(--text);border-color:var(--line)}.mood-dot{width:36px;height:36px;border-radius:50%;transition:transform .15s ease}.mood-opt.on .mood-dot,.scale-opt.on .scale-dot{transform:scale(1.12);box-shadow:0 0 0 3px var(--surface),0 0 0 4.5px var(--text)}.scale-row{display:grid;grid-template-columns:repeat(5,1fr);gap:6px}.scale-dot{width:32px;height:32px;border-radius:50%;transition:transform .15s ease}.scale-opt span:last-child{font-size:15px}.scale-hint{grid-column:1 / -1;display:flex;justify-content:space-between;font-size:12px;color:var(--muted);padding:0 12px}.amount-input{display:flex;align-items:baseline;gap:12px}.amount-input input{font-size:32px;font-weight:650;width:140px;text-align:center;letter-spacing:-.02em}.chips{display:flex;gap:8px;margin-top:12px}.chip{padding:8px 14px;border-radius:999px;background:var(--surface-2);font-size:14px;font-weight:500}.field{display:block;margin-top:18px}.field-label{display:block;font-size:13px;color:var(--muted);font-weight:500;margin:0 0 8px 4px}.form .field:first-of-type{margin-top:8px}.preview{display:flex;align-items:center;gap:16px;padding:8px 0 4px}.preview-dots{display:flex;gap:5px}.preview-dots i{width:14px;height:14px;border-radius:50%;display:inline-block}.emoji-grid{display:grid;grid-template-columns:repeat(8,1fr);gap:6px;margin-bottom:10px}.emoji-opt{aspect-ratio:1;border-radius:12px;font-size:20px;background:var(--surface-2);border:1.5px solid transparent}.emoji-opt.on{border-color:var(--text)}.swatches{display:flex;flex-wrap:wrap;gap:10px}.swatch{width:32px;height:32px;border-radius:50%}.swatch.on{box-shadow:0 0 0 3px var(--bg),0 0 0 4.5px var(--text)}.type-list{display:flex;flex-direction:column;gap:8px}.type-opt{text-align:left;padding:12px 14px;border-radius:14px;background:var(--surface-2);border:1.5px solid transparent}.type-opt b{display:block;font-weight:600;font-size:15px}.type-opt span{font-size:13px;color:var(--muted)}.type-opt.on{border-color:var(--text);background:var(--surface)}.type-opt:active{transform:scale(.99)}.row2{display:grid;grid-template-columns:1fr 1fr;gap:12px}.danger{display:flex;gap:10px;margin-top:32px}.group{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:14px}.group.list{padding:6px 6px 6px 14px}.body{margin:0 0 8px;font-size:15px}.group .body:last-child{margin-bottom:0}.list-row{display:flex;align-items:center;gap:6px;padding:6px 0;border-bottom:1px solid var(--line)}.list-row:last-child{border-bottom:0}.list-row.muted{opacity:.7}.list-main{flex:1;display:flex;align-items:center;gap:12px;text-align:left;font-weight:500}.list-main:active{transform:none}.list-sub{font-size:12px;color:var(--muted);padding:12px 0 4px;text-transform:uppercase;letter-spacing:.06em}.toast-inline{font-size:14px;color:var(--accent);margin:12px 0 0}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}
