:root{--bg: #0a0c0b;--surface: #141816;--surface-2: #1b201d;--surface-3: #232a26;--line: #262e2a;--text: #f3f6f4;--muted: #8f9b94;--faint: #5d6862;--green: #2bd67b;--green-ink: #062b16;--green-dim: rgba(43, 214, 123, .14);--amber: #f5b841;--amber-dim: rgba(245, 184, 65, .14);--red: #ff5a5f;--red-dim: rgba(255, 90, 95, .14);--blue: #5ab0ff;--blue-dim: rgba(90, 176, 255, .14);--radius: 18px;--radius-s: 12px;--tab-h: 58px;--safe-b: env(safe-area-inset-bottom, 0px);--safe-t: env(safe-area-inset-top, 0px);color-scheme:dark}*{box-sizing:border-box;-webkit-tap-highlight-color:transparent;min-width:0}html,body,#root{height:100%}body{margin:0;background:var(--bg);color:var(--text);font:16px/1.4 -apple-system,BlinkMacSystemFont,SF Pro Text,Segoe UI,Roboto,system-ui,sans-serif;-webkit-font-smoothing:antialiased;overscroll-behavior-y:none;-webkit-text-size-adjust:100%;overflow-x:hidden}button,input,select,textarea{font:inherit;color:inherit}.num{font-variant-numeric:tabular-nums}.app{min-height:100%;padding-bottom:calc(var(--tab-h) + var(--safe-b) + 16px)}.screen{padding:calc(var(--safe-t) + 10px) 16px 0;max-width:640px;margin:0 auto;animation:fade .22s ease-out}@keyframes fade{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}@media(prefers-reduced-motion:reduce){.screen,.sheet,.toast{animation:none!important;transition:none!important}}.topbar{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin:6px 0 16px}.eyebrow{color:var(--muted);font-size:13px;font-weight:600;text-transform:uppercase;letter-spacing:.06em}h1.large{font-size:34px;line-height:1.1;font-weight:800;letter-spacing:-.02em;margin:2px 0 0}h2.section{font-size:20px;font-weight:700;margin:26px 2px 10px;letter-spacing:-.01em}h3{font-size:17px;margin:0;font-weight:650}.muted{color:var(--muted)}.faint{color:var(--faint)}.small{font-size:13px}.xs{font-size:12px}.row{display:flex;align-items:center;gap:10px}.between{justify-content:space-between}.wrap{flex-wrap:wrap}.grow{flex:1}.stack>*+*{margin-top:10px}.grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.grid4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.card{background:var(--surface);border-radius:var(--radius);padding:16px;border:1px solid var(--line)}.card+.card{margin-top:12px}.card.tight{padding:12px 14px}.card.accent{background:linear-gradient(160deg,rgba(43,214,123,.16),var(--surface) 55%);border-color:#2bd67b40}.card-h{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}.card-t{display:flex;align-items:center;gap:8px;font-weight:650;font-size:15px;color:var(--muted)}.card-t svg{color:var(--green)}.big{font-size:30px;font-weight:800;letter-spacing:-.02em;line-height:1.05}.mid{font-size:22px;font-weight:750;letter-spacing:-.01em}.tile{background:var(--surface-2);border-radius:var(--radius-s);padding:10px 12px}.tile .k{font-size:12px;color:var(--muted)}.tile .v{font-size:20px;font-weight:750;margin-top:2px;overflow-wrap:anywhere}.list{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden}.li{display:flex;align-items:center;gap:12px;padding:13px 16px;border-bottom:1px solid var(--line);background:none;border-left:0;border-right:0;border-top:0;width:100%;text-align:left}.li:last-child{border-bottom:0}button.li{cursor:pointer}button.li:active{background:var(--surface-2)}.li .chev{color:var(--faint);margin-left:auto}.divider{height:1px;background:var(--line);margin:12px 0}.badge{display:inline-flex;align-items:center;gap:5px;font-size:12px;font-weight:650;padding:3px 9px;border-radius:99px;white-space:nowrap;background:var(--surface-3);color:var(--muted)}.badge.ok{background:var(--green-dim);color:var(--green)}.badge.warn{background:var(--amber-dim);color:var(--amber)}.badge.danger{background:var(--red-dim);color:var(--red)}.badge.info{background:var(--blue-dim);color:var(--blue)}.dot{width:8px;height:8px;border-radius:50%;background:currentColor;display:inline-block}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 16px;border-radius:12px;border:0;background:var(--surface-3);font-weight:650;cursor:pointer;transition:transform .08s,opacity .15s;text-decoration:none;color:var(--text)}.btn:active{transform:scale(.97)}.btn:disabled{opacity:.45}.btn.primary{background:var(--green);color:var(--green-ink)}.btn.ghost{background:transparent;border:1px solid var(--line)}.btn.danger{background:var(--red-dim);color:var(--red)}.btn.sm{min-height:36px;padding:0 12px;font-size:14px;border-radius:10px}.btn.block{width:100%}.iconbtn{width:40px;height:40px;border-radius:50%;border:0;background:var(--surface-2);display:inline-grid;place-items:center;cursor:pointer;color:var(--text)}:focus-visible{outline:2px solid var(--green);outline-offset:2px}.chips{display:flex;gap:8px;overflow-x:auto;padding-bottom:4px;scrollbar-width:none}.chips::-webkit-scrollbar{display:none}.chip{flex:none;border:1px solid var(--line);background:var(--surface);border-radius:99px;padding:8px 14px;font-size:14px;cursor:pointer;white-space:nowrap}.chip.on{background:var(--green);color:var(--green-ink);border-color:var(--green);font-weight:650}.seg{display:flex;background:var(--surface-2);border-radius:11px;padding:3px;gap:2px;margin-bottom:14px}.seg button{flex:1;border:0;background:none;border-radius:9px;padding:8px 4px;font-size:13px;font-weight:600;color:var(--muted);cursor:pointer}.seg button.on{background:var(--surface-3);color:var(--text);box-shadow:0 1px 3px #0006}.field{display:block}.f{display:block;font-size:13px;color:var(--muted);font-weight:600;margin:12px 0 6px}.input,select.input,textarea.input{width:100%;min-height:46px;padding:11px 13px;border-radius:12px;border:1px solid var(--line);background:var(--surface-2);font-size:16px}textarea.input{min-height:80px;resize:vertical}.input:focus{outline:none;border-color:var(--green)}.switch{position:relative;width:51px;height:31px;flex:none}.switch input{opacity:0;position:absolute;top:0;right:0;bottom:0;left:0;margin:0;cursor:pointer;z-index:1}.switch span{position:absolute;top:0;right:0;bottom:0;left:0;background:var(--surface-3);border-radius:99px;transition:background .2s}.switch span:after{content:"";position:absolute;top:2px;left:2px;width:27px;height:27px;border-radius:50%;background:#fff;transition:transform .2s;box-shadow:0 2px 4px #0000004d}.switch input:checked+span{background:var(--green)}.switch input:checked+span:after{transform:translate(20px)}.tabbar{position:fixed;left:0;right:0;bottom:0;z-index:20;display:flex;padding:6px 4px calc(var(--safe-b) + 4px);background:#0e110fdb;backdrop-filter:saturate(160%) blur(20px);-webkit-backdrop-filter:saturate(160%) blur(20px);border-top:1px solid var(--line)}.tabbar button{flex:1;border:0;background:none;display:flex;flex-direction:column;align-items:center;gap:3px;padding:4px 0;font-size:10.5px;font-weight:600;color:var(--faint);cursor:pointer;min-height:48px}.tabbar button.on{color:var(--green)}.overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#0000008c;z-index:40;animation:fadeo .2s}@keyframes fadeo{0%{opacity:0}}.sheet{position:fixed;left:0;right:0;bottom:0;z-index:41;max-height:92vh;background:var(--bg);border-radius:20px 20px 0 0;border-top:1px solid var(--line);display:flex;flex-direction:column;animation:up .28s cubic-bezier(.2,.8,.2,1);max-width:640px;margin:0 auto}@keyframes up{0%{transform:translateY(40%);opacity:.4}}.sheet-h{display:flex;align-items:center;justify-content:space-between;padding:10px 16px 8px;gap:8px}.sheet-h h3{font-size:17px;text-align:center;flex:1}.grabber{width:36px;height:5px;border-radius:3px;background:var(--surface-3);margin:8px auto 0}.sheet-b{overflow-y:auto;padding:4px 16px calc(var(--safe-b) + 24px);-webkit-overflow-scrolling:touch}.linkbtn{border:0;background:none;color:var(--green);font-weight:600;font-size:16px;cursor:pointer;padding:8px 4px;min-width:60px}.banner{display:flex;gap:10px;align-items:flex-start;padding:12px 14px;border-radius:14px;background:var(--surface);border:1px solid var(--line);margin-bottom:10px;font-size:14px}.banner.warn{background:var(--amber-dim);border-color:#f5b8414d}.banner.danger{background:var(--red-dim);border-color:#ff5a5f4d}.banner.info{background:var(--blue-dim);border-color:#5ab0ff40}.banner.ok{background:var(--green-dim);border-color:#2bd67b40}.banner svg{flex:none;margin-top:1px}.empty{text-align:center;padding:26px 16px;color:var(--muted)}.empty svg{color:var(--faint);margin-bottom:8px}.empty b{display:block;color:var(--text);margin-bottom:4px;font-size:16px}.skeleton{background:linear-gradient(90deg,var(--surface-2),var(--surface-3),var(--surface-2));background-size:200% 100%;animation:sk 1.2s infinite;border-radius:10px;height:18px}@keyframes sk{to{background-position:-200% 0}}.progress{height:8px;border-radius:99px;background:var(--surface-3);overflow:hidden}.progress>i{display:block;height:100%;background:var(--green);border-radius:99px;transition:width .4s}.progress.over>i{background:var(--amber)}.toast{position:fixed;left:50%;transform:translate(-50%);bottom:calc(var(--tab-h) + var(--safe-b) + 18px);background:var(--surface-3);color:var(--text);padding:11px 18px;border-radius:14px;font-weight:600;font-size:14px;z-index:60;box-shadow:0 8px 30px #00000080;animation:fadeo .2s;max-width:calc(100% - 32px);text-align:center}.arrow{color:var(--green);font-weight:700}.prog{display:grid;gap:6px}.prog .from{color:var(--muted);font-size:14px}.prog .to{font-weight:700}.prog .why{font-size:13px;color:var(--muted)}table.sets{width:100%;border-collapse:collapse;font-size:14px}table.sets td,table.sets th{padding:6px 4px;border-bottom:1px solid var(--line);text-align:left}table.sets th{color:var(--muted);font-weight:600;font-size:12px}table.sets td.r,table.sets th.r{text-align:right}.chat{display:flex;flex-direction:column;gap:10px}.bubble{max-width:88%;padding:11px 14px;border-radius:18px;white-space:pre-wrap;font-size:15px}.bubble.me{align-self:flex-end;background:var(--green);color:var(--green-ink);border-bottom-right-radius:6px;font-weight:550}.bubble.bot{align-self:flex-start;background:var(--surface);border:1px solid var(--line);border-bottom-left-radius:6px}.used{margin-top:8px;padding-top:8px;border-top:1px solid var(--line);font-size:12px;color:var(--muted)}.ring{position:relative;width:92px;height:92px;flex:none}.ring svg{transform:rotate(-90deg)}.ring .c{position:absolute;top:0;right:0;bottom:0;left:0;display:grid;place-items:center;text-align:center;line-height:1.05}.meal-status{display:inline-flex;align-items:center;gap:5px}.chart{width:100%;height:auto;display:block;touch-action:pan-y}.chart text{fill:var(--muted);font-size:10px}.legend{display:flex;gap:14px;font-size:12px;color:var(--muted);margin-top:6px;flex-wrap:wrap}.legend i{display:inline-block;width:10px;height:3px;border-radius:2px;margin-right:5px;vertical-align:middle}.photo-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}.photo-grid img{width:100%;aspect-ratio:3/4;object-fit:cover;border-radius:10px}.lock{position:fixed;top:0;right:0;bottom:0;left:0;background:var(--bg);z-index:100;display:grid;place-items:center;text-align:center;padding:24px}pre.md{white-space:pre-wrap;font:14px/1.5 -apple-system,system-ui,sans-serif;margin:0}@media(min-width:700px){.screen{padding-top:24px}}.offline-pill{position:sticky;top:0;z-index:30;margin:0 auto;padding:calc(var(--safe-t) + 6px) 12px 6px;text-align:center;font-size:12px;font-weight:650;color:var(--amber);background:#0a0c0beb;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px)}.grid4 .tile{padding:9px 8px}.grid4 .tile .v{font-size:17px}.update-bar{position:fixed;left:12px;right:12px;bottom:calc(var(--tab-h) + var(--safe-b) + 12px);z-index:50;background:var(--surface-3);border:1px solid rgba(43,214,123,.35);border-radius:16px;padding:12px 14px;display:flex;flex-direction:column;gap:10px;font-size:14px;box-shadow:0 10px 30px #00000080;max-width:616px;margin:0 auto}
