:root{--ground:#f3f5f2;--surface:#fff;--ink:#12201b;--muted:#56655f;--line:#e2e7e3;--line-soft:#edf0ee;--track:#e4e9e5;--accent:#1e7a52;--accent-hover:#155c3d;--accent-soft:#eaf5ef;--accent-ring:#1e7a5224;--accent-ink:#fff;--danger:#b42318;--protein:#2ba391;--carbs:#e9a53a;--fat:#e56a45;--radius-sm:12px;--radius:14px;--radius-card:20px;--radius-sheet:28px;--shadow-raised:0 1px 2px #12201b14;--shadow-card:0 1px 2px #12201b0f;--shadow-pop:0 2px 6px #12201b14, 0 24px 48px #12201b2e;--shadow-accent:0 6px 16px #1e7a5247;--column:480px;font-variant-numeric:tabular-nums;color:var(--ink);background:var(--ground);-webkit-font-smoothing:antialiased;font-family:Plus Jakarta Sans,system-ui,-apple-system,Segoe UI,sans-serif}*{box-sizing:border-box}[x-cloak]{display:none!important}body{background:var(--ground);margin:0}button,input,select{font:inherit;color:inherit}button{cursor:pointer;background:0 0;border:none;padding:0}button:disabled{cursor:default}:focus-visible{outline:2px solid var(--accent);outline-offset:2px}h1,h2,p{margin:0}.app{max-width:var(--column);min-height:100vh;margin:0 auto}.boot{color:var(--muted);text-align:center;padding-top:40vh}.header{align-items:center;gap:12px;display:flex}.logo{border-radius:var(--radius-sm);background:var(--accent);width:40px;height:40px;color:var(--accent-ink);letter-spacing:.02em;flex:none;place-items:center;font-size:15px;font-weight:800;display:grid}.brand{letter-spacing:-.02em;flex:1;font-size:22px;font-weight:800}.icon-button{border-radius:var(--radius);flex:none;place-items:center;width:44px;height:44px;display:grid}.icon-button.round{border-radius:50%}.icon-button.raised{background:var(--surface);box-shadow:var(--shadow-raised)}.icon-button.soft{background:var(--ground)}.icon-button:hover{background:var(--line-soft)}.icon-button.raised:hover{background:var(--surface);box-shadow:0 2px 8px #12201b1f}.primary{background:var(--accent);min-height:54px;color:var(--accent-ink);box-shadow:var(--shadow-accent);border-radius:16px;justify-content:center;align-items:center;gap:8px;padding:0 22px;font-size:16px;font-weight:700;transition:background .15s,transform .1s;display:flex}.primary:hover:not(:disabled){background:var(--accent-hover)}.primary:active:not(:disabled){transform:translateY(1px)}.primary:disabled{opacity:.6;box-shadow:none}.danger{min-height:54px;color:var(--danger);border:1.5px solid #f3c7c2;border-radius:16px;justify-content:center;align-items:center;gap:8px;padding:0 18px;font-weight:700;display:flex}.danger:hover:not(:disabled){background:#fdf0ee}.text-button{border-radius:var(--radius-sm);min-height:44px;color:var(--accent);padding:0 16px;font-size:14px;font-weight:700}.text-button:hover{background:var(--accent-soft)}.error{color:var(--danger);font-size:14px;font-weight:500}.card{background:var(--surface);box-shadow:var(--shadow-card), 0 12px 32px #12201b0f;border-radius:24px}.field{border:0;flex-direction:column;gap:8px;min-width:0;margin:0;padding:0;display:flex}.field>label,.field>legend,.field>.label{padding:0;font-size:13px;font-weight:700}fieldset.field>legend{margin-bottom:8px}.input-wrap{border-radius:var(--radius);background:var(--ground);border:1.5px solid var(--line);height:52px;color:var(--muted);align-items:center;gap:10px;padding:0 14px;transition:border-color .15s,box-shadow .15s,background .15s;display:flex}.input-wrap:focus-within{background:var(--surface);border-color:var(--accent);box-shadow:0 0 0 4px var(--accent-ring)}.input-wrap input{min-width:0;height:100%;color:var(--ink);background:0 0;border:0;outline:none;flex:1;font-size:16px}.input-wrap input::placeholder{color:#8a9791}.input-wrap .clear{border-radius:50%;width:36px;height:36px;margin-right:-6px}.input-wrap.suffixed{padding:0 0 0 14px;overflow:hidden}.input-wrap.suffixed input{font-size:18px;font-weight:700}.suffix{border-left:1.5px solid var(--line);align-self:stretch;align-items:center;padding:0 16px;font-size:15px;font-weight:700;display:flex}input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}.macro-bar{background:#ffffff1f;border-radius:4px;gap:3px;height:8px;display:flex}.macro-bar span{border-radius:4px;flex:0 1 0;min-width:0}.macro-bar.large{background:var(--track);height:12px}.macro-bar.large span{border-radius:6px}.protein{background:var(--protein)}.carbs{background:var(--carbs)}.fat{background:var(--fat)}.dot{border-radius:50%;flex:none;width:8px;height:8px;display:inline-block}.login-screen{flex-direction:column;gap:40px;min-height:100vh;padding:24px 20px 96px;display:flex;position:relative;overflow:hidden}.blob{pointer-events:none;border-radius:50%;position:absolute}.blob-1{background:#ddf2ec;width:320px;height:320px;top:-120px;right:-110px}.blob-2{background:#fdf1d8;width:92px;height:92px;top:70px;right:40px}.blob-3{background:#fbe3da;width:44px;height:44px;top:118px;right:150px}.login-screen>:not(.blob){position:relative}.welcome{flex-direction:column;gap:10px;padding-top:56px;display:flex}.welcome h1{letter-spacing:-.03em;font-size:34px;font-weight:800;line-height:1.1}.welcome p{color:var(--muted);font-size:16px;line-height:1.5}.login-card{flex-direction:column;gap:18px;padding:24px 20px;display:flex}.login-card .primary{margin-top:6px}.credit{text-align:center;color:var(--muted);font-size:12px;line-height:1.5;bottom:28px;left:20px;right:20px;position:absolute!important}.day-screen{flex-direction:column;gap:18px;padding:24px 20px 132px;display:flex}.menu{position:relative}.menu-panel{z-index:30;background:var(--surface);min-width:230px;box-shadow:var(--shadow-pop);border-radius:18px;padding:6px;position:absolute;top:calc(100% + 8px);right:0}.menu-panel>button{border-radius:var(--radius-sm);text-align:left;align-items:center;gap:10px;width:100%;min-height:44px;padding:0 12px;font-size:15px;font-weight:600;display:flex}.menu-panel>button svg{color:var(--muted)}.menu-panel>button:hover{background:var(--ground)}.menu-lang{justify-content:space-between;align-items:center;gap:12px;min-height:44px;padding:0 6px 0 12px;font-size:15px;font-weight:600;display:flex}.menu-user{border-bottom:1px solid var(--line-soft);color:var(--muted);overflow-wrap:anywhere;margin:6px 12px 8px;padding-bottom:10px;font-size:13px}.segmented{background:var(--track);border-radius:var(--radius);grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding:4px;display:grid}.segmented button{height:36px;color:var(--muted);border-radius:10px;font-size:14px;font-weight:600}.segmented button.active{background:var(--surface);color:var(--ink);font-weight:700;box-shadow:0 1px 3px #12201b1f}.lang-switch{background:var(--track);border-radius:var(--radius-sm);flex:none;gap:2px;padding:3px;display:flex}.lang-switch button{letter-spacing:.04em;min-width:34px;height:30px;color:var(--muted);border-radius:9px;padding:0 6px;font-size:12px;font-weight:700}.lang-switch button:hover{color:var(--ink)}.lang-switch button.active{background:var(--surface);color:var(--ink);box-shadow:0 1px 3px #12201b1f}.date-nav{justify-content:space-between;align-items:center;gap:8px;display:flex;position:relative}.date-label{border-radius:var(--radius-sm);flex-direction:column;align-items:center;gap:2px;padding:4px 14px;transition:background .15s,box-shadow .15s;display:flex}.date-label:hover,.date-label.open{background:var(--surface);box-shadow:var(--shadow-raised)}.date-label .weekday{color:var(--muted);text-transform:uppercase;letter-spacing:.08em;font-size:12px;font-weight:600}.date-label .date{align-items:center;gap:6px;font-size:17px;font-weight:700;display:flex}.date-label .chevron{transition:transform .15s}.date-label.open .chevron{transform:rotate(180deg)}.calendar{z-index:20;background:var(--surface);box-shadow:var(--shadow-pop);border-radius:24px;flex-direction:column;gap:12px;padding:18px 16px 12px;display:flex;position:absolute;top:calc(100% + 10px);left:0;right:0}.calendar-head{justify-content:space-between;align-items:center;display:flex}.calendar-head strong{font-size:17px;font-weight:800}.calendar-grid{text-align:center;grid-template-columns:repeat(7,minmax(0,1fr));gap:2px;display:grid}.calendar-weekday{color:var(--muted);padding:6px 0;font-size:12px;font-weight:700}.day-cell{border-radius:var(--radius);height:44px;font-size:15px;font-weight:500}.day-cell:not(:disabled):hover{background:var(--ground)}.day-cell.today{color:var(--accent);font-weight:800}.day-cell.selected{background:var(--accent);color:var(--accent-ink);font-weight:800;box-shadow:0 4px 12px #1e7a524d}.day-cell.selected:hover{background:var(--accent)}.calendar-foot{border-top:1px solid var(--line-soft);justify-content:center;padding-top:6px;display:flex}.summary{--protein:#5cc8b8;--carbs:#f2b84b;--fat:#f07e5c;background:var(--ink);color:#fff;border-radius:22px;flex-direction:column;gap:14px;padding:18px 20px;display:flex}.summary-top{color:#b9c6c0;justify-content:space-between;font-size:13px;font-weight:600;display:flex}.summary-kcal{align-items:baseline;gap:6px;display:flex}.summary-kcal strong{letter-spacing:-.03em;font-size:44px;font-weight:800;line-height:1}.summary-kcal span{color:#b9c6c0;font-size:17px;font-weight:600}.macro-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;display:grid}.macro-grid div{flex-direction:column;gap:2px;display:flex}.macro-label{color:#b9c6c0;align-items:center;gap:6px;font-size:12px;display:flex}.macro-grid strong{font-size:16px;font-weight:700}.empty{border-radius:var(--radius-card);border:1.5px dashed var(--line);color:var(--muted);text-align:center;flex-direction:column;align-items:center;gap:6px;padding:32px 16px;display:flex}.meal-card{background:var(--surface);border-radius:var(--radius-card);box-shadow:var(--shadow-card);padding:6px 8px 4px}.meal-card h2{justify-content:space-between;align-items:center;padding:12px 8px 8px;font-size:16px;font-weight:700;display:flex}.meal-title{align-items:center;gap:10px;display:flex}.meal-kcal{color:var(--muted);font-size:14px;font-weight:600}.meal-icon{border-radius:10px;place-items:center;width:30px;height:30px;display:grid}.meal-icon.breakfast{color:#9a6a0b;background:#fdf1d8}.meal-icon.mid_morning_snack{color:#1e6b5f;background:#ddf2ec}.meal-icon.lunch{color:#a6432a;background:#fbe3da}.meal-icon.mid_afternoon_snack{color:#7d5a1c;background:#f6ecd9}.meal-icon.dinner{color:#3446a0;background:#e3e8f8}.meal-icon.late_night_snack{color:#5b3e99;background:#ece5f7}.meal-card ul{margin:0;padding:0;list-style:none}.meal-card li+li .entry,.meal-card li:first-child .entry{border-top:1px solid var(--line-soft)}.entry{text-align:left;border-radius:10px;align-items:center;gap:12px;width:100%;min-height:48px;padding:12px 8px;display:flex}.entry:hover{background:var(--ground)}.entry-name{flex:1;min-width:0;font-size:15px;font-weight:500}.entry-grams{color:var(--muted);flex:none;font-size:14px}.entry-kcal{text-align:right;flex:none;min-width:72px;font-size:15px;font-weight:700}.footer{z-index:10;border-top:1px solid var(--line);-webkit-backdrop-filter:blur(10px);background:#fffffff0;position:fixed;bottom:0;left:0;right:0}.footer-bar{max-width:var(--column);padding:14px 20px calc(18px + env(safe-area-inset-bottom));justify-content:space-between;align-items:center;gap:16px;margin:0 auto;display:flex}.total{text-align:left;flex-direction:column;align-items:flex-start;gap:2px;min-height:44px;display:flex}.total-label{color:var(--muted);align-items:center;gap:4px;font-size:12px;font-weight:600;display:flex}.total strong{letter-spacing:-.02em;font-size:24px;font-weight:800}.overlay{z-index:40;background:#12201b8c;justify-content:center;align-items:flex-end;display:flex;position:fixed;inset:0}.sheet{width:100%;max-width:var(--column);max-height:calc(100vh - 48px);padding:10px 20px calc(28px + env(safe-area-inset-bottom));background:var(--surface);border-radius:var(--radius-sheet) var(--radius-sheet) 0 0;flex-direction:column;gap:18px;animation:.22s ease-out sheet-in;display:flex;overflow-y:auto;box-shadow:0 -12px 40px #12201b33}@keyframes sheet-in{0%{transform:translateY(24px)}}.sheet-handle{background:#d5dcd7;border-radius:3px;flex:none;align-self:center;width:40px;height:5px}.sheet-head{justify-content:space-between;align-items:flex-start;gap:12px;display:flex}.sheet-head h2{letter-spacing:-.02em;font-size:22px;font-weight:800;line-height:44px}.sheet-head div h2{line-height:1.3}.sheet-sub{color:var(--muted);font-size:13px;font-weight:500}.sheet-text{color:var(--muted);font-size:15px;line-height:1.5}.sheet-actions{gap:12px;display:flex}.sheet-actions .primary{flex:1}.pills{scrollbar-width:none;-webkit-user-select:none;user-select:none;gap:8px;margin:0 -20px;padding:2px 20px 4px;display:flex;position:relative;overflow-x:auto}.pills::-webkit-scrollbar{display:none}.pills.dragging{cursor:grabbing}.pill{border:1.5px solid var(--line);border-radius:20px;flex:none;align-items:center;gap:6px;height:40px;padding:0 16px;font-size:14px;font-weight:600;transition:background .15s,border-color .15s;display:flex}.pill:hover{border-color:#c5cec8}.pill.selected{background:var(--accent);border-color:var(--accent);color:var(--accent-ink);font-weight:700}.results{background:var(--ground);border-radius:16px;flex-direction:column;gap:2px;max-height:260px;margin:0;padding:6px;list-style:none;display:flex;overflow-y:auto}.results li{border-radius:var(--radius-sm);cursor:pointer;align-items:center;gap:12px;padding:10px 12px;display:flex}.results li.highlighted{background:var(--surface);box-shadow:var(--shadow-raised)}.results li.hint{color:var(--muted);cursor:default;font-size:14px}.result-text{flex-direction:column;flex:1;gap:2px;min-width:0;display:flex}.result-name{font-size:15px;font-weight:600}.results li.highlighted .result-name{font-weight:700}.result-category{color:var(--muted);font-size:12px}.result-kcal{color:var(--muted);flex:none;font-size:13px}.result-kcal strong{color:var(--ink)}.readonly{border-radius:var(--radius);background:var(--ground);padding:14px;font-size:16px;font-weight:600}.portion{background:var(--accent-soft);border-radius:16px;justify-content:space-between;align-items:center;gap:12px;padding:12px 14px;display:flex}.portion-kcal{color:#3d5a4c;flex-direction:column;gap:2px;font-size:12px;font-weight:600;display:flex}.portion-kcal strong{color:var(--ink);font-size:20px;font-weight:800}.portion-macros{color:var(--ink);gap:12px;font-size:13px;font-weight:700;display:flex}.portion-macros>span{align-items:center;gap:5px;display:flex}.energy{background:var(--ground);border-radius:18px;flex-direction:column;gap:10px;padding:14px;display:flex}.eyebrow{color:var(--muted);text-transform:uppercase;letter-spacing:.08em;font-size:12px;font-weight:700}.energy-legend{justify-content:space-between;gap:8px;font-size:13px;font-weight:600;display:flex}.energy-legend>span{align-items:center;gap:6px;display:flex}.energy-legend .dot{width:9px;height:9px}.nutrients{flex-direction:column;margin:0;display:flex}.nutrients div{border-bottom:1px solid var(--line-soft);justify-content:space-between;align-items:baseline;padding:11px 0;display:flex}.nutrients div:last-child{border-bottom:0}.nutrients dt{font-size:15px;font-weight:600}.nutrients dd{margin:0;font-size:15px;font-weight:700}.nutrients .headline dt{font-size:16px;font-weight:800}.nutrients .headline dd{font-size:18px;font-weight:800}.nutrients div:has(+.sub){border-bottom:0;padding-bottom:6px}.nutrients .sub{padding:0 0 11px 16px}.nutrients .sub dt,.nutrients .sub dd{color:var(--muted);font-size:14px;font-weight:600}.nutrients .sub dt{font-weight:400}.footnote{color:var(--muted);font-size:12px;line-height:1.5}.result-name{align-items:center;gap:8px;display:flex}.badge{background:var(--accent-soft);color:var(--accent);border-radius:10px;flex:none;padding:2px 8px;font-size:11px;font-weight:700}.new-button{border:1.5px dashed var(--accent);min-height:52px;color:var(--accent);border-radius:16px;flex:none;justify-content:center;align-items:center;gap:8px;font-size:16px;font-weight:700;display:flex}.new-button:hover{background:var(--accent-soft)}.food-list{background:var(--ground);border-radius:16px;flex-direction:column;gap:2px;margin:0;padding:6px;list-style:none;display:flex}.food-list button{border-radius:var(--radius-sm);text-align:left;align-items:center;gap:12px;width:100%;min-height:56px;padding:10px 8px 10px 12px;display:flex}.food-list button:hover{background:var(--surface);box-shadow:var(--shadow-raised)}.food-list .result-name{font-weight:700}.food-list svg{color:var(--muted);flex:none}.custom-form{gap:16px}.custom-form .sheet-head{align-items:center;gap:8px}.custom-form .sheet-head h2{flex:1;min-width:0}.custom-form .back{margin-left:-10px}.optional{color:var(--muted);font-weight:500}.field-row{grid-template-columns:repeat(2,minmax(0,1fr));align-items:end;gap:12px;display:grid}.input-wrap.unit{gap:0;padding:0 0 0 14px}.input-wrap.unit input{font-weight:700}.input-wrap.unit span{padding:0 14px;font-size:14px;font-weight:700}.per-100g{background:var(--ground);border:0;border-radius:18px;min-width:0;margin:0;padding:14px}.per-100g legend{float:left;width:100%;margin-bottom:12px;padding:0;font-size:13px;font-weight:700}.nutrient-grid{clear:both;grid-template-columns:repeat(2,minmax(0,1fr));align-items:end;gap:10px 12px;display:grid}.nutrient-grid .field{gap:4px}.nutrient-grid label{color:#3d5a4c;align-items:center;gap:6px;font-size:12px;font-weight:600;display:flex}.nutrient-grid .input-wrap{border-radius:var(--radius-sm);background:var(--surface);height:44px}.nutrient-grid .input-wrap span{padding:0 12px;font-size:13px;font-weight:600}.input-wrap.required{border-color:var(--accent)}.dot.kcal{background:var(--ink)}.dot.neutral{background:#c9d2cd}.form-foot{bottom:calc(-28px - env(safe-area-inset-bottom));z-index:1;margin:0 -20px calc(-28px - env(safe-area-inset-bottom));padding:12px 20px calc(28px + env(safe-area-inset-bottom));background:var(--surface);border-top:1px solid var(--line);flex-direction:column;gap:10px;display:flex;position:sticky}.form-note{color:var(--muted);align-items:center;gap:8px;font-size:12px;display:flex}.form-note svg{flex:none}.sync-status{background:var(--ground);border-radius:16px;padding:12px 14px;font-size:14px;line-height:1.5}.sync-status.done{background:var(--accent-soft);color:#234a37}.sync-status.failed{color:var(--danger);background:#fdf0ee}.spinner{vertical-align:-1px;border:2px solid var(--line);border-top-color:var(--accent);border-radius:50%;width:12px;height:12px;animation:.8s linear infinite spin;display:inline-block}@keyframes spin{to{transform:rotate(360deg)}}@media (width>=600px){.overlay{align-items:center;padding:24px}.sheet{border-radius:var(--radius-sheet);max-height:calc(100vh - 48px);padding-bottom:28px}.sheet-handle{display:none}}@media (prefers-reduced-motion:reduce){.spinner,.sheet{animation:none}*{transition:none!important}}
