:root{--bg:#edf3f0;--surface:#fff;--surface-2:#f4f8f6;--ink:#12302b;--muted:#587068;--line:#d3e0db;--accent:#0b6e5f;--accent-ink:#fff;--accent-soft:#d6ebe5;--warm:#d9682a;--good:#1a7f4b;--shadow:0 1px 2px #12302b14, 0 4px 14px #12302b0f;--display:"Bricolage Grotesque", "Avenir Next", "Segoe UI", sans-serif;--body:"Figtree", "Segoe UI", system-ui, sans-serif}@media (prefers-color-scheme:dark){:root:not([data-theme=light]){--bg:#0e1917;--surface:#162521;--surface-2:#1c2f2a;--ink:#e5f1ed;--muted:#94aba4;--line:#29413b;--accent:#4fc3a8;--accent-ink:#082019;--accent-soft:#1f3b34;--warm:#f0a066;--good:#5fd08f;--shadow:none;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}}:root[data-theme=dark]{--bg:#0e1917;--surface:#162521;--surface-2:#1c2f2a;--ink:#e5f1ed;--muted:#94aba4;--line:#29413b;--accent:#4fc3a8;--accent-ink:#082019;--accent-soft:#1f3b34;--warm:#f0a066;--good:#5fd08f;--shadow:none;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}*{box-sizing:border-box}html,body{min-height:100%}body{background:var(--bg);color:var(--ink);font-family:var(--body);padding-block:0;padding-left:max(16px, env(safe-area-inset-left,0px));padding-right:max(16px, env(safe-area-inset-right,0px));-webkit-text-size-adjust:100%;font-size:16px;line-height:1.4}button,input,select,textarea{font:inherit;color:inherit}h1,h2,h3{font-family:var(--display);text-wrap:balance;margin:0}:focus-visible{outline:3px solid var(--accent);outline-offset:2px}.app{flex-direction:column;gap:14px;max-width:560px;margin:0 auto;padding-block:12px 96px;display:flex}main{flex-direction:column;gap:14px;min-width:0;display:flex}.daynav{text-align:center;grid-template-columns:44px 1fr 44px;align-items:center;display:grid}.daynav-mid{flex-direction:column;align-items:center;min-width:0;display:flex}.daynav strong{font-family:var(--display);text-transform:capitalize;font-size:1.25rem}.icon-btn{cursor:pointer;min-width:44px;min-height:44px;color:var(--muted);background:0 0;border:0;border-radius:12px;font-size:1.3rem}.icon-btn:hover{background:var(--accent-soft)}.link-btn{color:var(--accent);cursor:pointer;text-align:left;background:0 0;border:0;padding:6px 0;font-size:.9rem;font-weight:600}.hero{background:var(--surface);box-shadow:var(--shadow);border-radius:22px;align-items:center;gap:20px;padding:18px;display:flex}.ring{flex:none;width:148px;height:148px;position:relative}.ring svg{width:100%;height:100%}.ring-bg{fill:none;stroke:var(--accent-soft);stroke-width:14px}.ring-fg{fill:none;stroke:var(--accent);stroke-width:14px;stroke-linecap:round;transition:stroke-dashoffset .4s}.ring-fg.over{stroke:var(--warm)}.ring-text{flex-direction:column;justify-content:center;align-items:center;display:flex;position:absolute;inset:0}.ring-text strong{font-family:var(--display);font-variant-numeric:tabular-nums;font-size:2.6rem;line-height:1}.ring-text span{color:var(--muted);font-size:.85rem}.hero-stats{flex:1;gap:10px;min-width:0;margin:0;display:grid}.hero-stats div{border-bottom:1px solid var(--line);justify-content:space-between;align-items:baseline;gap:8px;padding-bottom:6px;display:flex}.hero-stats div:last-child{border:0;padding:0}.hero-stats dt{color:var(--muted);font-size:.85rem}.hero-stats dd{font-family:var(--display);font-variant-numeric:tabular-nums;margin:0;font-size:1.25rem;font-weight:700}.hero-stats .bad dd,.bad{color:var(--warm)}.good{color:var(--good)}.weekline{color:var(--muted);margin:-4px 4px 0;font-size:.85rem}.meal,.card{background:var(--surface);box-shadow:var(--shadow);border-radius:18px;flex-direction:column;gap:10px;min-width:0;padding:14px 16px;display:flex}.meal header{align-items:center;gap:10px;display:flex}.meal h2,.card h2{font-size:1.1rem}.meal h2{flex:1;min-width:0}.meal-sub{color:var(--muted);font-variant-numeric:tabular-nums;font-size:.9rem}.empty{color:var(--muted);margin:0;font-size:.9rem}.entries,.list{flex-direction:column;margin:0;padding:0;list-style:none;display:flex}.entries li{border-top:1px solid var(--line);align-items:center;gap:8px;padding:8px 0;display:flex}.entry-text{flex-direction:column;flex:1;min-width:0;display:flex}.entry-text span{overflow-wrap:anywhere}.entry-text small,.row-main small{color:var(--muted);overflow-wrap:anywhere;font-size:.8rem}.badge{font-family:var(--display);background:var(--accent-soft);color:var(--ink);white-space:nowrap;font-variant-numeric:tabular-nums;border-radius:999px;padding:2px 12px;font-size:1.1rem;font-weight:700}.badge small{color:var(--muted);font-size:.75rem;font-weight:500}.badge.big{padding:4px 20px;font-size:2rem}.btn{border:1.5px solid var(--line);background:var(--surface);cursor:pointer;border-radius:12px;min-height:44px;padding:10px 16px;font-weight:600}.btn.small{background:var(--accent-soft);min-height:36px;color:var(--ink);border-color:#0000;padding:6px 12px;font-size:.9rem}.btn.primary{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}.btn.danger{background:var(--warm);color:#fff;border-color:var(--warm)}.btn.wide{width:100%}.btn:disabled{opacity:.45;cursor:not-allowed}.input{border:1.5px solid var(--line);background:var(--surface-2);border-radius:12px;width:100%;min-height:44px;padding:9px 12px}textarea.input{resize:vertical}.field{flex-direction:column;gap:4px;min-width:0;display:flex}.field label,.field>label{color:var(--muted);font-size:.85rem;font-weight:600}.grid2{grid-template-columns:1fr 1fr;gap:10px;display:grid}.grid3{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;display:grid}.inline{flex-wrap:wrap;gap:8px;display:flex}.inline .input{flex:1}.hint{color:var(--muted);margin:0;font-size:.85rem}.hint.center{text-align:center}.error{color:var(--warm);margin:0}.result{flex-direction:column;align-items:flex-start;gap:6px;padding:8px 0;display:flex}.stepper{background:var(--surface-2);border-radius:14px;align-items:center;gap:4px;width:fit-content;display:inline-flex}.stepper button{cursor:pointer;background:0 0;border:0;border-radius:14px;width:48px;height:48px;font-size:1.5rem}.stepper span{text-align:center;min-width:56px;font-family:var(--display);font-variant-numeric:tabular-nums;font-size:1.3rem;font-weight:700}.chips{flex-wrap:wrap;gap:6px;display:flex}.chip{border:1.5px solid var(--line);background:var(--surface);cursor:pointer;border-radius:999px;min-height:36px;padding:6px 12px;font-size:.85rem}.chip.on{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}.tabs{background:var(--surface-2);border-radius:12px;grid-template-columns:repeat(3,1fr);padding:3px;display:grid}.tabs button{cursor:pointer;color:var(--muted);background:0 0;border:0;border-radius:10px;padding:9px;font-weight:600}.tabs button.on{background:var(--surface);color:var(--ink);box-shadow:var(--shadow)}.sub{text-transform:uppercase;letter-spacing:.08em;color:var(--muted);font-size:.8rem;font-family:var(--body);margin:12px 0 2px}.list li{border-top:1px solid var(--line);align-items:center;display:flex}.row-main{text-align:left;cursor:pointer;background:0 0;border:0;flex-direction:column;flex:1;align-items:flex-start;gap:1px;min-width:0;padding:10px 0;display:flex}.star{min-width:44px;min-height:44px;color:var(--line);cursor:pointer;background:0 0;border:0;font-size:1.3rem}.star.on{color:var(--warm)}.food-title{margin:4px 0 10px;font-size:1.3rem}.toast{background:var(--accent);color:var(--accent-ink);border-radius:12px;margin:0;padding:10px 14px}.formula{font-family:var(--display);background:var(--accent-soft);border-radius:12px;margin:0;padding:12px;font-size:1.1rem}.method ul{flex-direction:column;gap:4px;margin:0;padding-left:18px;display:flex}.chart{width:100%;height:auto}.chart .grid{stroke:var(--line);stroke-width:1px}.chart .axis{fill:var(--muted);font-size:9px;font-family:var(--body)}.chart .line{stroke:var(--accent);stroke-width:2px;stroke-linejoin:round}.chart .dot{fill:var(--accent)}.chart .dot.end{fill:var(--warm);stroke:var(--surface);stroke-width:2px}.sheet-backdrop{z-index:50;background:#08181480;justify-content:center;align-items:flex-end;display:flex;position:fixed;inset:0}.sheet{background:var(--bg);width:min(100%,560px);max-height:92%;padding-bottom:env(safe-area-inset-bottom,0px);border-radius:22px 22px 0 0;flex-direction:column;display:flex}.sheet-head{justify-content:space-between;align-items:center;padding:12px 8px 4px 18px;display:flex}.sheet-head h2{font-size:1.15rem}.sheet-body{flex-direction:column;gap:12px;padding:4px 16px 18px;display:flex;overflow-y:auto}.tabbar{z-index:20;background:var(--surface);border-top:1px solid var(--line);padding:6px max(8px, env(safe-area-inset-right,0px)) env(safe-area-inset-bottom,0px) max(8px, env(safe-area-inset-left,0px));justify-content:center;display:flex;position:fixed;bottom:0;left:0;right:0}.tabbar button{max-width:140px;min-height:52px;color:var(--muted);cursor:pointer;background:0 0;border:0;border-radius:12px;flex-direction:column;flex:1;align-items:center;gap:2px;padding:6px 4px;font-size:.72rem;font-weight:600;display:flex}.tabbar button.on{color:var(--accent)}.tabbar svg{fill:none;stroke:currentColor;stroke-width:1.8px;stroke-linecap:round;stroke-linejoin:round;width:24px;height:24px}@media (width<=400px){.hero{flex-direction:column;align-items:stretch}.ring{align-self:center}}@media (prefers-reduced-motion:reduce){.ring-fg{transition:none}}.gate{flex-direction:column;gap:14px;max-width:360px;margin:18vh auto 0;display:flex}.gate h1{font-size:2rem}.habits{flex-wrap:wrap;gap:6px;display:flex}.chip.habit{background:var(--accent-soft);text-align:left;overflow-wrap:anywhere;border-color:#0000;max-width:100%}.chip.habit b{font-family:var(--display);white-space:nowrap;margin-left:4px}.cat{border-top:1px solid var(--line)}.cat summary{cursor:pointer;justify-content:space-between;padding:12px 0;font-weight:600;list-style:none;display:flex}.cat summary:after{content:"▾";color:var(--muted)}.cat[open] summary:after{content:"▴"}.check{color:var(--muted);align-items:flex-start;gap:8px;font-size:.9rem;display:flex}.check input{width:20px;height:20px;accent-color:var(--accent);flex:none;margin-top:1px}.methods{flex-direction:column;gap:8px;display:flex}.method-opt{border:1.5px solid var(--line);cursor:pointer;border-radius:12px;align-items:flex-start;gap:10px;padding:10px 12px;display:flex}.method-opt.on{border-color:var(--accent);background:var(--accent-soft)}.method-opt input{accent-color:var(--accent);margin-top:3px}.method-opt span{flex-direction:column;min-width:0;display:flex}.method-opt small{color:var(--muted)}
