:root{--bg: #fafaf8;--surface: #ffffff;--surface-2: #f2f0ea;--text: #1a1a1a;--muted: #6b6b6b;--border: #e0ddd6;--accent: #2f6f4e;--accent-text: #ffffff;--danger: #a33a2e;--warn: #8a6d1f;--radius: 8px;--chart-1: #2a78d6;--chart-2: #1baf7a;--cal-planned: #e8901f;--cal-planned-text: #2b1a06;--cal-done: #2f6f4e;--cal-done-text: #ffffff;--cal-missed: #a33a2e;--cal-missed-text: #ffffff;--cal-today: #5b4fd6;--set-todo: #b8860b;--set-todo-fill: #f7e3a0;--set-done: #2f6f4e;--set-done-fill: #d3e7db;--protein: #2a78d6;--carbs: #eb6834;--fat: #1baf7a;--scale-dot: #b5b2aa;--track: #ebe8e1}@media(prefers-color-scheme:dark){:root{--bg: #16161a;--surface: #1e1e24;--surface-2: #26262e;--text: #e8e8e8;--muted: #9a9a9a;--border: #32323a;--accent: #6fbf90;--accent-text: #10241a;--danger: #e08074;--warn: #d6b45c;--chart-1: #3987e5;--chart-2: #199e70;--cal-planned: #a35c0e;--cal-planned-text: #fdf0e2;--cal-done: #2e6b4c;--cal-done-text: #e6f5ec;--cal-missed: #8c3a30;--cal-missed-text: #fbe6e2;--cal-today: #9a8cf5;--set-todo: #e8c15a;--set-todo-fill: #4a3a10;--set-done: #6fbf90;--set-done-fill: #204534;--protein: #3987e5;--carbs: #d95926;--fat: #199e70;--scale-dot: #5a5a64;--track: #2c2c34}}*{box-sizing:border-box}html,body,#root{height:100%}body{margin:0;font:16px/1.5 system-ui,-apple-system,Segoe UI,sans-serif;background:var(--bg);color:var(--text);padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);-webkit-text-size-adjust:100%}.wrap{max-width:34rem;margin:0 auto;padding:1.5rem 1.25rem 4rem}h1{font-size:1.4rem;margin:0 0 1rem}h2{font-size:1.05rem;margin:2rem 0 .6rem}a{color:var(--accent)}label{display:block;margin:1rem 0 .3rem;font-size:.875rem;color:var(--muted)}input,select{width:100%;padding:.65rem .7rem;font:inherit;border-radius:var(--radius);border:1px solid var(--border);background:var(--surface);color:var(--text)}input[type=date]{-webkit-appearance:none;-moz-appearance:none;appearance:none;display:block;width:auto;min-width:11rem;margin-inline:auto;text-align:center}input[type=date]::-webkit-datetime-edit,input[type=date]::-webkit-date-and-time-value{text-align:center}button{padding:.65rem 1.1rem;font:inherit;font-weight:500;cursor:pointer;border-radius:var(--radius);border:1px solid var(--accent);background:var(--accent);color:var(--accent-text);margin-top:1rem;min-height:44px;position:relative;touch-action:manipulation;-webkit-tap-highlight-color:transparent;user-select:none;-webkit-user-select:none}button:active:not(:disabled){transform:scale(.97);filter:brightness(.92)}button:after{content:"";position:absolute;top:-9px;right:-2px;bottom:-9px;left:-2px}.grid-cell:after{top:0;right:0;bottom:0;left:0}button.secondary{background:transparent;color:var(--accent)}button.secondary:active:not(:disabled){background:var(--surface-2);filter:none}button:disabled{opacity:.55;cursor:default}button.linky{background:none;border:none;padding:0;margin-top:0;min-height:0;color:var(--accent);font-size:.78rem;font-weight:500;text-decoration:underline;text-underline-offset:2px}button.linky:active:not(:disabled){transform:none;filter:brightness(.85)}.tappable{cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;user-select:none;-webkit-user-select:none;border-radius:var(--radius);transition:background .12s ease}.tappable:active{background:var(--surface-2)}.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:1.25rem}.muted{color:var(--muted);font-size:.9rem}.error{color:var(--danger);border:1px solid var(--danger);border-radius:var(--radius);padding:.6rem .8rem;margin:.75rem 0;font-size:.92rem}.row{display:flex;gap:.75rem;align-items:center;justify-content:space-between}ul.plain{list-style:none;padding:0;margin:.5rem 0}ul.plain li{padding:.55rem .2rem;border-bottom:1px solid var(--border);display:flex;justify-content:space-between;gap:1rem}.stack>*+*{margin-top:1rem}.pill-row{display:flex;gap:.4rem;flex-wrap:wrap}.pill{margin:0;min-height:36px;padding:.35rem .8rem;font-size:.85rem;background:var(--surface);color:var(--text);border-color:var(--border);border-radius:999px}.pill.on{background:var(--accent);color:var(--accent-text);border-color:var(--accent)}.num{font-variant-numeric:tabular-nums}.big{font-size:1.9rem;font-weight:650;line-height:1.1}.small{font-size:.8rem}.grid2{display:grid;grid-template-columns:1fr 1fr;gap:.75rem}.grid3{display:grid;grid-template-columns:repeat(3,1fr);gap:.5rem}.sheet-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:#00000073;z-index:40;display:flex;align-items:flex-end;justify-content:center}.sheet{background:var(--bg);width:100%;max-width:36rem;max-height:92vh;overflow-y:auto;border-radius:14px 14px 0 0;padding:1rem 1.25rem 2rem;padding-bottom:calc(2rem + env(safe-area-inset-bottom))}.sheet-head{display:flex;align-items:center;justify-content:space-between;gap:.5rem}.sheet-head h2{margin:0}.fab{position:fixed;right:1.1rem;bottom:calc(4.4rem + env(safe-area-inset-bottom));width:56px;height:56px;border-radius:50%;font-size:1.8rem;line-height:1;padding:0;margin:0;z-index:30;box-shadow:0 4px 14px #0003}.meal-head{display:flex;justify-content:space-between;align-items:baseline;margin:1.4rem 0 .3rem}.meal-head h2{margin:0}.food-row{display:flex;justify-content:space-between;gap:.75rem;align-items:center;padding:.6rem .5rem;border-bottom:1px solid var(--border)}.food-row:last-child{border-bottom:none}.food-row .name{font-weight:500}.bar-track{height:8px;background:var(--track);border-radius:4px;overflow:hidden}.bar-fill{height:100%;border-radius:4px}.tag{display:inline-block;font-size:.72rem;padding:.05rem .45rem;border-radius:999px;border:1px solid var(--border);color:var(--muted);vertical-align:middle}.tag.low{border-color:var(--warn);color:var(--warn)}textarea{width:100%;padding:.65rem .7rem;font:inherit;border-radius:var(--radius);border:1px solid var(--border);background:var(--surface);color:var(--text);min-height:5rem;resize:vertical}.tabs{display:flex;gap:.3rem;overflow-x:auto;margin:.5rem 0 1rem}.tabs .pill{white-space:nowrap}.chart-tip{position:absolute;pointer-events:none;background:var(--surface);border:1px solid var(--border);border-radius:6px;padding:.3rem .5rem;font-size:.78rem;white-space:nowrap;box-shadow:0 2px 8px #0000001f}
