*{box-sizing:border-box} :root{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#000;background:#fff;font-synthesis:none;--red:#ef343b;--navy:#192b49;--maroon:#691c32}body{margin:0}button,input,select{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer;border:0;background:none;color:inherit;touch-action:manipulation}button:active{opacity:.65}button:focus-visible,a:focus-visible{outline:3px solid #ef343b;outline-offset:3px}input,select{min-width:0;border:1px solid #ddd;border-radius:12px;padding:14px;background:#fff;color:#000;font-size:16px}input:focus,select:focus{outline:2px solid var(--red);outline-offset:1px}svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.app{max-width:560px;margin:auto}header{padding:calc(22px + env(safe-area-inset-top)) 24px 24px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #eee}.brand{font-size:30px;font-weight:850;letter-spacing:-1.8px;text-decoration:none;color:#000}.brand span{color:var(--red);font-size:12px;margin-left:3px}.icon{width:44px;height:44px;display:inline-flex;align-items:center;justify-content:center;font-size:28px;border-radius:50%}header .icon{background:#f6f6f6}main{padding:30px 24px 120px}.heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:24px;gap:8px}.eyebrow{font-size:10px;letter-spacing:1.8px;font-weight:700;color:#707070;margin:0 0 9px;text-transform:uppercase}h1{font-size:36px;letter-spacing:-1.4px;line-height:1.1;margin:0;font-weight:750}.date-controls{display:flex;align-items:center;position:relative;gap:0}.date-controls .icon{width:36px}#datePicker{position:absolute;width:36px;height:44px;opacity:0;left:36px;padding:0;cursor:pointer}.total-card{background:#111;border-radius:24px;color:#fff;padding:24px}.card-top,.card-bottom{display:flex;justify-content:space-between;align-items:center;font-size:12px;color:#b6b6b6}.live{display:flex;align-items:center;gap:6px;font-size:11px}.live i{width:5px;height:5px;border-radius:50%;background:var(--red)}.total-line{display:flex;align-items:baseline;gap:10px;margin:17px 0 26px}.total-line strong{font-size:70px;letter-spacing:-4px;line-height:1;font-weight:650;font-variant-numeric:tabular-nums}.total-line>span{font-size:14px;color:#aaa}.progress{height:5px;background:#373737;border-radius:5px;overflow:hidden;margin-bottom:12px}.progress>div{height:100%;background:var(--red);width:0;border-radius:5px}.card-bottom button{font-size:12px;color:#aaa;padding:8px 0 8px 8px;min-height:36px}.card-bottom b{font-weight:500;color:#fff;margin-left:4px}.section-title{display:flex;align-items:center;justify-content:space-between;margin:30px 0 14px;gap:10px}h2{font-size:16px;letter-spacing:-.3px;margin:0;font-weight:650}.small{font-size:11px;color:#777}.quick-form{display:flex;gap:10px}.quick-form input{width:100%;font-size:28px;font-weight:600;height:64px;background:#f7f7f7;border:1px solid #eee;padding:14px 18px}.primary{background:var(--red);color:#fff;border-radius:13px;font-weight:650;padding:16px 23px;min-height:52px}.quick-form button{display:flex;gap:22px;align-items:center}.primary span{font-size:22px;font-weight:400}.quick-values{display:flex;gap:8px;margin-top:10px}.quick-values button{background:#f5f5f5;border-radius:8px;padding:8px 12px;min-height:44px;font-size:12px;font-weight:600}.quick-values button:last-child{margin-left:auto;background:none;padding-right:0;color:#666;font-weight:400}.log-title{margin-top:32px}#entryCount{font-size:11px;color:#777;background:#f2f2f2;border-radius:6px;padding:3px 6px;margin-left:5px}.entry{width:100%;display:flex;align-items:center;text-align:left;padding:16px 0;border-bottom:1px solid #eee;gap:12px}.entry-symbol{display:grid;place-items:center;width:40px;height:40px;border-radius:12px;background:#f0f2f6;color:var(--navy);font-size:17px;flex-shrink:0}.entry[data-meal="Dinner"] .entry-symbol{color:var(--maroon);background:#f7eef0}.entry-text{flex:1;min-width:0}.entry-name{font-size:14px;font-weight:550;display:block;overflow-wrap:anywhere}.entry-time{font-size:11px;color:#888;display:block;margin-top:5px}.entry-kcal{font-size:17px;font-weight:650;font-variant-numeric:tabular-nums}.entry-kcal small{display:block;color:#888;font-size:10px;font-weight:400;text-align:right;margin-top:3px}.empty{padding:28px 10px;text-align:center;border:1px dashed #ddd;border-radius:14px;color:#888;font-size:13px}.empty span{display:block;color:#b4b4b4;font-size:25px;margin-bottom:8px}.text-button{font-size:11px;color:#777;min-height:36px}.week-chart{display:grid;grid-template-columns:repeat(7,1fr);gap:12px;height:100px;align-items:end}.week-chart button{height:100%;display:flex;align-items:center;flex-direction:column;justify-content:flex-end;gap:10px;font-size:10px;color:#888}.bar-track{height:65px;display:flex;align-items:flex-end;width:100%;justify-content:center}.bar{width:20px;border-radius:4px;background:var(--navy);min-height:3px}.week-chart button.current{color:var(--red)}.current .bar{background:var(--red)}.storage-note{display:flex;gap:6px;align-items:center;justify-content:center;font-size:10px;color:#999;margin:30px 0 0}.storage-note>span{width:4px;height:4px;background:#999;border-radius:50%}nav{position:fixed;z-index:5;bottom:0;left:50%;transform:translateX(-50%);width:100%;max-width:560px;background:rgba(255,255,255,.96);border-top:1px solid #eee;padding:10px 40px calc(10px + env(safe-area-inset-bottom));display:flex;justify-content:space-around;align-items:center}nav button{display:flex;flex-direction:column;align-items:center;gap:5px;font-size:10px;color:#888;min-width:64px;min-height:48px;justify-content:center}nav .active{color:#000}nav .nav-add{background:var(--red);color:white;font-size:30px;border-radius:16px;min-width:50px;height:50px}.month-summary{display:grid;grid-template-columns:1.4fr 1fr 1fr;background:#111;color:#fff;border-radius:20px;padding:24px 18px;gap:8px}.month-summary span{font-size:10px;color:#aaa;display:block;margin-bottom:10px}.month-summary strong{font-size:25px;letter-spacing:-1px}.weekdays,#calendar{display:grid;grid-template-columns:repeat(7,1fr);gap:5px}.weekdays{text-align:center;font-size:11px;color:#888;margin:20px 0 12px}#calendar button{min-height:67px;border-radius:10px;background:#f7f7f7;display:flex;flex-direction:column;justify-content:center;gap:8px;align-items:center;font-size:13px}#calendar button small{font-size:9px;color:#888}#calendar button.logged{background:#edf0f5;color:var(--navy)}#calendar button.over{background:#f7e9ee;color:var(--maroon)}#calendar button.at{background:#ffedef;color:var(--red)}#calendar button.today{box-shadow:inset 0 0 0 1.5px var(--red)}#calendar button:disabled{opacity:.35;cursor:default}.legend{display:flex;gap:15px;margin:24px 0;font-size:10px;color:#777;flex-wrap:wrap}.legend span{display:flex;gap:5px;align-items:center}.legend i{width:6px;height:6px;border-radius:2px}.navy{background:var(--navy)}.red{background:var(--red)}.maroon{background:var(--maroon)}.month-foot{border-top:1px solid #eee;padding-top:20px;font-size:11px;line-height:1.8;color:#888}.month-foot span{display:block}dialog{border:0;border-radius:24px;padding:26px;width:calc(100% - 24px);max-width:430px;max-height:88dvh;overflow:auto;box-shadow:0 20px 100px #0003}dialog::backdrop{background:#0007}.dialog-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.dialog-title h2{font-size:22px}label{display:flex;flex-direction:column;gap:8px;font-size:12px;font-weight:600;margin-bottom:17px}label>span{font-size:10px;color:#888;font-weight:400}label input,label select{width:100%}.form-row{display:flex;gap:10px}.form-row label{width:50%}.full{width:100%}.delete{color:var(--red);min-height:48px;width:100%;margin-top:8px}.settings-note{font-size:12px;color:#777;line-height:1.6}.backup-buttons{display:flex;gap:10px}.backup-buttons button{background:#f3f3f3;flex:1;padding:14px;border-radius:10px}h3{font-size:15px;margin-top:28px}#toast{position:fixed;bottom:calc(90px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);background:#222;color:white;z-index:20;padding:13px 20px;border-radius:12px;font-size:13px;width:max-content;max-width:90%}[hidden]{display:none!important}@media(min-width:700px){body{background:#f7f7f7}.app{background:#fff;min-height:100vh;border-left:1px solid #eee;border-right:1px solid #eee}main{padding:34px 36px 130px}header{padding-left:36px;padding-right:36px}}@media(max-width:360px){main{padding-left:16px;padding-right:16px}.quick-values{gap:4px}.quick-values button{padding:8px}.total-line strong{font-size:62px}.month-summary strong{font-size:21px}}

.photo-launch{display:flex;align-items:center;gap:10px;width:100%;min-height:54px;border:1px solid #e6e6e6;border-radius:12px;margin-top:14px;padding:12px 16px;font-size:13px;font-weight:600}.photo-launch>span:last-child{margin-left:auto;color:#777}.photo-launch svg{color:#ef343b}.photo-placeholder{height:190px;background:#f7f7f7;border:1px dashed #ddd;border-radius:16px;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#777;font-size:12px}.photo-placeholder svg{width:38px;height:38px}#foodPreview{width:100%;height:220px;object-fit:contain;background:#f7f7f7;border-radius:16px}.photo-actions{display:flex;gap:10px;margin:16px 0 22px}.photo-actions button{flex:1;min-height:50px;border-radius:12px;background:#f5f5f5;font-size:13px}.photo-actions .primary{background:#ef343b}.primary:disabled{background:#ddd;color:#777;cursor:default}.photo-portion{margin-top:16px}


.viewfinder{position:relative;height:clamp(300px,51dvh,520px);border-radius:24px;overflow:hidden;background:#111;color:#fff}.viewfinder video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.frame-guides{position:absolute;inset:32px;border:1px solid #ffffff40;border-radius:24px;pointer-events:none}.frame-label{position:absolute;bottom:20px;left:0;right:0;text-align:center;font-size:11px;color:#ddd;pointer-events:none}#cameraFallback{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:28px;text-align:center;background:#131313}#cameraMessage{font-size:13px;color:#aaa;max-width:230px;line-height:1.6}#cameraFallback>svg{width:42px;height:42px;color:#eee}#nativeCamera{min-height:44px;font-size:12px;color:#aaa;margin-top:12px}.capture-controls{display:flex;align-items:center;justify-content:space-around;padding:24px 0 10px;gap:20px}#shutter{border:3px solid #ef343b;border-radius:50%;padding:5px;width:76px;height:76px;flex-shrink:0}#shutter span{display:block;background:#ef343b;border-radius:50%;width:100%;height:100%}#shutter:disabled{opacity:.35}.camera-secondary{display:flex;flex-direction:column;align-items:center;gap:7px;font-size:11px;color:#777;min-width:70px;min-height:54px;justify-content:center}nav .nav-add{font-size:10px;gap:3px;min-width:56px;height:52px}.nav-add svg{width:22px;height:22px}#cameraView h1{font-size:30px}#cameraView .heading{gap:8px}#cameraView .text-button{white-space:nowrap}@media(max-width:360px){#cameraView h1{font-size:25px}}
.consent{display:grid;grid-template-columns:22px 1fr;align-items:start;gap:10px;font-weight:400;line-height:1.45}.consent input{width:20px;height:20px;margin:0;padding:0;accent-color:#ef343b}.consent span{font-size:11px;color:#666}.estimate-head{display:grid;grid-template-columns:1fr auto;gap:20px;background:#f5f5f5;border-radius:14px;padding:16px;margin:18px 0}.estimate-head span{display:block;font-size:10px;color:#777;margin-bottom:6px}.estimate-head strong{font-size:14px}.estimate-head>div:last-child{text-align:right}#estimateResult{border-top:1px solid #eee;margin-top:20px;padding-top:2px}

.food-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:14px}.food-actions .photo-launch{margin:0;padding:12px;gap:8px}.food-actions .photo-launch>span:last-child{margin-left:auto}.text-food-icon{display:grid;place-items:center;width:22px;height:22px;color:var(--red);font-size:12px;font-weight:800}#photoDialog.showing-estimate>:not(.dialog-title):not(#estimateResult){display:none!important}#photoDialog.showing-estimate #estimateResult{border-top:0;margin-top:0;padding-top:0}textarea{width:100%;resize:vertical;min-height:108px;border:1px solid #ddd;border-radius:12px;padding:14px;background:#fff;color:#000;font:inherit;font-size:16px}textarea:focus{outline:2px solid var(--red);outline-offset:1px}.setting-row{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #eee;padding:2px 0 18px;margin-bottom:20px;font-size:13px;font-weight:600}#themeToggle{width:52px;height:30px;border-radius:20px;background:#ddd;padding:3px;display:flex;align-items:center;transition:background .15s}#themeToggle span{width:24px;height:24px;border-radius:50%;background:#fff;box-shadow:0 1px 4px #0003;transition:transform .15s}#themeToggle[aria-checked="true"]{background:var(--red)}#themeToggle[aria-checked="true"] span{transform:translateX(22px)}
html[data-theme="dark"]{color-scheme:dark;background:#0b0b0d;color:#f7f7f7}html[data-theme="dark"] body{background:#0b0b0d;color:#f7f7f7}html[data-theme="dark"] .app{background:#0b0b0d}html[data-theme="dark"] header{border-color:#29292d}html[data-theme="dark"] .brand{color:#fff}html[data-theme="dark"] header .icon,html[data-theme="dark"] .quick-values button,html[data-theme="dark"] .backup-buttons button{background:#202024}html[data-theme="dark"] input,html[data-theme="dark"] select,html[data-theme="dark"] textarea{background:#17171a;color:#fff;border-color:#343439}html[data-theme="dark"] .quick-form input,html[data-theme="dark"] .photo-placeholder,html[data-theme="dark"] #foodPreview,html[data-theme="dark"] #calendar button{background:#17171a;border-color:#343439}html[data-theme="dark"] .total-card,html[data-theme="dark"] .month-summary{background:#17171a}html[data-theme="dark"] .entry,html[data-theme="dark"] .month-foot,html[data-theme="dark"] #estimateResult,html[data-theme="dark"] .setting-row{border-color:#29292d}html[data-theme="dark"] .entry-symbol{background:#1b2433;color:#adc7f1}html[data-theme="dark"] .entry[data-meal="Dinner"] .entry-symbol{background:#2b1820;color:#ef9eb5}html[data-theme="dark"] .empty,html[data-theme="dark"] .photo-launch{border-color:#343439}html[data-theme="dark"] nav{background:rgba(11,11,13,.96);border-color:#29292d}html[data-theme="dark"] nav .active{color:#fff}html[data-theme="dark"] dialog{background:#111114;color:#fff}html[data-theme="dark"] .photo-actions button,html[data-theme="dark"] .estimate-head{background:#202024}html[data-theme="dark"] .photo-actions .primary{background:var(--red)}html[data-theme="dark"] #calendar button.logged{background:#162033;color:#adc7f1}html[data-theme="dark"] #calendar button.over{background:#2b1820;color:#ef9eb5}html[data-theme="dark"] #calendar button.at{background:#31171a;color:#ff858a}html[data-theme="dark"] .settings-note,html[data-theme="dark"] .small,html[data-theme="dark"] .entry-time,html[data-theme="dark"] .entry-kcal small,html[data-theme="dark"] .text-button,html[data-theme="dark"] .consent span{color:#aaa}@media(min-width:700px){html[data-theme="dark"] body{background:#050506}html[data-theme="dark"] .app{border-color:#29292d}}
.cloud-card{display:flex;align-items:center;justify-content:space-between;gap:16px;background:#f5f5f5;border-radius:14px;padding:15px;margin-bottom:20px}.cloud-card strong,.cloud-card span{display:block}.cloud-card strong{font-size:13px}.cloud-card span{font-size:10px;color:#777;margin-top:5px}.cloud-card a{flex-shrink:0;background:var(--red);color:#fff;text-decoration:none;border-radius:10px;padding:11px 13px;font-size:11px;font-weight:650}html[data-theme="dark"] .cloud-card{background:#202024}html[data-theme="dark"] .cloud-card span{color:#aaa}
.restore-form{margin-top:16px}.restore-form .primary{margin-top:-5px}
.onboarding{padding:30px}.onboarding h2{font-size:28px;letter-spacing:-.8px;margin:0 0 8px}.onboarding .settings-note{margin:0 0 24px}.onboarding label{font-size:12px}.onboarding input{font-size:28px;font-weight:650}.goal-presets{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:-5px 0 18px}.goal-presets button{min-height:44px;border-radius:10px;background:#f2f2f2;font-size:12px;font-weight:600}html[data-theme="dark"] .goal-presets button{background:#202024}
.macro-card{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:12px}.macro-card>div{padding:14px 10px;border-radius:14px;background:#f4f5f7;text-align:center}.macro-card span{display:block;color:#666;font-size:11px}.macro-card strong{display:block;margin-top:5px;font-size:18px;font-variant-numeric:tabular-nums}.month-macros{margin:12px 0 22px}.macro-inputs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.macro-inputs label{font-size:11px}.macro-inputs input{padding:12px 8px;text-align:center}.entry-macros{display:block;font-size:10px;color:#777;margin-top:4px}html[data-theme="dark"] .macro-card>div{background:#202024}html[data-theme="dark"] .macro-card span,html[data-theme="dark"] .entry-macros{color:#aaa}

