:root{color-scheme:light;--bg:#F5F5F7;--text:#1D1D1F;--muted:#6E6E73;--line:#D2D2D7;--blue:#0071E3;--green:#34A853;--yellow:#F5C542;--red:#EA5455}
*{box-sizing:border-box}
[hidden]{display:none!important}
body{margin:0;background:var(--bg);color:var(--text);font:15px/1.5 -apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",sans-serif;-webkit-font-smoothing:antialiased}
button,input{font:inherit;color:inherit}
button{cursor:pointer;touch-action:manipulation}
button:disabled{cursor:default}
button:focus-visible,input:focus-visible,a:focus-visible{outline:3px solid var(--blue);outline-offset:3px}
nav{height:64px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 max(16px,calc((100% - 720px)/2));background:rgba(255,255,255,.85);border-bottom:1px solid var(--line);backdrop-filter:blur(20px);position:sticky;top:0;z-index:1}
.brand{display:flex;align-items:center;gap:8px;font-size:17px;font-weight:600;white-space:nowrap}
.back{text-decoration:none;color:var(--blue);font-size:32px;line-height:1;width:32px;text-align:center}
#sync{font-size:12px;color:var(--muted);text-align:right}
#sync[data-state=ok]{color:#248A3D}
#sync[data-state=offline]{color:#8A4500}
main{max-width:720px;margin:auto;padding:36px 16px 60px;display:flex;flex-direction:column;gap:20px}
h1{font-size:clamp(26px,5vw,34px);letter-spacing:-.8px;line-height:1.2;margin:0 0 8px}
header p{margin:0;color:var(--muted);font-size:14px}
.card{background:white;border-radius:18px;padding:24px}
h2{font-size:20px;letter-spacing:-.3px;margin:0}
.entry-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px;font-weight:600;font-size:17px}
input[type=date]{border:1px solid var(--line);border-radius:10px;padding:9px 10px;background:white;min-width:0;max-width:100%}
.choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.choices button{display:flex;align-items:center;justify-content:center;gap:8px;min-height:48px;border:1px solid var(--line);border-radius:12px;background:white;font-size:14px}
.choices button[aria-pressed=true]{border-color:var(--text);box-shadow:inset 0 0 0 1px var(--text);font-weight:600;background:var(--bg)}
.choices button:disabled{opacity:.45}
.dot{display:inline-block;width:10px;height:10px;border-radius:50%;flex-shrink:0}
.vegan{background:var(--green)}.vegetarian{background:var(--yellow)}.meat{background:var(--red)}
.note{font-size:12px;color:var(--muted);margin:14px 0 0}
.month-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:22px;gap:12px}
.arrow{width:40px;height:40px;border:0;border-radius:50%;background:var(--bg);font-size:28px;line-height:1}
.arrow:disabled{opacity:.25}
.weekdays,.calendar{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));text-align:center;gap:6px}
.weekdays{color:var(--muted);font-size:12px;margin-bottom:10px}
.day{display:flex;align-items:center;flex-direction:column;justify-content:center;gap:8px;min-height:60px;padding:7px 0;border:1px solid transparent;background:none;border-radius:12px;font-size:14px;font-variant-numeric:tabular-nums}
.day:hover:not(:disabled){background:var(--bg)}
.day[aria-pressed=true]{border-color:var(--blue);background:#F0F6FF}
.day[aria-current=date] .number{font-weight:700;color:var(--blue)}
.day:disabled{color:#9E9EA3}
.day:disabled .dot{background:none;border:1px solid #E8E8ED}
.legend{display:flex;justify-content:center;flex-wrap:wrap;gap:18px;font-size:12px;color:var(--muted);margin-top:20px}
.legend span,.breakdown span{display:flex;align-items:center;gap:6px}
.stats-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.ranges{display:flex;background:#EEEEF0;border-radius:9px;padding:3px}
.ranges button{border:0;background:none;padding:7px 12px;border-radius:7px;font-size:12px;min-height:34px}
.ranges button[aria-pressed=true]{background:white;box-shadow:0 1px 3px #0002;font-weight:600}
.headline{margin:24px 0 16px;line-height:1.4}
.headline strong{display:block;font-size:clamp(25px,6vw,34px);letter-spacing:-.7px}
.headline>span{color:var(--muted);font-size:14px}
.breakdown{display:flex;flex-wrap:wrap;gap:12px 20px;font-size:13px;color:var(--muted)}
.breakdown b{color:var(--text)}
#error{max-width:720px;margin:32px auto;padding:0 16px;color:#D70015}
@media(max-width:420px){.card{padding:20px 16px}.entry-head{font-size:15px;gap:8px}.choices button{gap:5px;font-size:12px}.calendar{gap:3px}.day{min-height:54px}.stats-head{align-items:flex-start;flex-direction:column}}
