:root{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--bg:#0e0f12;--surface:#17191e;--surface-2:#20232a;--border:#2a2d35;--text:#f5f6f8;--muted:#9097a3;--accent:#4ade80;--protein:#60a5fa;--carbs:#fbbf24;--fat:#f472b6;--warn:#f59e0b;--radius:14px;--tap:48px;--tabbar-h:64px;--safe-bottom:env(safe-area-inset-bottom,0px);--safe-top:env(safe-area-inset-top,0px);-webkit-text-size-adjust:100%;font-family:-apple-system,BlinkMacSystemFont,SF Pro Text,system-ui,sans-serif;font-size:17px;line-height:1.4}*{box-sizing:border-box}html,body{background:var(--bg);color:var(--text);margin:0}body{overscroll-behavior-y:none;-webkit-tap-highlight-color:transparent}button,input{font:inherit;color:inherit}button{cursor:pointer;touch-action:manipulation}h1,h2{margin:0}.app{min-height:100dvh}.content{padding:calc(var(--safe-top) + 12px) 16px calc(var(--tabbar-h) + var(--safe-bottom) + 24px);max-width:600px;margin:0 auto}.screen-head{padding:8px 4px 16px}.screen-head h1{font-size:28px;font-weight:700}.section-title{text-transform:uppercase;letter-spacing:.04em;color:var(--muted);margin:20px 4px 8px;font-size:13px;font-weight:600}.muted{color:var(--muted)}.warn{color:var(--warn)}.center{text-align:center}.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:14px 16px}.card.list{padding:4px 16px}.card.list>.field+.field{border-top:1px solid var(--border)}.field{min-height:var(--tap);justify-content:space-between;align-items:center;gap:12px;display:flex}.field-input{align-items:center;gap:6px;display:flex}.field input{text-align:right;background:var(--surface-2);border:1px solid var(--border);border-radius:10px;width:90px;padding:8px 10px;font-size:17px}.field input:focus{outline:2px solid var(--accent);outline-offset:-1px}.unit{width:32px;font-size:14px}.hint{color:var(--muted);margin:8px 0 12px;font-size:14px}.btn{min-height:var(--tap);background:var(--surface-2);border:1px solid var(--border);border-radius:12px;width:100%;margin-bottom:12px}.btn:active{background:var(--border)}.segmented{background:var(--surface-2);border-radius:10px;padding:3px;display:flex}.segmented button{min-height:40px;color:var(--muted);background:0 0;border:0;border-radius:8px;flex:1}.segmented button.on{background:var(--border);color:var(--text);font-weight:600}.stat-row{justify-content:space-between;align-items:baseline;display:flex}.stat-row strong{font-size:28px}.macro-grid{color:var(--muted);gap:16px;margin-top:10px;font-size:15px;display:flex}.dot{border-radius:50%;width:8px;height:8px;margin-right:6px;display:inline-block}.dot.protein{background:var(--protein)}.dot.carbs{background:var(--carbs)}.dot.fat{background:var(--fat)}.placeholder{color:var(--muted);text-align:center;border:1px dashed var(--border);border-radius:var(--radius);margin-top:16px;padding:32px 16px}.tabbar{height:calc(var(--tabbar-h) + var(--safe-bottom));padding-bottom:var(--safe-bottom);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);border-top:1px solid var(--border);background:#0e0f12eb;display:flex;position:fixed;bottom:0;left:0;right:0}.tab{color:var(--muted);background:0 0;border:0;flex-direction:column;flex:1;justify-content:center;align-items:center;gap:3px;font-size:11px;font-weight:500;display:flex}.tab svg{fill:none;stroke:currentColor;stroke-width:2px;stroke-linecap:round;stroke-linejoin:round;width:26px;height:26px}.tab.active{color:var(--accent)}.date-nav{justify-content:space-between;align-items:center;padding:4px 0 12px;display:flex}.icon-btn{width:var(--tap);height:var(--tap);background:var(--surface);color:var(--text);border:0;border-radius:50%;font-size:28px;line-height:1}.date-label{min-height:var(--tap);background:0 0;border:0;flex-direction:column;align-items:center;gap:2px;display:flex}.date-label strong{font-size:22px}.badge{color:var(--accent);font-size:12px;font-weight:600}.summary{align-items:center;gap:16px;display:flex}.ring{flex:none;width:104px;height:104px;position:relative}.ring svg{width:100%;height:100%}.ring circle{fill:none;stroke-width:12px}.ring-track{stroke:var(--surface-2)}.ring-fill{stroke:var(--accent);stroke-linecap:round}.ring-fill.over{stroke:var(--warn)}.ring-text{flex-direction:column;justify-content:center;align-items:center;display:flex;position:absolute;inset:0}.ring-text strong{font-size:24px;line-height:1.1}.ring-text span{font-size:13px}.summary-side{flex-direction:column;flex:1;gap:8px;min-width:0;display:flex}.eaten strong{font-size:20px}.eaten .muted{font-size:14px}.macro-label{justify-content:space-between;margin-bottom:3px;font-size:13px;display:flex}.bar{background:var(--surface-2);border-radius:3px;height:6px;overflow:hidden}.bar-fill{border-radius:3px;height:100%}.bar-fill.protein{background:var(--protein)}.bar-fill.carbs{background:var(--carbs)}.bar-fill.fat{background:var(--fat)}.meal{margin-top:18px}.meal-head{align-items:center;gap:8px;padding:0 4px 6px;display:flex}.meal-head h2{flex:1;font-size:18px}.meal-head .muted{font-size:14px}.add-btn{background:var(--surface-2);width:40px;height:40px;color:var(--accent);border:0;border-radius:50%;font-size:26px;line-height:1}.add-btn:active{background:var(--border)}.entries{margin:0;padding:0;list-style:none;overflow:hidden}.entries li+li{border-top:1px solid var(--border)}.entry{text-align:left;background:0 0;border:0;align-items:center;gap:12px;width:100%;min-height:56px;padding:10px 16px;display:flex}.entry:active{background:var(--surface-2)}.entry-main{flex-direction:column;flex:1;min-width:0;display:flex}.entry-name{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.entry-sub{font-size:13px}.entry-kcal{font-weight:600}.complete-btn{margin-top:24px;margin-bottom:4px}.complete-btn.on{border-color:var(--accent);color:var(--accent);background:#4ade8024;font-weight:600}.sheet-backdrop{z-index:10;background:#0000008c;align-items:flex-end;display:flex;position:fixed;inset:0}.sheet{width:100%;max-width:600px;max-height:calc(100dvh - var(--safe-top) - 12px);background:var(--bg);border:1px solid var(--border);border-bottom:0;border-radius:18px 18px 0 0;flex-direction:column;margin:0 auto;display:flex}.sheet-head{border-bottom:1px solid var(--border);align-items:center;padding:8px 12px;display:flex}.sheet-head h2{text-align:center;flex:1;font-size:17px}.sheet-head .link,.sheet-head-spacer{width:72px}.link{color:var(--accent);text-align:left;background:0 0;border:0;min-height:44px}.sheet-body{padding:12px 16px calc(var(--safe-bottom) + 120px);-webkit-overflow-scrolling:touch;overflow-y:auto}.mode-pick,.meal-pick{margin-bottom:12px}.meal-pick button{font-size:14px}.entry-form .section-title{margin-top:16px}.field input.text{text-align:right;flex:1;width:auto;min-width:0}.field>span:first-child{flex:none}.field input.unit-input{text-align:left;width:64px}.stepper{align-items:center;gap:6px;display:flex}.stepper button{border:1px solid var(--border);background:var(--surface-2);border-radius:10px;width:40px;height:40px;font-size:22px}.stepper input{text-align:center!important;width:64px!important}.check{min-height:var(--tap);align-items:center;gap:10px;padding:0 4px;display:flex}.check input{width:22px;height:22px;accent-color:var(--accent)}.error{color:var(--warn);text-align:center}.btn.primary{background:var(--accent);color:#062b14;border:0;margin-top:16px;font-weight:600}.btn.primary:active{filter:brightness(.9)}.btn.danger{color:#f87171;background:0 0}.tabs{margin-bottom:12px}.tabs button{padding:0 4px;font-size:14px}.search{background:var(--surface);border:1px solid var(--border);border-radius:12px;width:100%;min-height:44px;margin-bottom:12px;padding:8px 14px;font-size:17px}.search:focus{outline:2px solid var(--accent);outline-offset:-1px}.rows{margin:0;padding:0;list-style:none;overflow:hidden}.rows .row+.row{border-top:1px solid var(--border)}.row{align-items:stretch;min-height:60px;display:flex}.row-main{text-align:left;background:0 0;border:0;flex-direction:column;flex:1;justify-content:center;min-width:0;padding:8px;display:flex}.row-main:active{background:var(--surface-2)}.row-main.static:active{background:0 0}.row-name{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.row-sub{white-space:nowrap;text-overflow:ellipsis;font-size:13px;overflow:hidden}.row-star,.row-side{width:52px;color:var(--muted);background:0 0;border:0;flex:none;font-size:22px}.row-star.on{color:var(--carbs)}.row-star:active,.row-side:active{background:var(--surface-2)}.row-side{font-size:20px}.added{color:var(--accent);margin-left:8px;font-size:14px;font-weight:600}.check-row{flex-direction:row;align-items:center;gap:12px;padding-left:16px;padding-right:16px}.row-text{flex-direction:column;flex:1;min-width:0;display:flex}.box{border:2px solid var(--border);color:#062b14;border-radius:7px;flex:none;justify-content:center;align-items:center;width:24px;height:24px;font-size:15px;font-weight:700;display:flex}.box.on{background:var(--accent);border-color:var(--accent)}.sticky-btn{position:sticky;bottom:0}.sheet-body>.entry-form>.link{margin-bottom:4px;display:block}.btn:disabled{opacity:.45}.chip{text-align:left;width:100%;min-height:var(--tap);background:var(--surface);border:1px dashed var(--accent);color:var(--accent);border-radius:12px;margin-bottom:8px;padding:8px 14px;font-weight:600;display:block}.chip .muted{font-size:14px;font-weight:400}.chip:active{background:var(--surface-2)}.add-btn.more{letter-spacing:1px;color:var(--muted);font-size:22px}.menu{padding:0 16px}.menu button{text-align:left;background:0 0;border:0;justify-content:space-between;align-items:center;width:100%;min-height:56px;display:flex}.menu button+button{border-top:1px solid var(--border)}.menu button:active{background:var(--surface-2)}.date-nav.compact{padding-bottom:4px}.date-pick{min-height:var(--tap);flex-direction:column;justify-content:center;align-items:center;display:flex;position:relative}.date-pick input{opacity:0;width:100%;height:100%;position:absolute;inset:0}.toast{z-index:30;max-width:576px;left:12px;right:12px;bottom:calc(var(--tabbar-h) + var(--safe-bottom) + 12px);background:var(--surface-2);border:1px solid var(--border);border-radius:14px;align-items:center;gap:12px;min-height:52px;margin:0 auto;padding:4px 4px 4px 16px;display:flex;position:fixed;box-shadow:0 8px 24px #00000080}.toast.in-sheet{bottom:calc(var(--safe-bottom) + 16px)}.toast-label{flex:1;min-width:0;font-size:15px}.toast-undo{min-height:44px;color:var(--accent);background:0 0;border:0;padding:0 16px;font-weight:700}.big-field input{width:120px;font-size:20px;font-weight:600}.presets{flex-direction:column;gap:10px;display:flex}.preset-card{background:var(--surface);border:1.5px solid var(--border);border-radius:var(--radius);text-align:left;color:var(--text);padding:0}.preset-card.selected{border-color:var(--accent);background:#15201a}.preset-head,.preset-card.custom{text-align:left;border-radius:var(--radius);background:0 0;border:0;flex-direction:column;gap:6px;width:100%;padding:12px 14px;display:flex}.preset-card.custom{background:var(--surface);border:1.5px solid var(--border)}.preset-card.custom.selected{border-color:var(--accent);background:#15201a}.preset-title{justify-content:space-between;align-items:center;gap:8px;display:flex}.preset-title .name{font-size:17px;font-weight:600}.tagline{margin-top:-2px;font-size:14px}.radio{border:2px solid var(--border);color:#062b14;border-radius:50%;flex:none;justify-content:center;align-items:center;width:24px;height:24px;font-size:14px;font-weight:700;display:inline-flex}.radio.on{background:var(--accent);border-color:var(--accent)}.stack{background:var(--surface-2);border-radius:6px;gap:2px;height:12px;display:flex;overflow:hidden}.stack.empty{opacity:.6}.seg{min-width:4px}.seg.protein{background:var(--protein)}.seg.carbs{background:var(--carbs)}.seg.fat{background:var(--fat)}.nums{grid-template-columns:repeat(3,1fr);gap:6px;display:grid}.num{flex-direction:column;gap:0;font-size:13px;display:flex}.num strong{font-size:17px;line-height:1.25}.legend{color:var(--muted);align-items:center;font-size:13px;display:inline-flex}.legend .dot{margin-right:6px}.hint.needs{margin:0}.warn.small{font-size:13px}.preset-extra{padding:0 14px 12px}.preset-extra .desc{color:var(--muted);margin:0 0 8px;font-size:14px}.extra-controls{border-top:1px solid var(--border);margin-top:4px}.extra-controls .field+.field{border-top:1px solid var(--border)}.slider-field{gap:8px}.slider-wrap{flex:1;justify-content:flex-end;align-items:center;gap:10px;display:flex}.slider-wrap input{width:120px;accent-color:var(--accent)}.slider-wrap strong{text-align:right;min-width:48px}.targets{flex-direction:column;gap:10px;display:flex}.target-rows{flex-direction:column;display:flex}.target-row{min-height:var(--tap);align-items:center;gap:8px;display:flex}.target-row .legend{color:var(--text);flex:1;font-size:17px}.target-row .pct{text-align:right;width:44px}.target-row input{text-align:right;background:var(--surface-2);border:1px solid var(--border);border-radius:10px;width:84px;padding:8px 10px;font-size:17px}.target-row input:focus{outline:2px solid var(--accent);outline-offset:-1px}.total-line{margin:0}.apply{margin:4px 0 0}.warn-box{color:#fbd38d;background:#f59e0b1f;border:1px solid #f59e0b66;border-radius:12px;margin:8px 0 0;padding:10px 12px;font-size:14px}.warn-box ul{margin:6px 0 0;padding-left:18px}.ok-box{color:var(--accent);background:#4ade801f;border:1px solid #4ade8066;border-radius:12px;margin:8px 0 0;padding:10px 12px;font-size:14px}.backup-status{margin:0 0 12px}.btn.danger-fill{color:#fff;background:#ef4444}.compare .field{text-align:right;grid-template-columns:1fr 80px 120px;display:grid}.compare .field>:first-child{text-align:left}.compare .head{min-height:36px;font-size:13px}.badge-dot{background:var(--warn);border:2px solid var(--bg);border-radius:50%;width:10px;height:10px;position:absolute;top:8px;left:calc(50% + 8px)}.tab{position:relative}.backup-status+.btn.primary{margin-top:0}.summary-card{flex-direction:column;gap:10px;display:flex}.summary-head{justify-content:space-between;align-items:baseline;display:flex}.approach-name{font-size:18px}.summary-kcal strong{font-size:28px}.summary-card .btn{margin:4px 0 0}.btn.cancel{color:var(--muted);background:0 0;border-color:#0000;margin:0}.search-online{margin-top:4px}.online{margin-top:12px}.online .section-title{margin-top:8px}.row-tag{color:var(--muted);background:var(--surface-2);border-radius:8px;flex:none;align-self:center;margin-right:12px;padding:2px 8px;font-size:12px;font-weight:600}.tag{color:var(--accent);background:#4ade801f;border-radius:7px;margin-left:8px;padding:1px 7px;font-size:12px;font-weight:600}.tag.warn-tag{color:var(--warn);background:#f59e0b24}.attribution{margin-top:10px;font-size:12px;line-height:1.45}.attribution a,.hint a{color:var(--accent)}.food-head{flex-direction:column;gap:2px;margin:4px 0 12px;display:flex}.food-name{font-size:20px;line-height:1.25}.small{font-size:13px}.totals{text-align:center;grid-template-columns:repeat(4,1fr);gap:8px;margin-top:8px;display:grid}.total{flex-direction:column;display:flex}.total strong{font-size:22px}.total strong.unknown{color:var(--muted)}.total .muted{font-size:13px}.portion .btn{margin-top:8px}.field.stacked{flex-direction:column;align-items:stretch;gap:6px;padding:8px 0}.field input.text.wide{text-align:left;flex:none;width:100%}.summary{flex-wrap:wrap}.summary-note{flex-basis:100%;margin:0;font-size:12px}.macro-label{align-items:baseline;gap:8px}.macro-label strong{white-space:nowrap;font-size:14px}.macro-label strong.over{color:var(--muted);font-weight:600}.entries li.swipe{list-style:none;position:relative;overflow:hidden}.swipe-content{background:var(--surface);touch-action:pan-y;-webkit-user-select:none;user-select:none;position:relative}.swipe-content.settle{transition:transform .2s}.swipe-actions{align-items:stretch;display:flex;position:absolute;top:0;bottom:0}.swipe-actions.right{width:92px;right:0}.swipe-actions.left{background:var(--surface-2);justify-content:space-between;align-items:center;width:148px;padding:0 6px;left:0}.swipe-delete{color:#fff;background:#e5484d;border:0;flex:1;font-size:16px;font-weight:700}.swipe-delete:active{background:#c93a3f}.swipe-actions.left button{background:var(--surface);width:48px;height:48px;color:var(--text);border:0;border-radius:50%;font-size:26px;line-height:1}.swipe-actions.left button:active{background:var(--border)}.swipe-amount{text-align:center;flex:1;min-width:0;font-size:13px;line-height:1.15}.entry{cursor:pointer}.search-row{align-items:flex-start;gap:8px;margin-bottom:12px;display:flex}.search-row .search{flex:1;min-width:0;margin-bottom:0}.scan-btn{background:var(--accent);color:#07140b;border:0;border-radius:12px;flex:none;min-height:44px;padding:0 14px;font-size:16px;font-weight:700}.scan-btn:active{filter:brightness(.9)}.scan{flex-direction:column;gap:12px;display:flex}.scan-view{aspect-ratio:4/3;background:#000;border-radius:16px;position:relative;overflow:hidden}.scan-view video{object-fit:cover;width:100%;height:100%;display:block}.scan-view.paused{justify-content:center;align-items:center;display:flex}.scan-reticle{border:2px solid #ffffffd9;border-radius:12px;position:absolute;inset:30% 10%;box-shadow:0 0 0 999px #00000059}.scan-status{text-align:center;color:#fff;text-shadow:0 1px 3px #000;margin:0;font-size:14px;position:absolute;bottom:8px;left:0;right:0}.scan-manual{flex-direction:column;gap:8px;display:flex}.scan-result{flex-direction:column;gap:4px;padding:14px 16px;display:flex}.chips{gap:8px;padding:8px 12px 12px;display:flex}.chip-btn{border:1px solid var(--border);background:var(--surface-2);min-height:44px;color:var(--text);border-radius:10px;flex:1;font-size:18px}.chip-btn.on{border-color:var(--accent);color:var(--accent);background:#4ade801f}.unit-select{min-height:44px;color:var(--text);background:var(--surface-2);border:1px solid var(--border);border-radius:10px;padding:6px 10px;font-size:17px}.macro-label>span{white-space:nowrap;min-width:0}.macro-label .small{font-size:12px}.scan-manual .search{margin-bottom:0}
