:root{--paper:#F2F1EC;--ink:#171918;--lima:#D9F36A;--lav:#B9B2FF;--coral:#FF986F;--stone:#D8D7D2;--grey:#6B6E69;--track:#E6E5DF;--card:#fff;--soft:#C9CCC6}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;background:var(--paper);color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,system-ui,sans-serif;-webkit-text-size-adjust:100%}
body{min-height:100dvh}
button{font:inherit;color:inherit;cursor:pointer}
#view{max-width:520px;margin:0 auto;padding:calc(env(safe-area-inset-top,0px) + 28px) 20px calc(env(safe-area-inset-bottom,0px) + 120px);display:flex;flex-direction:column;gap:12px}
h1{margin:0;font-size:32px;font-weight:800;letter-spacing:-.03em}
.c{background:var(--card);border-radius:24px;padding:16px 18px}
.r{display:flex;justify-content:space-between;align-items:baseline;gap:12px}
.rc{align-items:center}
.n{font-size:15px}.m{font-size:12px;color:var(--grey);font-weight:600;overflow-wrap:anywhere}
.big{font-size:24px;font-weight:800;letter-spacing:-.02em}
.bar{height:10px;border-radius:99px;background:var(--track);overflow:hidden}.bar i{display:block;height:100%;border-radius:99px}
.h{font-size:12px;font-weight:700;letter-spacing:.08em;color:var(--grey);margin:10px 4px 0;text-transform:uppercase}
.hero{background:var(--ink);color:#fff;border-radius:28px;padding:20px 22px}
.hero .bar{background:#2A2D2B}.hero .k{font-size:11px;font-weight:700;letter-spacing:.08em;color:var(--soft)}
.hero .v{font-size:44px;font-weight:800;letter-spacing:-.03em}.hero .s{font-size:13px;color:var(--soft)}
.pill{display:inline-block;background:var(--lima);color:var(--ink);border-radius:99px;padding:6px 12px;font-size:12px;font-weight:700}
.btn{border:0;background:var(--ink);color:var(--lima);border-radius:99px;padding:10px 16px;font-weight:700;font-size:13px;min-height:44px}
.btn.alt{background:var(--track);color:var(--ink)}
.seg{display:flex;background:var(--track);border-radius:99px;padding:4px}
.seg button{border:0;background:none;border-radius:99px;padding:9px 16px;font-weight:700;font-size:13px;color:var(--grey);min-height:36px}
.seg button[aria-pressed=true]{background:var(--ink);color:#fff}
.cat{margin-top:12px}.cat .bar{height:8px;margin-top:6px}
.hist{display:flex;gap:8px}.hist>div{flex:1;text-align:center}
.hist .col{height:100px;display:flex;align-items:flex-end;justify-content:center}.hist .col div{width:34px;border-radius:10px;min-height:4px}
.hist b{display:block;font-size:11px;margin-top:6px}
.note{font-size:12px;text-align:center;color:var(--grey);font-weight:600}
.empty{padding:28px 18px;text-align:center}.empty b{font-size:17px}.empty p{margin:6px 0 14px;color:var(--grey);font-size:14px}
/* nav flotante */
#nav{position:fixed;left:16px;right:16px;bottom:calc(env(safe-area-inset-bottom,0px) * .45 + 10px);max-width:488px;margin:0 auto;height:68px;background:#fff;border-radius:28px;box-shadow:0 8px 30px rgba(23,25,24,.12);display:flex;align-items:center;justify-content:space-around;padding:0 8px;z-index:5}
#nav button{border:0;background:none;width:52px;height:52px;border-radius:20px;display:grid;place-items:center}
#nav button[aria-current=page]{background:var(--lima);width:64px}
#nav .plus{background:var(--ink);border-radius:50%;width:52px;height:52px}
svg.i{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
#nav .plus svg{stroke:#fff}
/* hojas */
#sheet-root .back{position:fixed;inset:0;background:rgba(23,25,24,.5);z-index:10;display:flex;align-items:flex-end;justify-content:center}
.sheet{width:100%;max-width:520px;background:#fff;border-radius:28px 28px 0 0;padding:12px 20px calc(env(safe-area-inset-bottom,0px) + 20px);display:grid;gap:14px;max-height:92dvh;overflow-y:auto}
.sheet .grab{justify-self:center;width:40px;height:5px;border-radius:99px;background:var(--stone)}
.sheet h2{margin:0;font-size:22px;font-weight:800;letter-spacing:-.02em}
.x{border:0;background:var(--paper);border-radius:50%;width:44px;height:44px;display:grid;place-items:center}
.tiles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.tile{border:0;border-radius:22px;padding:16px;text-align:left;display:grid;gap:14px;min-height:112px;align-content:space-between}
.tile b{display:block;font-size:16px}.tile span.m{color:#33362F}
.tile[disabled]{opacity:.55;cursor:default}
label.f{display:grid;gap:6px;font-size:12px;font-weight:700;color:var(--grey)}
input,select,textarea{font:inherit;font-size:16px;border:1.5px solid var(--stone);border-radius:16px;padding:12px 14px;background:#fff;color:var(--ink);width:100%;min-height:48px}
textarea{min-height:120px;font-family:ui-monospace,Menlo,monospace;font-size:13px}
.actions{display:flex;gap:10px}.actions .btn{flex:1}
.err{color:#B3361B;font-size:13px;font-weight:600}
.list .row{display:flex;justify-content:space-between;gap:12px;padding:11px 0;border-bottom:1px solid #EDECE6}.list .row:last-child{border-bottom:0}
.list .row span:first-child{min-width:0;overflow-wrap:anywhere}
#toast{position:fixed;left:50%;bottom:calc(env(safe-area-inset-bottom,0px) * .45 + 94px);transform:translateX(-50%) translateY(20px);background:var(--ink);color:#fff;padding:12px 18px;border-radius:99px;font-size:13px;font-weight:700;opacity:0;transition:.25s;pointer-events:none;z-index:20;max-width:90%}
#toast.on{opacity:1;transform:translateX(-50%)}
:focus-visible{outline:3px solid var(--ink);outline-offset:2px}
@media (prefers-reduced-motion:reduce){*{transition:none!important}}

.chip{border:0;border-radius:99px;padding:9px 11px;font-size:12px;font-weight:700;background:var(--paper);color:var(--grey);min-height:40px}
.chip[aria-pressed=true][data-st=si]{background:var(--lima);color:var(--ink)}
.chip[aria-pressed=true][data-st=poco]{background:var(--coral);color:var(--ink)}
.chip[aria-pressed=true][data-st=no]{background:var(--ink);color:#fff}
.day{display:flex;gap:14px;padding:14px 16px}.day .d{width:40px;text-align:center;flex:none}
.meal{display:flex;gap:10px;align-items:baseline}.k2{font-size:10px;font-weight:700;letter-spacing:.08em;color:var(--grey);width:48px;flex:none}
.check{width:44px;height:44px;border:0;background:none;display:grid;place-items:center;flex:none;position:relative}
.check::before{content:"";position:absolute;width:26px;height:26px;border-radius:50%;border:2px solid var(--stone)}
.check[aria-pressed=true]::before{background:var(--lima);border-color:var(--lima)}.check svg{position:relative;width:18px;height:18px}
form.c input{background:none}
