/* Base: margens zeradas e área segura do iPhone (notch e barra inferior) */
:root{padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px);color-scheme:light}
body{margin:0}
img{max-width:100%}
[hidden]{display:none!important}

/* Layout: mobile-first app shell — top bar + barra inferior verde-escura no celular; barra lateral verde-escura a partir de 900px.
   Paleta inspirada na plataforma "Você Saudável com Alê": verde-floresta, sálvia, cinzas claros e grupos em vermelho/azul/verde. */
:root{
  --bg:#F6F7F6; --surface:#FFFFFF; --surface-2:#EDF0EC; --ink:#232B26; --muted:#6E7872; --line:#E2E6E1;
  --accent:#3F5A3C; --accent-ink:#FFFFFF; --accent-soft:#E4EADC;
  --forest:#2C3B2E; --forest-2:#3D4F3F; --on-forest:#FFFFFF; --on-forest-muted:#B9C4B5;
  --sage:#B4BFA2; --sage-ink:#26301F; --sage-text:#8A9A7B;
  --prot:#4E9F4A; --carb:#3A7BC8; --fat:#C9483F;
  --g-con:#D2463C; --g-ene:#2F78C4; --g-reg:#43A047; --g-fat:#E0A526;
  --ring-ok:#3E9B45; --ring-over:#D2463C; --ring-under:#5C6660; --ring-track:#ECEFEB; --ring-light:#C2C8C4; --ring-dark:#434B46;
  --warn:#9A6400; --warn-soft:#FBEFD5; --bad:#B23A2E; --bad-soft:#F8E1DD; --ok:#3F7A3B; --ok-soft:#E4EFDF;
  --shadow:0 1px 2px rgba(35,43,38,.05),0 6px 18px rgba(35,43,38,.06);
  --display:"Figtree","Avenir Next","Segoe UI",system-ui,sans-serif;
  --body:"Figtree","Avenir Next","Segoe UI",system-ui,sans-serif;
  --r:12px; --r-sm:8px;
}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){
  --bg:#131915; --surface:#1B231E; --surface-2:#243029; --ink:#E6EBE5; --muted:#9BA79E; --line:#2D3832;
  --accent:#AFC29A; --accent-ink:#17200F; --accent-soft:#2B3826;
  --forest:#0F1612; --forest-2:#24312A; --on-forest:#EEF2EC; --on-forest-muted:#93A096;
  --sage:#6F805F; --sage-ink:#F1F5EC; --sage-text:#A9B99A;
  --prot:#7CC676; --carb:#6FA8E8; --fat:#F07A6E;
  --g-con:#F07A6E; --g-ene:#6FA8E8; --g-reg:#7CC676; --g-fat:#F2C14E;
  --ring-ok:#7CC676; --ring-over:#F07A6E; --ring-under:#AEB8B1; --ring-track:#2A352F; --ring-light:#56625A; --ring-dark:#D3DAD4;
  --warn:#EDB53E; --warn-soft:#33290F; --bad:#EC7E70; --bad-soft:#3A1E1A; --ok:#8DCC85; --ok-soft:#22331F;
  --shadow:0 1px 2px rgba(0,0,0,.3),0 8px 24px rgba(0,0,0,.25); color-scheme:dark}}
:root[data-theme="dark"]{
  --bg:#131915; --surface:#1B231E; --surface-2:#243029; --ink:#E6EBE5; --muted:#9BA79E; --line:#2D3832;
  --accent:#AFC29A; --accent-ink:#17200F; --accent-soft:#2B3826;
  --forest:#0F1612; --forest-2:#24312A; --on-forest:#EEF2EC; --on-forest-muted:#93A096;
  --sage:#6F805F; --sage-ink:#F1F5EC; --sage-text:#A9B99A;
  --prot:#7CC676; --carb:#6FA8E8; --fat:#F07A6E;
  --g-con:#F07A6E; --g-ene:#6FA8E8; --g-reg:#7CC676; --g-fat:#F2C14E;
  --ring-ok:#7CC676; --ring-over:#F07A6E; --ring-under:#AEB8B1; --ring-track:#2A352F; --ring-light:#56625A; --ring-dark:#D3DAD4;
  --warn:#EDB53E; --warn-soft:#33290F; --bad:#EC7E70; --bad-soft:#3A1E1A; --ok:#8DCC85; --ok-soft:#22331F;
  --shadow:0 1px 2px rgba(0,0,0,.3),0 8px 24px rgba(0,0,0,.25); color-scheme:dark}

*{box-sizing:border-box}
html,body{height:100%}
body{background:var(--bg);color:var(--ink);font-family:var(--body);font-size:15px;line-height:1.5;-webkit-font-smoothing:antialiased}
h1,h2,h3{font-family:var(--display);font-weight:650;letter-spacing:-.01em;text-wrap:balance;margin:0;line-height:1.15}
h1{font-size:clamp(1.6rem,4vw,2.1rem)} h2{font-size:1.25rem} h3{font-size:1.02rem}
p{margin:0}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:6px}
.ic{width:20px;height:20px;flex:none}
.num{font-variant-numeric:tabular-nums}
.muted{color:var(--muted)}
.small{font-size:.85rem}
.eyebrow{font-size:.72rem;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);font-weight:600}
.stack{display:flex;flex-direction:column;gap:16px}
.row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.between{justify-content:space-between}
.grid2{display:grid;grid-template-columns:1fr;gap:16px}
@media(min-width:760px){.grid2{grid-template-columns:1fr 1fr}}

/* Buttons & inputs */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid transparent;border-radius:999px;padding:11px 20px;font-weight:600;background:var(--accent);color:var(--accent-ink);transition:transform .1s, filter .15s}
.btn:hover{filter:brightness(1.06)} .btn:active{transform:scale(.98)}
.btn.ghost{background:transparent;color:var(--ink);border-color:var(--line)}
.btn.ghost:hover{background:var(--surface-2)}
.btn.soft{background:var(--accent-soft);color:var(--accent)}
.btn.danger{background:var(--bad-soft);color:var(--bad)}
.btn.sm{padding:7px 13px;font-size:.85rem}
.btn.block{width:100%}
.btn[disabled]{opacity:.45;pointer-events:none}
.link{background:none;border:0;padding:0;color:var(--accent);font-weight:600}
label.f{display:flex;flex-direction:column;gap:6px;font-size:.85rem;font-weight:600}
.in{width:100%;border:1px solid var(--line);background:var(--surface);border-radius:var(--r-sm);padding:11px 13px;font-weight:400;font-size:.95rem}
.in:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
textarea.in{min-height:90px;resize:vertical}

.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:18px}
.pill{display:inline-flex;align-items:center;gap:6px;font-size:.75rem;font-weight:600;padding:3px 10px;border-radius:999px;background:var(--surface-2);color:var(--muted);white-space:nowrap}
.pill.ok{background:var(--ok-soft);color:var(--ok)} .pill.warn{background:var(--warn-soft);color:var(--warn)} .pill.bad{background:var(--bad-soft);color:var(--bad)}
.dot{width:7px;height:7px;border-radius:50%;background:currentColor}

.chips{display:flex;flex-wrap:wrap;gap:8px}
.chip{border:1px solid var(--line);background:var(--surface);border-radius:999px;padding:8px 14px;font-size:.9rem;font-weight:500}
.chip[aria-pressed="true"]{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}

/* Prototype ribbon */
.proto{position:fixed;z-index:60;left:50%;transform:translateX(-50%);top:calc(env(safe-area-inset-top,0px) + 10px);font-size:.7rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;background:var(--ink);color:var(--bg);padding:4px 10px;border-radius:999px;opacity:.85;pointer-events:none}

/* Auth */
.auth{min-height:100%;display:grid;grid-template-columns:1fr;padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px));padding-block:32px}
.auth-inner{width:100%;max-width:980px;margin:auto;display:grid;gap:32px;align-items:center}
@media(min-width:860px){.auth-inner{grid-template-columns:1.05fr 1fr;gap:56px}}
.brand{display:flex;align-items:center;gap:10px;font-family:var(--display);font-weight:750;font-size:1.35rem}
.mark{width:34px;height:34px;border-radius:11px;background:var(--accent);color:var(--accent-ink);display:grid;place-items:center}
.hero-t{font-size:clamp(2rem,5.4vw,3.3rem);font-weight:750;line-height:1.02;margin-top:22px;letter-spacing:-.025em}
.hero-t em{font-style:normal;color:var(--accent)}
.plate-art{margin-top:26px;display:flex;gap:14px;align-items:center;flex-wrap:wrap}
.plate-legend{display:flex;flex-direction:column;gap:6px;font-size:.88rem}
.plate-legend span{display:flex;align-items:center;gap:8px}
.sw{width:10px;height:10px;border-radius:3px;display:inline-block}
.tabs{display:flex;background:var(--surface-2);border-radius:999px;padding:4px;gap:4px}
.tabs button{flex:1;border:0;background:transparent;border-radius:999px;padding:9px 12px;font-weight:600;color:var(--muted)}
.tabs button[aria-selected="true"]{background:var(--surface);color:var(--ink);box-shadow:var(--shadow)}
.divider{display:flex;align-items:center;gap:12px;color:var(--muted);font-size:.8rem}
.divider::before,.divider::after{content:"";flex:1;height:1px;background:var(--line)}

/* Shell */
.shell{min-height:100%;display:grid;grid-template-columns:1fr}
.side{display:none}
.topbar{position:sticky;top:env(safe-area-inset-top,0px);z-index:20;background:color-mix(in srgb,var(--bg) 88%,transparent);backdrop-filter:blur(10px);display:flex;align-items:center;justify-content:space-between;padding-block:12px;padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px));border-bottom:1px solid var(--line)}
.topbar .brand{font-size:1.1rem}.topbar .mark{width:28px;height:28px;border-radius:9px}
main{width:100%;max-width:1040px;margin:0 auto;padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px));padding-block:20px calc(96px + env(safe-area-inset-bottom,0px));min-width:0}
.bottomnav{position:fixed;left:0;right:0;bottom:0;z-index:30;background:var(--surface);border-top:1px solid var(--line);display:flex;justify-content:space-around;padding:6px max(8px,env(safe-area-inset-right,0px)) calc(6px + env(safe-area-inset-bottom,0px)) max(8px,env(safe-area-inset-left,0px))}
.bottomnav button{flex:1;border:0;background:none;display:flex;flex-direction:column;align-items:center;gap:2px;font-size:.7rem;font-weight:600;color:var(--muted);padding:6px 2px;border-radius:10px}
.bottomnav button[aria-current="page"]{color:var(--accent)}
@media(min-width:900px){
  .shell{grid-template-columns:240px 1fr}
  .topbar,.bottomnav{display:none}
  .side{display:flex;flex-direction:column;gap:6px;position:sticky;top:0;height:100vh;padding:24px 16px;border-right:1px solid var(--line);background:var(--surface)}
  .side .brand{padding:0 10px 18px}
  .side nav{display:flex;flex-direction:column;gap:2px}
  .side nav button{display:flex;align-items:center;gap:12px;border:0;background:none;padding:10px 12px;border-radius:10px;font-weight:600;color:var(--muted);text-align:left}
  .side nav button:hover{background:var(--surface-2);color:var(--ink)}
  .side nav button[aria-current="page"]{background:var(--accent-soft);color:var(--accent)}
  .side .me{margin-top:auto;display:flex;align-items:center;gap:10px;padding:12px;border-radius:12px;background:var(--surface-2)}
  main{padding-block:36px 48px;padding-left:max(40px,env(safe-area-inset-left,0px));padding-right:max(40px,env(safe-area-inset-right,0px))}
}
.avatar{width:34px;height:34px;border-radius:50%;background:var(--accent-soft);color:var(--accent);display:grid;place-items:center;font-weight:700;font-size:.85rem;flex:none}
.page-head{display:flex;justify-content:space-between;align-items:flex-end;gap:12px;flex-wrap:wrap;margin-bottom:20px}
.page-head p{margin-top:4px}

/* Banner */
.banner{display:flex;gap:12px;align-items:flex-start;padding:14px 16px;border-radius:var(--r);background:var(--warn-soft);color:var(--ink);border:1px solid color-mix(in srgb,var(--warn) 30%,transparent)}
.banner .ic{color:var(--warn);margin-top:2px}
.banner.ok{background:var(--ok-soft);border-color:color-mix(in srgb,var(--ok) 30%,transparent)} .banner.ok .ic{color:var(--ok)}
.banner.bad{background:var(--bad-soft);border-color:color-mix(in srgb,var(--bad) 30%,transparent)} .banner.bad .ic{color:var(--bad)}

/* Days */
.days{display:grid;grid-template-columns:repeat(7,1fr);gap:6px}
.day{border:1px solid var(--line);background:var(--surface);border-radius:12px;padding:8px 0;display:flex;flex-direction:column;align-items:center;gap:1px;font-size:.72rem;color:var(--muted);font-weight:600}
.day b{font-size:1.05rem;color:var(--ink);font-family:var(--display);font-weight:650}
.day[aria-pressed="true"]{background:var(--ink);border-color:var(--ink);color:var(--bg)}
.day[aria-pressed="true"] b{color:var(--bg)}
.day.today:not([aria-pressed="true"]){border-color:var(--accent)}

/* Summary */
.summary{display:grid;grid-template-columns:auto 1fr;gap:22px;align-items:center}
@media(max-width:420px){.summary{grid-template-columns:1fr;justify-items:center}.summary .bars{width:100%}}
.ring{position:relative;width:132px;height:132px}
.ring svg{transform:rotate(-90deg)}
.ring .c{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center}
.ring .c b{font-family:var(--display);font-size:1.6rem;font-weight:700;line-height:1}
.bars{display:flex;flex-direction:column;gap:12px;min-width:0}
.bar-l{display:flex;justify-content:space-between;font-size:.85rem;margin-bottom:5px}
.bar{height:8px;border-radius:99px;background:var(--surface-2);overflow:hidden}
.bar i{display:block;height:100%;border-radius:99px}

/* Meals */
.meal{padding:0;overflow:hidden}
.meal-h{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:14px 18px;border-bottom:1px solid var(--line)}
.meal-h .t{font-size:.8rem;color:var(--muted);font-weight:600}
.meal.done .meal-h{background:var(--ok-soft)}
.items{list-style:none;margin:0;padding:6px 0}
.item{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:center;padding:9px 18px}
.item + .item{border-top:1px dashed var(--line)}
.item .nm{font-weight:600;min-width:0}
.item .q{font-size:.83rem;color:var(--muted)}
.item .sw-tag{font-size:.72rem;color:var(--accent);font-weight:600}
.meal-f{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:12px 18px;border-top:1px solid var(--line);background:var(--surface-2);flex-wrap:wrap}
.macro-mini{display:flex;gap:12px;font-size:.8rem;color:var(--muted)}
.macro-mini b{color:var(--ink);font-weight:600}

/* Sheet */
.scrim{position:fixed;inset:0;z-index:80;background:rgba(10,16,12,.45);display:flex;align-items:flex-end;justify-content:center;animation:fade .2s}
.sheet{background:var(--surface);width:100%;max-width:560px;max-height:85vh;overflow:auto;border-radius:20px 20px 0 0;padding:20px max(18px,env(safe-area-inset-right,0px)) calc(20px + env(safe-area-inset-bottom,0px)) max(18px,env(safe-area-inset-left,0px));animation:up .25s ease-out}
@media(min-width:700px){.scrim{align-items:center}.sheet{border-radius:20px}}
@keyframes up{from{transform:translateY(30px);opacity:.4}} @keyframes fade{from{opacity:0}}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
.opt{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:center;width:100%;text-align:left;border:1px solid var(--line);background:var(--surface);border-radius:12px;padding:12px 14px}
.opt:hover{border-color:var(--accent)}
.opt.cur{border-color:var(--accent);background:var(--accent-soft)}
.delta{font-size:.75rem}
.delta.up{color:var(--ok)} .delta.down{color:var(--bad)}

/* Tables */
.tbl-wrap{overflow-x:auto}
table{width:100%;border-collapse:collapse;font-size:.9rem}
th{text-align:left;font-size:.72rem;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);font-weight:600;padding:8px 10px;border-bottom:1px solid var(--line)}
td{padding:10px;border-bottom:1px solid var(--line)}
td.r,th.r{text-align:right}

/* Shopping */
.shop-item{display:flex;align-items:center;gap:12px;padding:10px 4px;border-bottom:1px solid var(--line);cursor:pointer}
.shop-item:last-child{border-bottom:0}
.box{width:22px;height:22px;border-radius:7px;border:1.5px solid var(--line);display:grid;place-items:center;flex:none;background:var(--surface)}
.shop-item.on .box{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
.shop-item.on .nm{text-decoration:line-through;color:var(--muted)}
.box .ic{width:14px;height:14px}

/* Stats */
.stats{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}
@media(min-width:760px){.stats{grid-template-columns:repeat(4,1fr)}}
.stat{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:14px 16px}
.stat b{display:block;font-family:var(--display);font-size:1.5rem;font-weight:700;margin-top:4px}
.chart text{fill:var(--muted);font-size:11px;font-family:var(--body)}
.chart .grid{stroke:var(--line)}
.chart .line{stroke:var(--accent);fill:none;stroke-width:2.5}
.chart .area{fill:var(--accent);opacity:.12}
.chart .goal{stroke:var(--carb);stroke-dasharray:5 5}
.chart .pt{fill:var(--surface);stroke:var(--accent);stroke-width:2}
.chart .end{fill:var(--accent)}

/* Onboarding */
.ob{max-width:640px;margin:0 auto;padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px));padding-block:28px 40px}
.progress{height:6px;border-radius:9px;background:var(--surface-2);overflow:hidden;margin:18px 0 26px}
.progress i{display:block;height:100%;background:var(--accent);transition:width .3s}
.goal-opt{display:grid;grid-template-columns:auto 1fr;gap:14px;align-items:center;text-align:left;border:1.5px solid var(--line);background:var(--surface);border-radius:var(--r);padding:16px}
.goal-opt[aria-pressed="true"]{border-color:var(--accent);background:var(--accent-soft)}
.goal-opt .gi{width:42px;height:42px;border-radius:12px;background:var(--surface-2);display:grid;place-items:center;color:var(--accent)}
.fields{display:grid;grid-template-columns:1fr 1fr;gap:14px}
@media(max-width:420px){.fields{grid-template-columns:1fr}}
.seg{display:flex;flex-wrap:wrap;gap:8px}
.seg .chip{flex:1;min-width:max-content;text-align:center}

/* Admin */
.queue-item{display:grid;grid-template-columns:auto 1fr auto;gap:14px;align-items:center;width:100%;text-align:left;border:1px solid var(--line);background:var(--surface);border-radius:var(--r);padding:14px 16px}
.queue-item:hover{border-color:var(--accent)}
.check{display:flex;gap:10px;align-items:flex-start;font-size:.9rem;padding:8px 0}
.check .ic{width:18px;height:18px;margin-top:2px}
.check.ok .ic{color:var(--ok)} .check.warn .ic{color:var(--warn)}
input[type=range]{width:100%;accent-color:var(--accent)}

.toast{position:fixed;left:50%;bottom:calc(92px + env(safe-area-inset-bottom,0px));transform:translateX(-50%);z-index:90;background:var(--ink);color:var(--bg);padding:11px 18px;border-radius:999px;font-weight:600;font-size:.9rem;box-shadow:var(--shadow);animation:up .2s;max-width:calc(100% - 32px)}
@media(min-width:900px){.toast{bottom:28px}}
.kv{display:grid;grid-template-columns:auto 1fr;gap:6px 16px;font-size:.9rem}
.kv dt{color:var(--muted)} .kv dd{margin:0;font-weight:600;text-align:right}
.empty{text-align:center;padding:30px 10px;color:var(--muted)}

/* ---------- Grupos alimentares e registro de refeição ---------- */
.rings{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;justify-items:center;text-align:center}
.gring{display:flex;flex-direction:column;align-items:center;gap:2px;min-width:0}
.gname{font-size:.9rem;margin-top:6px}
.ring.sm{width:96px;height:96px}
.ring.sm svg{width:100%;height:100%}
.ring.sm .c b{font-size:1.35rem}
@media(max-width:380px){.ring.sm{width:80px;height:80px}.ring.sm .c b{font-size:1.15rem}.gname{font-size:.8rem}}
.glegend{display:flex;flex-direction:column;gap:4px;font-size:.8rem;color:var(--muted);border-top:1px solid var(--line);padding-top:12px}
.glegend b{color:var(--ink);font-weight:600}
.gdot{width:8px;height:8px;border-radius:50%;display:inline-block;margin-right:6px;vertical-align:middle;flex:none}
.gchips{display:flex;flex-wrap:wrap;gap:4px 12px;font-size:.78rem;color:var(--muted);margin-top:4px}
.gchips span{display:inline-flex;align-items:center}
.reg-btn{padding:15px 20px;font-size:1rem}
button.meal-h{width:100%;text-align:left;background:none;border:0;color:inherit;font:inherit;cursor:pointer}
.meal:not(.open) .meal-h{border-bottom:0}
.meal-h:hover{background:var(--surface-2)}
.meal.done .meal-h:hover{background:var(--ok-soft)}
.chev{display:grid;place-items:center;color:var(--muted);transition:transform .2s}
.meal.open .chev{transform:rotate(180deg)}
.meal-body{animation:fade .2s}
.subtabs{margin:12px 18px 0;max-width:320px}
.subtabs button{padding:7px 10px;font-size:.88rem}
.recipes{display:flex;flex-direction:column;gap:12px;padding:14px 18px}
.recipe{display:flex;flex-direction:column;gap:6px;padding:14px;border-radius:12px;background:var(--surface-2)}
.recipe ol{margin:4px 0 0;padding-left:20px;display:flex;flex-direction:column;gap:3px}
.recipe .pill .ic{width:13px;height:13px}
.pill .ic{width:14px;height:14px}
.thumb{width:48px;height:48px;border-radius:10px;object-fit:cover;flex:none}
.thumb.lg{width:84px;height:84px;border-radius:14px}
.photo-drop{border:2px dashed var(--line);border-radius:var(--r);padding:28px 16px;display:flex;flex-direction:column;align-items:center;gap:6px;cursor:pointer;text-align:center;color:var(--ink)}
.photo-drop:hover{border-color:var(--accent);background:var(--accent-soft)}
.photo-drop .ic{width:32px;height:32px;color:var(--accent)}
.photo-prev{width:100%;max-height:260px;object-fit:cover;border-radius:var(--r)}
.check.bad .ic{color:var(--bad)}
.spinner{width:30px;height:30px;border:3px solid var(--surface-2);border-top-color:var(--accent);border-radius:50%;animation:spin .8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.reg-tbl td:first-child{white-space:nowrap}
@media(max-width:899px){body.in-app .proto{display:none}}
.toast{width:max-content;text-align:center}
.toast{animation:toastIn .2s ease-out}
@keyframes toastIn{from{transform:translate(-50%,20px);opacity:0}to{transform:translate(-50%,0);opacity:1}}

/* ---------- Biblioteca de receitas e alimentos ---------- */
.fab{width:44px;height:44px;border-radius:50%;border:0;background:var(--accent);color:var(--accent-ink);display:grid;place-items:center;flex:none;box-shadow:var(--shadow)}
.fab:hover{filter:brightness(1.08)}
.fab .ic{width:22px;height:22px}
.search{display:flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:999px;padding:8px 14px;background:var(--surface)}
.search input{border:0;background:none;outline:none;width:100%;min-width:0}
.search:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
.lib-sec{display:flex;flex-direction:column;gap:4px;padding-top:14px;border-top:1px solid var(--line)}
.lib-sec h3{display:flex;align-items:center}
.hscroll{display:grid;grid-auto-flow:column;grid-auto-columns:158px;gap:12px;overflow-x:auto;scroll-snap-type:x mandatory;padding:10px 2px 12px;margin-top:4px;scrollbar-width:thin}
.rcard{position:relative;scroll-snap-align:start;background:var(--surface);border:1px solid var(--line);border-radius:18px;padding:16px 10px 12px;display:flex;flex-direction:column;align-items:center;text-align:center;gap:3px;cursor:pointer;box-shadow:var(--shadow);transition:transform .15s}
.rcard:hover{transform:translateY(-2px)}
.rcard .gchips{justify-content:center;font-size:.72rem;gap:2px 8px}
.rname{font-size:.92rem;line-height:1.25;margin-top:6px;min-height:2.5em;display:flex;align-items:center}
.plate-wrap{width:92px;height:92px;border-radius:50%;flex:none;display:grid;place-items:center}
.plate-wrap svg,.plate-photo{width:100%;height:100%;border-radius:50%;object-fit:cover}
.plate-wrap.lg{width:170px;height:170px;align-self:center}
.plate-wrap.sm{width:56px;height:56px}
.mini-btn{position:absolute;top:8px;left:8px;width:30px;height:30px;border-radius:50%;border:1px solid var(--line);background:var(--surface);color:var(--muted);display:grid;place-items:center;z-index:1}
.mini-btn.heart{left:auto;right:8px}
.mini-btn .ic{width:16px;height:16px}
.mini-btn.on{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
.mini-btn.heart.on{background:var(--bad-soft);border-color:transparent;color:var(--bad)}
.mini-btn.heart.on svg path{fill:currentColor}
.gtiles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:8px}
.gtile{border-radius:12px;padding:10px;background:color-mix(in srgb,var(--gc) 14%,var(--surface));border:1px solid color-mix(in srgb,var(--gc) 35%,transparent);display:flex;flex-direction:column;align-items:center;text-align:center;font-size:.78rem;font-weight:600}
.gtile b{font-family:var(--display);font-size:1.5rem;color:var(--ink)}
.sec-t{font-size:.95rem;margin-bottom:4px}
.ing,.steps{margin:6px 0 0;padding-left:20px;display:flex;flex-direction:column;gap:6px;font-size:.92rem}
.recipe-row{display:flex;align-items:center;gap:12px;padding:10px;border-radius:12px;background:var(--surface-2);cursor:pointer}
.recipe-row:hover{background:var(--accent-soft)}
.chev-r{transform:rotate(-90deg)}
.fields.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.fields.three label span{display:flex;align-items:center;font-size:.8rem}
@media(max-width:420px){.fields.three{grid-template-columns:1fr 1fr 1fr}.fields.three label span{font-size:.7rem}}
.chips.scroll{flex-wrap:nowrap;overflow-x:auto;padding-bottom:4px;scrollbar-width:none}.chips.scroll .chip{flex:none}
.meal.open .chev-r{transform:rotate(-90deg)}
.calc-sum{display:flex;gap:14px;align-items:center}
.calc-sum .gtile{width:96px;flex:none;margin:0}
.sw-tag.fav,.fav-mark{color:var(--bad)}
.nowrap{white-space:nowrap}
#calc-q{flex:1;min-width:84px}#calc-q + .tabs button{padding:8px 10px;font-size:.85rem}

/* ---------- Planejamento ---------- */
.period{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.period .tabs button{padding:6px 10px;font-size:.85rem}
.step{width:32px;height:32px;border-radius:50%;border:1px solid var(--line);background:var(--surface);font-weight:700;font-size:1rem;line-height:1;display:grid;place-items:center;flex:none}
.step:hover{border-color:var(--accent);color:var(--accent)}
.ptiles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
@media(max-width:560px){.ptiles{grid-template-columns:1fr}}
.ptile{border-radius:14px;padding:14px;background:color-mix(in srgb,var(--gc) 10%,var(--surface));border:1px solid color-mix(in srgb,var(--gc) 30%,transparent);display:flex;flex-direction:column;gap:2px;min-width:0}
.ptile b{font-family:var(--display);font-size:1.8rem;line-height:1.1}
.pt-name{display:flex;align-items:center;font-weight:600;font-size:.9rem}
.warn-t{color:var(--warn);font-weight:600}
.danger-t{color:var(--bad)}
.pmeal{display:flex;flex-direction:column;gap:12px}
.popt{display:flex;gap:12px;align-items:flex-start;padding:12px;border-radius:12px;background:var(--surface-2)}
.popt-actions{gap:14px;margin-top:8px}
.popt-actions .link{display:inline-flex;align-items:center;gap:4px}
.popt-actions .link .ic{width:15px;height:15px}
.stepper{display:inline-flex;align-items:center;gap:6px;background:var(--surface);border-radius:999px;padding:2px}
.stepper .step{width:26px;height:26px;font-size:.9rem;border:0;background:var(--surface-2)}
@media(max-width:560px){
  .ptile{display:grid;grid-template-columns:1fr auto;column-gap:12px;align-items:center;padding:10px 14px}
  .ptile>*{grid-column:1}
  .ptile b{grid-column:2;grid-row:1 / span 3;font-size:1.7rem}
}


/* ---------- Estética da marca (chips retos, botões discretos, barras verde-floresta) ---------- */
h1,h2,h3{font-weight:700;letter-spacing:-.005em}
h1{font-size:clamp(1.45rem,3.4vw,1.8rem)} h2{font-size:1.15rem}
.btn{border-radius:var(--r-sm);padding:10px 18px}
.btn.sm{padding:7px 12px}
.btn:not(.ghost):not(.soft):not(.danger){background:var(--forest);color:var(--on-forest)}
.btn.ghost{background:var(--surface)}
.btn.soft{background:var(--accent-soft);color:var(--accent)}
.link{color:var(--sage-text)}
.chip{border-radius:var(--r-sm);border-color:transparent;background:var(--surface-2);font-weight:500}
.chip[aria-pressed="true"]{background:var(--sage);border-color:var(--sage);color:var(--sage-ink)}
.tabs{border-radius:var(--r-sm)}
.tabs button{border-radius:6px}
.tabs button[aria-selected="true"]{background:var(--sage);color:var(--sage-ink);box-shadow:none}
.day{border-radius:var(--r-sm);border-color:transparent;background:var(--surface-2)}
.day[aria-pressed="true"]{background:var(--forest);border-color:var(--forest);color:var(--on-forest)}
.day[aria-pressed="true"] b{color:var(--on-forest)}
.day.today:not([aria-pressed="true"]){border-color:var(--sage)}
.card{border-color:var(--line);box-shadow:var(--shadow)}
.goal-opt[aria-pressed="true"]{border-color:var(--sage);background:var(--accent-soft)}
.mark{background:var(--forest);color:var(--on-forest);border-radius:9px}
.search{border-radius:var(--r-sm);background:var(--surface-2);border-color:transparent}
.in{border-radius:var(--r-sm)}
.fab{background:var(--forest);color:var(--on-forest);border-radius:var(--r-sm)}
.mini-btn.on{background:var(--forest);border-color:var(--forest);color:var(--on-forest)}
.progress i{background:var(--sage)}
.rcard{border-radius:var(--r)}
.popt,.recipe-row{border-radius:var(--r-sm)}
/* Barra superior branca e barra inferior verde-floresta (celular) */
.topbar{background:color-mix(in srgb,var(--surface) 92%,transparent)}
.icon-btn{width:38px;height:38px;border-radius:50%;border:0;background:none;color:var(--ink);display:grid;place-items:center}
.icon-btn:hover{background:var(--surface-2)}
.bottomnav{background:var(--forest);border-top:0}
.bottomnav button{color:var(--on-forest-muted)}
.bottomnav button[aria-current="page"]{color:var(--on-forest)}
.bottomnav button[aria-current="page"] .ic{background:var(--forest-2);border-radius:8px;padding:3px;width:28px;height:28px;margin:-4px 0}
/* Barra lateral verde-floresta (computador) */
@media(min-width:900px){
  .side{background:var(--forest);border-right:0}
  .side .brand{color:var(--on-forest)}
  .side .mark{background:var(--forest-2)}
  .side nav button{color:var(--on-forest-muted)}
  .side nav button:hover{background:var(--forest-2);color:var(--on-forest)}
  .side nav button[aria-current="page"]{background:var(--forest-2);color:var(--on-forest)}
  .side .me{background:var(--forest-2);color:var(--on-forest)}
  .side .me .muted{color:var(--on-forest-muted)}
  .side .pill{background:var(--forest-2);color:var(--on-forest-muted)}
  .side .icon-btn{color:var(--on-forest-muted)}
  .side .icon-btn:hover{background:var(--forest-2);color:var(--on-forest)}
}

/* ---------- Calendário de consumo ---------- */
.cal-label{font-size:1rem;text-align:center}
.cal-label.cap::first-letter{text-transform:uppercase}
.cal-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}
.cal-grid.head span{text-align:center;font-size:.72rem;font-weight:600;color:var(--muted)}
.cal-day{border:1px solid transparent;background:none;border-radius:var(--r-sm);padding:6px 0;display:flex;flex-direction:column;align-items:center;gap:2px;min-width:0;color:var(--ink)}
.cal-day:hover{background:var(--surface-2)}
.cal-day.sel{background:var(--accent-soft);border-color:var(--sage)}
.cal-day.today .cal-n{background:var(--forest);color:var(--on-forest);border-radius:999px;padding:0 7px}
.cal-day.out{opacity:.35}
.cal-dow{font-size:.7rem;font-weight:600;color:var(--muted)}
.cal-n{font-size:.85rem;font-weight:600}
.cal-ring{position:relative;display:grid;place-items:center}
.cal-ring b{position:absolute;font-size:.68rem}
.cal-pct{font-size:.62rem;font-weight:600}
.pct-t.ok,.cal-pct.ok{color:var(--ring-ok)}
.pct-t.over,.cal-pct.over{color:var(--ring-over)}
.pct-t.under,.cal-pct.under{color:var(--ring-under)}
.cal-legend{display:flex;flex-wrap:wrap;gap:6px 16px;align-items:center;color:var(--muted)}
.cal-legend span{display:inline-flex;align-items:center;gap:6px}
.lg{width:12px;height:12px;border-radius:50%;border:3px solid var(--ring-under)}
.lg.ok{border-color:var(--ring-ok)} .lg.over{border-color:var(--ring-over)}
.cal-legend .link{margin-left:auto}
.cal-detail{display:flex;flex-direction:column;gap:6px;padding:12px 14px;border-radius:var(--r-sm);background:var(--surface-2)}
.cal-detail b:first-child::first-letter{text-transform:uppercase}
@media(max-width:400px){.cal-ring svg[width="46"]{width:40px;height:40px}}

/* Três anéis por dia */
.tring .track{stroke:var(--ring-track)}
.cal-vals{display:flex;flex-direction:column;align-items:flex-start;gap:0;font-size:.6rem;font-weight:600;line-height:1.35;color:var(--muted)}
.cal-vals span{display:flex;align-items:center}
.cal-vals .gdot{width:5px;height:5px;margin-right:3px}
.cal-vals .over{color:var(--ring-dark)}
.lg{border-color:var(--ring-light)}
.lg.ok{border-color:var(--g-con);border-right-color:var(--g-ene);border-bottom-color:var(--g-reg)}
.lg.over{border-color:var(--ring-dark)}
.state-tag{font-size:.72rem;font-weight:600;padding:1px 8px;border-radius:999px;background:var(--ring-track);color:var(--muted)}
.state-tag.ok{background:color-mix(in srgb,var(--gc) 16%,transparent);color:var(--gc)}
.state-tag.over{background:var(--ring-dark);color:var(--surface)}

/* Receitas da plataforma */
.ing-tags{font-size:.85em}
.ing-h{list-style:none;margin-left:-20px;font-weight:700;margin-top:6px}
.legal{border-top:1px solid var(--line);padding-top:10px;font-size:.75rem}
.chip.cat{font-size:.82rem;padding:6px 12px}

/* Fotos geradas por IA: aproxima no prato para ele preencher o círculo */
.plate-wrap{overflow:hidden}
.plate-photo.ai{transform:scale(1.32)}
.gtile small{font-size:.68rem;font-weight:500}
.gtile b{white-space:nowrap;font-size:clamp(1.15rem,5.2vw,1.5rem)}

/* ---------- Perfil no canto superior direito ---------- */
.avatar{overflow:hidden}
.avatar img{width:100%;height:100%;object-fit:cover}
.avatar.xl{width:64px;height:64px;font-size:1.3rem}
.me-btn{display:flex;align-items:center;gap:8px;border:0;background:none;padding:3px;border-radius:999px;color:var(--ink);font-weight:600}
.me-btn:hover,.me-btn.on{background:var(--surface-2)}
.me-btn .me-name{display:none;padding-right:8px;font-size:.9rem}
.photo-pick{position:relative;cursor:pointer;flex:none}
.photo-edit{position:absolute;right:-2px;bottom:-2px;width:24px;height:24px;border-radius:50%;background:var(--forest);color:var(--on-forest);display:grid;place-items:center;border:2px solid var(--surface)}
.photo-edit .ic{width:13px;height:13px}
@media(min-width:900px){
  .topbar{display:flex;position:sticky;top:0;justify-content:flex-end;border-bottom:1px solid var(--line);padding-left:40px;padding-right:40px}
  .topbar .brand{display:none}
  .me-btn .me-name{display:inline}
}
/* ---------- Desafios ---------- */
.code-in{text-transform:uppercase;letter-spacing:.08em}
.ch-item{padding:14px;border-radius:var(--r-sm);background:var(--surface-2)}
.ch-item .link{display:inline-flex;align-items:center;gap:4px}
.ch-item .link .ic{width:14px;height:14px}
.code-txt{letter-spacing:.06em;color:var(--ink)}

/* ---------- Receitas em destaque (círculo central) ---------- */
.bottomnav{overflow:visible}
.bottomnav button.feature{position:relative}
.feat-ic{width:58px;height:58px;margin-top:-30px;margin-bottom:2px;border-radius:50%;background:var(--sage);color:var(--forest);display:grid;place-items:center;
  border:4px solid var(--forest);box-shadow:0 6px 16px rgba(0,0,0,.25);transition:transform .15s}
.feat-ic .ic{width:26px;height:26px}
.bottomnav button.feature:hover .feat-ic{transform:translateY(-2px)}
.bottomnav button.feature[aria-current="page"] .feat-ic{background:var(--on-forest);color:var(--forest)}
.bottomnav button.feature[aria-current="page"] .feat-ic .ic{background:none;padding:0;width:26px;height:26px;margin:0}
.bottomnav button.feature[aria-current="page"]{color:var(--on-forest)}
@media(min-width:900px){
  .side nav button.feature{margin:6px 0}
  .side nav button.feature .feat-ic{width:40px;height:40px;margin:-6px 0 -6px -6px;border:0;box-shadow:none;background:var(--sage);color:var(--forest)}
  .side nav button.feature .feat-ic .ic{width:20px;height:20px}
  .side nav button.feature[aria-current="page"] .feat-ic{background:var(--on-forest)}
}

/* ---------- Descrever refeição ---------- */
.meal-f:has(.composer){display:block}
.composer{display:flex;flex-direction:column;gap:10px;width:100%}
.bubble{position:relative;background:var(--surface);border:1px solid var(--line);border-radius:16px 16px 16px 4px;padding:10px 12px;box-shadow:var(--shadow)}
.bubble::after{content:"";position:absolute;left:18px;bottom:-7px;width:12px;height:12px;background:var(--surface);border-right:1px solid var(--line);border-bottom:1px solid var(--line);transform:rotate(45deg)}
.bubble textarea{width:100%;border:0;background:none;resize:vertical;min-height:52px;outline:none;font:inherit;font-size:.92rem;color:var(--ink)}
.bubble:focus-within{border-color:var(--sage);box-shadow:0 0 0 3px var(--accent-soft)}
.cmp-photo{position:relative;width:72px;height:72px;margin-top:6px}
.cmp-photo img{width:100%;height:100%;object-fit:cover;border-radius:10px}
.mini-x{position:absolute;top:-6px;right:-6px;width:22px;height:22px;border-radius:50%;border:0;background:var(--ink);color:var(--surface);display:grid;place-items:center}
.mini-x .ic{width:12px;height:12px}
.cmp-actions{justify-content:flex-end;gap:8px;margin-top:4px}
.cmp-res{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-sm);padding:12px}
.cmp-items{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px;font-size:.9rem}
.cmp-items li{display:flex;justify-content:space-between;gap:10px}
.cmp-items li span:first-child{display:flex;align-items:center}
.cmp-res table{font-size:.85rem}.cmp-res th,.cmp-res td{padding:6px 4px}.cmp-res .reg-tbl th{font-size:.65rem}
.cmp-groups{display:flex;flex-direction:column;gap:6px;border-top:1px solid var(--line);padding-top:10px}.cmp-g{display:flex;justify-content:space-between;gap:8px;font-size:.9rem}.cmp-g span:first-child{display:flex;align-items:center}

/* ---------- Registro por alimentos / receita / texto ---------- */
.reg-tabs{margin-bottom:2px}
.reg-tabs button{padding:7px 6px;font-size:.82rem}
.freg{display:flex;flex-direction:column;gap:6px}
.frow{display:flex;align-items:center;gap:8px;padding:8px;border-radius:var(--r-sm);background:var(--surface)}
.frow.off{opacity:.55}
.box-btn{border:0;background:none;padding:0;flex:none}
.frow .box{width:22px;height:22px}
.frow.on .box,.box-btn[aria-checked="true"] .box{background:var(--forest);border-color:var(--forest);color:var(--on-forest)}
.g-in{width:52px;border:1px solid var(--line);border-radius:6px;padding:4px;text-align:right;background:var(--surface)}
.skip-btn{display:inline-flex;align-items:center;gap:4px}
.skip-btn .ic{width:14px;height:14px}
.meal.skipped{opacity:.7;border-style:dashed;box-shadow:none}
.meal.skipped .meal-h{border-bottom:0}
.cmp-items li span:first-child .ic{width:15px;height:15px}
.frow{flex-wrap:wrap}.frow .fname{flex:1 1 calc(100% - 40px);min-width:0}.frow .stepper{margin-left:auto}
.label-box{padding:10px 12px;border-radius:var(--r-sm);background:var(--accent-soft);line-height:1.5}

/* ---------- Nome do app, sino e rodapé flutuante ---------- */
.brand-name{white-space:nowrap}
.topbar .brand{font-size:1rem;min-width:0}
.topbar .brand .pill{display:none}
@media(min-width:420px){.topbar .brand .pill{display:inline-flex}}
.bell{position:relative}
.bell .badge{position:absolute;top:3px;right:3px;min-width:16px;height:16px;padding:0 4px;border-radius:999px;background:var(--g-con);color:#fff;font-size:.62rem;font-weight:700;display:grid;place-items:center}
.notif{padding:12px 14px;border-radius:var(--r-sm);background:var(--surface-2)}
.notif.unread{background:var(--accent-soft);border-left:3px solid var(--sage)}
@media(max-width:899px){
  .bottomnav{left:max(12px,env(safe-area-inset-left,0px));right:max(12px,env(safe-area-inset-right,0px));bottom:calc(10px + env(safe-area-inset-bottom,0px));
    border-radius:22px;padding:6px 8px;box-shadow:0 10px 30px rgba(0,0,0,.28)}
  main{padding-bottom:calc(120px + env(safe-area-inset-bottom,0px))}
  .toast{bottom:calc(112px + env(safe-area-inset-bottom,0px))}
}
.mp-row{display:grid;grid-template-columns:24px 1fr 110px;gap:8px;align-items:center}
.mp-n{font-weight:700;color:var(--muted);text-align:center}
.rec-chip{display:inline-flex;align-items:center;gap:6px}
.rec-chip .ic{width:14px;height:14px}
.ob .brand{font-size:1.05rem;min-width:0}.ob .brand-name{overflow:hidden;text-overflow:ellipsis}.ob .row.between>.btn{flex:none}

/* ---------- Registro: receita sugerida, troca, registrado ---------- */
.sug-card{display:flex;flex-direction:column;gap:10px;padding:12px;border-radius:var(--r-sm);background:var(--surface);border:1px solid var(--line)}
.sug-card .eyebrow{display:block;margin-bottom:2px}
.swap-sel{position:relative;display:inline-flex;align-items:center;gap:4px;font-size:.78rem;font-weight:600;color:var(--sage-text);padding:4px 6px;border-radius:6px;cursor:pointer}
.swap-sel .ic{width:14px;height:14px}
.swap-sel select{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%}
.swap-sel:hover{background:var(--surface-2)}
.logged{display:flex;flex-direction:column;gap:10px;width:100%}
.logged>.row>.ic{color:var(--ok);margin-top:2px}
.logged .btn{align-self:flex-start}
.meal-f:has(.logged){display:block}
.stars{color:#E0A526;letter-spacing:1px;font-size:.95rem;white-space:nowrap}
.stars.sm{font-size:.78rem}
.stars .off{color:var(--line)}
.recalc-bar{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px;padding:10px 18px;background:var(--warn-soft);border-top:1px solid var(--line)}
.recalc-bar>.ic{color:var(--warn)}
.recalc-bar .small{flex:1;min-width:140px}
.recalc-note{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:6px 10px;padding:10px 18px;background:var(--accent-soft);border-top:1px solid var(--line)}
.recalc-note .gchips{display:inline-flex;margin:0}
.recalc-note .ic{width:14px;height:14px;vertical-align:-2px}
.rc-cmp{display:flex;flex-direction:column;gap:4px}.rc-row{display:flex;align-items:center;gap:10px}.rc-row>span:first-child{width:44px;font-size:.78rem}
.rate-box{display:flex;flex-direction:column;gap:8px;background:var(--surface-2);border-radius:14px;padding:12px 14px}
.rate-btns{display:flex;gap:2px}
.rate-btns button{background:none;border:0;font-size:1.6rem;line-height:1;color:var(--line);padding:4px;cursor:pointer;min-width:36px;min-height:36px}
.rate-btns button.on{color:#E0A526}
.rcard .stars{margin-top:-2px}
/* Painel inicial */
.hp-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:10px}
.hp-stat{display:flex;align-items:center;gap:12px;background:var(--surface-2);border-radius:14px;padding:12px 14px}
.hp-ic{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;background:var(--accent-soft);color:var(--accent);flex:none}
.hp-ic.flame{background:var(--warn-soft);color:var(--warn)}
.hp-txt{flex:1;min-width:0;display:flex;flex-direction:column;line-height:1.15}
.hp-txt b{font-family:var(--display);font-size:1.5rem;font-weight:700}
.hp-txt span{font-size:.82rem;color:var(--muted)}
.hp-avg{display:flex;flex-wrap:wrap;gap:4px 14px;align-items:center}
.hp-avg>span:first-child{width:100%}
.day-ring{margin-top:3px;display:block;line-height:0}
.tr-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--warn);vertical-align:middle;margin-right:4px}
.cal-day .tr-dot{position:absolute;top:4px;right:4px;margin:0}
.cal-day{position:relative}
.m-sum{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}
.m-sum div{display:flex;flex-direction:column;background:var(--surface);border-radius:12px;padding:10px 12px}
.m-sum b{font-family:var(--display);font-size:1.35rem}
.m-sum span{font-size:.78rem;color:var(--muted)}
.share-prev{width:100%;max-width:360px;align-self:center;border-radius:16px;box-shadow:var(--shadow)}
.hp-stat{flex-wrap:wrap}
.hp-txt{min-width:130px}
@media (max-width:420px){.hp-stat .btn{width:100%;justify-content:center}}
/* Feedbacks */
.fb{border:1px solid var(--line);border-radius:12px;padding:10px 12px;display:flex;flex-direction:column;gap:3px}
.fb.unread{border-color:var(--sage);background:var(--accent-soft)}
.fb.me{background:var(--surface-2);border-color:transparent;margin-left:24px}
.me-btn{position:relative}
.me-dot{position:absolute;top:2px;left:30px;width:10px;height:10px;border-radius:50%;background:var(--bad);border:2px solid var(--surface)}
/* Desafios */
.ch-types{border:0;padding:0;margin:0;display:flex;flex-direction:column;gap:8px}
.ch-types legend{margin-bottom:8px}
.ch-type{display:flex;align-items:center;gap:12px;border:1px solid var(--line);border-radius:14px;padding:10px 12px;cursor:pointer}
.ch-type>span:last-child{display:flex;flex-direction:column}
.ch-type input{accent-color:var(--accent)}
.ch-type:has(input:checked){border-color:var(--accent);background:var(--accent-soft)}
.chip-s{background:var(--surface-2);border-radius:999px;padding:2px 10px;font-size:.78rem}
.req{background:var(--surface-2);border-radius:12px;padding:6px 10px;flex-wrap:nowrap}
.req .avatar{width:28px;height:28px;font-size:.75rem;vertical-align:middle;margin-right:6px}
.lg-line{display:inline-block;width:18px;height:0;border-top:3.5px solid var(--accent);vertical-align:middle;margin-right:6px}
.lg-line.g{border-top:3px dashed var(--sage)}
.ch-item .eyebrow .ic{width:13px;height:13px;vertical-align:-2px}
.chip-s{background:var(--surface)}
.req{display:flex;align-items:center;justify-content:space-between;gap:8px;background:var(--surface);border-radius:12px;padding:6px 8px}
.req-n{display:flex;align-items:center;gap:8px;min-width:0}
.req-b{display:flex;gap:6px;flex:none}
.ch-item .chart text{font-size:10px}
.banner-x{flex:none;margin:-6px -8px 0 0;width:32px;height:32px;border:0;border-radius:50%;background:none;color:var(--muted);display:grid;place-items:center;cursor:pointer}.banner-x:hover{background:color-mix(in srgb,var(--warn) 14%,transparent)}.banner .banner-x .ic{color:var(--muted);margin:0}
/* Abertura */
.splash{position:fixed;inset:0;background:var(--forest);display:grid;place-items:center;z-index:50;animation:splashOut .35s ease-in 1.3s forwards}
.splash-in{display:flex;flex-direction:column;align-items:center;gap:10px;animation:splashIn .6s ease-out both}
.splash-mark{width:88px;height:88px;border-radius:26px;background:var(--sage);color:var(--forest);display:grid;place-items:center}
.splash-mark .ic{width:48px;height:48px}
.splash-name{color:var(--on-forest);font-family:var(--display);font-size:1.9rem;font-weight:750;letter-spacing:-.02em;margin-top:8px}
.splash-sub{color:var(--on-forest-muted);font-size:.95rem}
@keyframes splashIn{from{opacity:0;transform:scale(.9)}to{opacity:1;transform:none}}
@keyframes splashOut{to{opacity:0}}
/* Boas-vindas */
.welcome{width:100%;max-width:460px;margin:auto;display:flex;flex-direction:column;gap:18px;min-height:calc(100dvh - 64px)}
.welcome .hero-t{margin-top:6px}
.welcome .plate-art{margin:4px 0}
.welcome-cta{margin-top:auto;display:flex;flex-direction:column;gap:10px;padding-bottom:max(8px,env(safe-area-inset-bottom,0px))}
.btn.lg{padding:15px 20px;font-size:1.05rem}
/* Escolha dos gostos (arrastar) */
.sw-layer{position:fixed;inset:0;z-index:40;background:rgba(20,28,22,.55);display:grid;place-items:center;padding:16px}
.sw-box{width:100%;max-width:420px;max-height:calc(100dvh - 32px);overflow:auto;background:var(--surface);border-radius:22px;padding:18px;display:flex;flex-direction:column;gap:10px;box-shadow:0 20px 60px rgba(0,0,0,.3)}
.sw-steps{display:flex;gap:4px}.sw-steps i{flex:1;height:4px;border-radius:4px;background:var(--line)}.sw-steps i.done{background:var(--sage)}.sw-steps i.on{background:var(--accent)}
.sw-head{text-align:center}.sw-head h2{display:flex;align-items:center;justify-content:center;gap:8px}
.sw-stage{position:relative;min-height:330px;display:grid}
.sw-card{grid-area:1/1;position:relative;background:var(--surface);border:1px solid var(--line);border-radius:20px;padding:16px;display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;touch-action:none;user-select:none;cursor:grab;box-shadow:var(--shadow)}
.sw-card:active{cursor:grabbing}
.sw-img{width:220px;height:220px;max-width:70vw;max-height:70vw;border-radius:50%;overflow:hidden;display:grid;place-items:center;background:var(--surface-2);pointer-events:none}
.sw-img img,.sw-img svg{width:100%;height:100%;object-fit:cover}
.sw-name{font-family:var(--display);font-size:1.2rem}
.sw-tag{position:absolute;top:18px;padding:4px 12px;border-radius:8px;font-weight:800;letter-spacing:.06em;border:3px solid;opacity:0;pointer-events:none;z-index:2}
.sw-tag.yes{left:16px;color:var(--ok);border-color:var(--ok);transform:rotate(-12deg)}
.sw-tag.no{right:16px;color:var(--bad);border-color:var(--bad);transform:rotate(12deg)}
.sw-btns{display:flex;justify-content:center;gap:28px}
.sw-btn{width:62px;height:62px;border-radius:50%;border:1.5px solid var(--line);background:var(--surface);display:grid;place-items:center;cursor:pointer;box-shadow:var(--shadow)}
.sw-btn .ic{width:28px;height:28px}
.sw-btn.no{color:var(--bad)}.sw-btn.yes{color:var(--ok)}
.sw-tut{grid-area:1/1;z-index:3;border-radius:20px;background:rgba(44,59,46,.92);color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:20px;text-align:center}
.sw-tut p{color:#fff}.sw-tut .btn{background:var(--sage);color:var(--sage-ink)}
.sw-hand{animation:swHand 2.4s ease-in-out infinite}
.sw-tut-l{display:flex;justify-content:space-between;width:100%;max-width:240px;font-weight:700;font-size:.85rem;color:var(--sage)}
@keyframes swHand{0%,100%{transform:translateX(0) rotate(0)}25%{transform:translateX(70px) rotate(12deg)}50%{transform:translateX(0)}75%{transform:translateX(-70px) rotate(-12deg)}}
@media (prefers-reduced-motion:reduce){.sw-hand{animation:none}}
.sw-done{align-items:center;text-align:center;padding:12px 4px}
.sw-big{width:64px;height:64px;border-radius:50%;background:var(--accent-soft);color:var(--accent);display:grid;place-items:center;margin:0 auto}
.sw-big .ic{width:32px;height:32px}
.sw-lock{align-items:center;text-align:center;padding:28px 20px}
.sw-box .chip-s{background:var(--surface-2)}
/* Lista de alimentos e suplementos */
.frows{display:flex;flex-direction:column;border:1px solid var(--line);border-radius:14px;overflow:hidden;background:var(--surface)}
.frow{display:flex;align-items:center;gap:8px;padding:10px 10px 10px 14px;border-top:1px solid var(--line);cursor:pointer}
.frow:first-child{border-top:0}
.frow:hover{background:var(--surface-2)}
.frow-t{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.frow-t .gchips{margin-top:2px}
.frow .mini-btn{position:static;flex:none}
.wd-sec{border-top:1px solid var(--line);padding:4px 0}
.wd-sec summary{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:12px 2px;cursor:pointer;list-style:none}
.wd-sec summary::-webkit-details-marker{display:none}
.wd-sec summary::after{content:'›';font-size:1.3rem;color:var(--muted);transform:rotate(90deg);transition:transform .15s;margin-left:6px}
.wd-sec[open] summary::after{transform:rotate(-90deg)}
.wd-sec summary .muted{margin-left:auto}
.wd-sec[open]{padding-bottom:12px}
.wd-ic{width:96px;height:96px;border-radius:50%;margin:0 auto;display:grid;place-items:center;background:color-mix(in srgb,var(--gc) 14%,transparent);color:var(--gc)}
.wd-ic .ic{width:40px;height:40px}
