/* ==========================================================================
   Trampita / area de membros
   Superficie clara e arredondada, sombra suave, um unico acento coral e a
   barra inferior escura flutuante. Sem traco grosso: a hierarquia vem do
   contraste de superficie e do espaco.
   ========================================================================== */

body.app {
  /* --- tokens proprios do app, sobrepondo os da landing --- */
  --bg:          #E7DED6;   /* fundo atras do telemovel, no desktop */
  --paper:       #F7F3EE;   /* fundo do app */
  --surface:     #FFFFFF;   /* cartoes */
  --surface-2:   #F1EBE4;   /* campos e linhas internas */
  --surface-3:   #E8E0D7;

  --ink:         #17171A;
  --ink-70:      rgba(23, 23, 26, .70);
  --ink-50:      rgba(23, 23, 26, .50);
  --ink-35:      rgba(23, 23, 26, .35);
  --ink-12:      rgba(23, 23, 26, .10);

  --coral:       #F08A63;
  --coral-dark:  #D9713F;
  --coral-soft:  #FBDCCB;
  --sage:        #6E8B5B;
  --sage-soft:   #DFE7D6;

  --r-xs: 10px;
  --r-sm: 14px;
  --r:    20px;
  --r-lg: 28px;
  --pill: 999px;

  --sh-1: 0 2px 8px -3px rgba(23, 23, 26, .10);
  --sh-2: 0 10px 28px -14px rgba(23, 23, 26, .22);
  --sh-3: 0 18px 40px -20px rgba(23, 23, 26, .30);

  --nav-h: 76px;

  font-family: "Plus Jakarta Sans", -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  letter-spacing: -.01em;
}

body.app h1, body.app h2, body.app h3, body.app h4 {
  font-family: inherit;
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1.12;
}

body.app .num { font-family: inherit; font-variant-numeric: tabular-nums; }
body.app .tag {
  font-family: inherit;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-50);
}

/* Coluna unica centrada. No desktop vira moldura de telemovel. */
.shell {
  width: 100%;
  max-width: 460px;
  min-height: 100dvh;
  margin-inline: auto;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--sh-3);
}

.view { display: none; flex: 1; padding: 0 1.15rem calc(var(--nav-h) + 2.5rem); }
.view.is-active { display: block; animation: viewIn .28s cubic-bezier(.22, 1, .36, 1); }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } }

/* --- Botoes ---------------------------------------------------------------- */
body.app .btn {
  --btn-bg: var(--coral);
  --btn-fg: #fff;
  border: 0;
  border-radius: var(--pill);
  box-shadow: none;
  font-family: inherit;
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: -.01em;
  padding: 1.05rem 1.6rem;
  transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}
body.app .btn:hover { transform: translateY(-1px); box-shadow: var(--sh-2); background: var(--coral-dark); }
body.app .btn:active { transform: translateY(0); box-shadow: none; }
body.app .btn--ghost { --btn-bg: var(--surface-2); --btn-fg: var(--ink); }
body.app .btn--ghost:hover { background: var(--surface-3); }
body.app .btn--olive { --btn-bg: var(--sage); }

/* Estado armado do reiniciar: o botao muda de cor no primeiro toque, para o
   segundo nao ser um clique distraido no mesmo sitio de sempre. */
body.app .btn--perigo { --btn-bg: var(--terracotta); --btn-fg: #fff; }
body.app .btn--perigo:hover { background: var(--terracotta); }

body.app .mchip {
  font-family: inherit;
  font-size: .7rem;
  font-weight: 600;
  color: var(--ink-70);
  background: var(--surface-2);
  border: 0;
  border-radius: var(--pill);
  padding: .4rem .7rem;
}
body.app .mchip--kcal { background: var(--ink); color: #fff; }
body.app .mchip--tag { background: var(--sage-soft); color: var(--sage); }

/* --- Login ----------------------------------------------------------------- */
.login {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.4rem;
  padding: 2.5rem 1.6rem;
}
.login__brand { display: flex; align-items: center; gap: .65rem; font-weight: 800; font-size: 1.05rem; }
.login__brand span {
  width: 40px; height: 40px; border-radius: 14px;
  background: var(--coral); color: #fff;
  display: grid; place-items: center; font-size: 1.1rem;
}
.login h1 { font-size: clamp(1.9rem, 7vw, 2.4rem); }
.login__sub { color: var(--ink-50); font-size: .92rem; max-width: 34ch; line-height: 1.5; }

.field { display: grid; gap: .45rem; }
.field label { font-size: .78rem; font-weight: 600; color: var(--ink-50); }
.field input {
  width: 100%;
  padding: 1.05rem 1.15rem;
  background: var(--surface);
  border: 1.5px solid transparent;
  border-radius: var(--r-sm);
  font-size: .95rem;
  box-shadow: var(--sh-1);
  transition: border-color .16s;
}
.field input:focus { outline: 0; border-color: var(--coral); }
.field input::placeholder { color: var(--ink-35); }
.field__hint { font-size: .74rem; color: var(--ink-35); }
.login__err {
  background: var(--coral-soft);
  color: var(--coral-dark);
  padding: .85rem 1rem;
  border-radius: var(--r-sm);
  font-size: .86rem;
  font-weight: 600;
}
.login__foot { font-size: .8rem; color: var(--ink-35); text-align: center; }
.login__foot a { color: var(--coral-dark); font-weight: 600; }
.login__link {
  background: none; border: 0; padding: 0; font: inherit; cursor: pointer;
  color: var(--coral-dark); font-weight: 600; text-decoration: underline;
}

/* --- Topo ------------------------------------------------------------------ */
.appbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--paper);
  padding: 1.1rem 1.15rem .6rem;
}
.appbar__row { display: flex; align-items: center; gap: .6rem; }
.appbar__title { flex: 1; min-width: 0; text-align: center; }
.appbar__tag { font-size: .7rem; font-weight: 600; color: var(--ink-35); }
.appbar h1 {
  font-size: 1.02rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.icon-btn {
  width: 42px; height: 42px; flex: none;
  border: 0;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--sh-1);
  display: grid; place-items: center;
  font-size: 1rem;
  color: var(--ink);
  transition: transform .16s ease;
}
.icon-btn:hover { transform: scale(1.06); }

/* --- Medidor em arco: um segmento por dia do desafio ----------------------- */
.gauge {
  position: relative;
  margin: .6rem auto .2rem;
  width: min(290px, 80%);
}
.gauge svg { width: 100%; display: block; overflow: visible; }
/* Cada dia e uma capsula radial. Traco arredondado da o formato. */
.gauge__seg {
  stroke: var(--surface-3);
  stroke-width: 10.5;
  stroke-linecap: round;
  transition: stroke .4s ease;
}
.gauge__seg.is-on { stroke: var(--coral); }
.gauge__seg.is-now { stroke: var(--coral-dark); }
.gauge__mid {
  position: absolute;
  left: 0; right: 0; bottom: 2%;
  text-align: center;
}
.gauge__eyebrow {
  font-size: .7rem; font-weight: 600; color: var(--coral-dark);
}
.gauge__big {
  font-size: 2rem; font-weight: 800; letter-spacing: -.045em;
  line-height: 1.05; margin-top: .05rem;
  font-variant-numeric: tabular-nums;
}
.gauge__sub { font-size: .76rem; color: var(--ink-35); font-weight: 500; }

/* --- Cartao de hoje -------------------------------------------------------- */
.hero-card {
  width: 100%;
  text-align: left;
  display: block;
  background: var(--surface);
  border: 0;
  border-radius: var(--r-lg);
  box-shadow: var(--sh-2);
  overflow: hidden;
  padding: .8rem;
  transition: transform .16s ease, box-shadow .16s ease;
}
.hero-card:hover { transform: translateY(-2px); box-shadow: var(--sh-3); }
.hero-card__art {
  border-radius: var(--r);
  background: var(--coral-soft);
  padding: 1rem;
  margin-bottom: .85rem;
}
.hero-card__art svg { width: 104px; margin-inline: auto; }
.hero-card__body { padding: 0 .5rem .5rem; }
.hero-card__body .tag { color: var(--coral-dark); font-weight: 700; }
.hero-card__body h3 { font-size: 1.2rem; margin: .3rem 0; }
.hero-card__body p { font-size: .85rem; color: var(--ink-50); line-height: 1.45; }

.focus { font-size: .8rem; color: var(--ink-50); margin-top: .5rem; line-height: 1.45; }
.focus b { color: var(--coral-dark); font-weight: 700; }

/* --- Macros ---------------------------------------------------------------- */
.macros {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .3rem;
  margin-top: .85rem;
  background: var(--surface-2);
  border-radius: var(--r);
  padding: .75rem .5rem;
}
.macro { text-align: center; }
.macro span {
  display: block;
  font-size: .66rem; font-weight: 600; color: var(--ink-35);
  margin-bottom: .18rem;
}
.macro b { display: block; font-size: .95rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.macro--kcal b { color: var(--coral-dark); }

.macros__nota {
  margin: .45rem 0 0; font-size: .72rem; line-height: 1.45; color: var(--ink-35);
}
.macros__nota--ok { color: var(--olive, var(--ink-35)); }

.macros-text {
  margin-top: .85rem;
  padding: .85rem 1rem;
  background: var(--surface-2);
  border-radius: var(--r);
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink-70);
}

/* --- Titulo de seccao ------------------------------------------------------ */
.sec-title { display: flex; align-items: center; gap: .6rem; margin: 1.6rem 0 .85rem; }
.sec-title h2 { font-size: 1.05rem; }
.sec-title .tag { margin-left: auto; color: var(--ink-35); }

/* --- Grelha dos 21 dias ---------------------------------------------------- */
.days { display: grid; grid-template-columns: repeat(5, 1fr); gap: .5rem; }
.day {
  aspect-ratio: 1;
  border: 0;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--sh-1);
  display: grid;
  place-content: center;
  gap: .1rem;
  text-align: center;
  transition: transform .16s ease, box-shadow .16s ease;
}
.day b { font-size: .88rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.day small { font-size: .56rem; font-weight: 600; opacity: .55; }
.day:not(.day--locked):hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
.day--open { background: var(--coral-soft); }
.day--today { background: var(--coral); color: #fff; }
.day--done { background: var(--sage); color: #fff; }
.day--locked { background: var(--surface-2); color: var(--ink-35); box-shadow: none; cursor: not-allowed; }
.day--locked b { font-size: .85rem; opacity: .7; }
.day--locked small { opacity: .8; }

/* --- Cartao de receita ----------------------------------------------------- */
/* O cartao fora do ecra nao se desenha. Com a lista inteira aberta sao 659
   cartoes, e sem isto o navegador faz layout e pintura de todos a cada rolagem
   -- e num telemovel modesto isso e o que trava. 'contain-intrinsic-size' da a
   altura estimada de um cartao por desenhar, para a barra de rolagem nao
   saltar enquanto se rola. */
.card-wrap {
  content-visibility: auto;
  contain-intrinsic-size: auto 92px;
}

.card {
  width: 100%;
  display: flex;
  gap: .85rem;
  align-items: center;
  text-align: left;
  background: var(--surface);
  border: 0;
  border-radius: var(--r);
  box-shadow: var(--sh-1);
  padding: .7rem;
  margin-bottom: .6rem;
  transition: transform .16s ease, box-shadow .16s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
.card__art {
  width: 64px; height: 64px; flex: none;
  border-radius: 50%;
  background: var(--coral-soft);
  display: grid; place-items: center;
  overflow: hidden;
}
.card__art svg { width: 78%; }
.card__body { min-width: 0; flex: 1; }
.card__body h3 { font-size: .95rem; line-height: 1.2; }
.card__body p { font-size: .74rem; color: var(--ink-35); margin-top: .2rem; font-weight: 500; }
.card__macros { display: flex; gap: .3rem; margin-top: .45rem; flex-wrap: wrap; align-items: center; }
.card__go { margin-left: auto; color: var(--ink-35); font-size: 1.2rem; flex: none; }
.card--done .card__art { background: var(--sage-soft); }

/* Barras de esforco, como na referencia */
.dots { display: inline-flex; gap: 2px; vertical-align: middle; }
.dots i { width: 6px; height: 12px; border-radius: 2px; background: var(--surface-3); display: block; }
.dots i.is-on { background: var(--coral); }

/* --- Linha compacta do acervo ---------------------------------------------- */
.rows { border-radius: var(--r); overflow: hidden; background: var(--surface); box-shadow: var(--sh-1); }
.rows--flat { margin-bottom: .6rem; }
.row {
  display: flex; align-items: center; gap: .7rem;
  padding: .9rem 1.05rem;
  border-bottom: 1px solid var(--ink-12);
  font-size: .85rem;
}
.row:last-child { border-bottom: 0; }
/* Linhas que sao link (as politicas, na aba Conta) nao devem parecer link:
   ficam iguais as outras, so com o realce ao passar o rato. */
a.row { color: inherit; text-decoration: none; }
a.row:hover { background: var(--surface-2); }
/* O mesmo para as linhas que sao botao: sem isto o botao encolhe ao tamanho
   do texto e as linhas ficam escalonadas em vez de alinhadas. */
button.row {
  width: 100%; font: inherit; color: inherit; text-align: left;
  background: none; border: 0; border-bottom: 1px solid var(--ink-12);
  cursor: pointer;
}
button.row:last-child { border-bottom: 0; }
button.row:hover { background: var(--surface-2); }
.row b { margin-left: auto; font-size: .8rem; font-weight: 700; font-variant-numeric: tabular-nums; }

.row-recipe {
  width: 100%;
  display: flex;
  align-items: center;
  gap: .8rem;
  text-align: left;
  padding: .75rem 1rem;
  background: var(--surface);
  border: 0;
  border-bottom: 1px solid var(--ink-12);
  transition: background .14s;
}
.row-recipe:last-child { border-bottom: 0; }
.row-recipe:hover { background: var(--surface-2); }
.row-recipe__ic {
  width: 38px; height: 38px; flex: none;
  border-radius: 50%;
  background: var(--surface-2);
  display: grid; place-items: center;
  font-size: 1rem;
}
.row-recipe__body { min-width: 0; flex: 1; }
.row-recipe__body b { display: block; font-size: .88rem; line-height: 1.25; font-weight: 600; }
.row-recipe__body span { display: block; font-size: .7rem; color: var(--ink-35); margin-top: .15rem; font-weight: 500; }

/* Enquanto o acervo nao chega, e quando nao chega de todo. */
.lib-vazio {
  color: var(--ink-40); font-size: var(--t-sm); padding: 1.25rem 0; text-align: center;
}

/* O fim da lista da biblioteca: e aqui que o observador repara que a pessoa
   chegou ao fundo, e e aqui que entra o lote seguinte. */
.lib-fim { padding: .75rem 0 .25rem; }
.lib-fim:empty { padding: 0; }

/* Receita que apareceu na busca por causa de um ingrediente, e nao do nome.
   Mostra a linha que casou, para o resultado nao parecer aleatorio. */
.card__hit,
.row-recipe__hit {
  color: var(--coral-dark);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --- Biblioteca ------------------------------------------------------------ */
.search-wrap { position: relative; margin-top: .2rem; }
.search-wrap::before {
  content: '🔍';
  position: absolute;
  left: 1.05rem; top: 50%;
  transform: translateY(-50%);
  font-size: .8rem;
  opacity: .4;
  pointer-events: none;
}
.search {
  width: 100%;
  padding: .95rem 1.1rem .95rem 2.7rem;
  border: 0;
  border-radius: var(--pill);
  background: var(--surface);
  box-shadow: var(--sh-1);
  font-family: inherit;
  font-size: .9rem;
}
.search:focus { outline: 2px solid var(--coral); }

/* Categorias como mosaico de icones */
.tiles {
  display: flex;
  gap: .5rem;
  overflow-x: auto;
  padding: 1rem .15rem .35rem;
  margin-inline: -.15rem;
  scrollbar-width: none;
}
.tiles::-webkit-scrollbar { display: none; }
.tile {
  flex: none;
  width: 76px;
  border: 0;
  background: transparent;
  display: grid;
  justify-items: center;
  gap: .4rem;
}
.tile__ic {
  width: 60px; height: 60px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--sh-1);
  display: grid; place-items: center;
  font-size: 1.5rem;
  transition: transform .16s ease, background .16s ease;
}
.tile span { font-size: .67rem; font-weight: 600; color: var(--ink-50); text-align: center; line-height: 1.2; }
.tile:hover .tile__ic { transform: translateY(-2px); }
.tile.is-on .tile__ic { background: var(--coral); }
.tile.is-on span { color: var(--ink); }

.lib-sec { display: flex; align-items: center; gap: .6rem; margin: 1.5rem 0 .7rem; }
.lib-sec h3 { font-size: .98rem; }
.lib-sec .tag {
  margin-left: auto;
  background: var(--surface-2);
  color: var(--ink-50);
  border-radius: var(--pill);
  padding: .2rem .6rem;
  font-size: .7rem;
  font-weight: 700;
}
.lib-note { font-size: .76rem; color: var(--ink-35); margin-bottom: .7rem; }

/* --- Receita --------------------------------------------------------------- */
.rback {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .55rem 1rem .55rem .8rem;
  margin: .9rem 0 .85rem;
  background: var(--surface);
  border: 0;
  border-radius: var(--pill);
  box-shadow: var(--sh-1);
  font-family: inherit;
  font-size: .84rem;
  font-weight: 600;
}
.recipe__art {
  border-radius: var(--r-lg);
  background: var(--coral-soft);
  padding: 1.6rem;
  margin-bottom: 1.1rem;
}
.recipe__art svg { width: 148px; margin-inline: auto; }
.recipe__art--plain { background: var(--surface-2); }
.recipe__art--plain svg { opacity: .55; }
.recipe h2 { font-size: 1.5rem; }
.recipe__meta { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .7rem; }

.tabs {
  display: flex;
  gap: .25rem;
  margin: 1.4rem 0 1rem;
  background: var(--surface-2);
  padding: .28rem;
  border-radius: var(--pill);
}
.tab {
  flex: 1;
  padding: .65rem .5rem;
  border: 0;
  background: transparent;
  border-radius: var(--pill);
  font-family: inherit;
  font-size: .85rem;
  font-weight: 600;
  color: var(--ink-50);
  transition: background .16s, color .16s;
}
.tab.is-on { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.steps li {
  display: grid; grid-template-columns: auto 1fr; gap: .8rem;
  align-items: start;
  font-size: .87rem;
  line-height: 1.5;
  color: var(--ink-70);
  background: var(--surface);
  border-radius: var(--r-sm);
  padding: .85rem .95rem;
  box-shadow: var(--sh-1);
}

/* Ingredientes sao itens curtos: um cartao so, com divisorias. */
.steps--ing {
  gap: 0;
  background: var(--surface);
  border-radius: var(--r);
  box-shadow: var(--sh-1);
  overflow: hidden;
}
.steps--ing li {
  border-radius: 0;
  box-shadow: none;
  border-bottom: 1px solid var(--ink-12);
  padding: .75rem 1rem;
}
.steps--ing li:last-child { border-bottom: 0; }
.steps--ing li::before {
  content: '';
  width: 7px; height: 7px; margin-top: .5rem;
  border-radius: 50%;
  background: var(--coral);
}
.steps--how li b {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--coral-soft);
  color: var(--coral-dark);
  font-size: .72rem;
  font-weight: 700;
}
.recipe__actions { display: grid; gap: .55rem; margin-top: 1.6rem; }
.done-flag {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  background: var(--sage-soft);
  color: var(--sage);
  border-radius: var(--pill);
  padding: 1.05rem;
  font-weight: 700;
  font-size: .95rem;
}
.fonte {
  margin-top: 1.2rem;
  padding-top: .85rem;
  border-top: 1px solid var(--ink-12);
  font-size: .74rem;
  color: var(--ink-35);
  line-height: 1.5;
}
.fonte b { color: var(--ink-50); font-weight: 600; }

.callout {
  margin-top: 1.1rem;
  padding: 1rem 1.15rem;
  background: var(--coral-soft);
  border: 0;
  border-radius: var(--r);
}
.callout--olive { background: var(--sage-soft); }
.callout b { display: block; font-size: .92rem; font-weight: 700; margin-bottom: .3rem; }
.callout p { font-size: .84rem; color: var(--ink-70); line-height: 1.5; margin: 0; }
.callout p + p { margin-top: .55rem; }

/* --- Extras ---------------------------------------------------------------- */
.upsell {
  position: relative;
  border: 0;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--sh-2);
  overflow: hidden;
  margin-bottom: .9rem;
}
.upsell__art { background: var(--surface-2); padding: 1.3rem; position: relative; }
.upsell__art svg { width: 88px; margin-inline: auto; filter: grayscale(.35) opacity(.9); }
.upsell__lock {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: rgba(23, 23, 26, .18);
  font-size: 1.6rem;
}
.upsell__body { padding: 1.1rem 1.2rem 1.25rem; }
.upsell__body h3 { font-size: 1.1rem; }
.upsell__body > p { font-size: .84rem; color: var(--ink-50); margin: .4rem 0 .8rem; line-height: 1.5; }
.upsell ul { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .4rem; }
.upsell li { font-size: .78rem; display: flex; gap: .5rem; color: var(--ink-50); }
.upsell li::before { content: '🔒'; font-size: .68rem; }
.upsell__buy { display: flex; align-items: center; gap: .75rem; }
.upsell__price { font-size: 1.35rem; font-weight: 800; letter-spacing: -.03em; }
.upsell--owned .upsell__lock { display: none; }
.upsell--owned .upsell__art svg { filter: none; }
.upsell--owned li::before { content: '✓'; color: var(--sage); }

/* --- Conta ----------------------------------------------------------------- */
.account-head {
  display: flex; align-items: center; gap: .9rem;
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  padding: 1.1rem;
  margin-top: 1.1rem;
  margin-bottom: .3rem;
}
.account-head__av {
  width: 54px; height: 54px; flex: none;
  border-radius: 50%;
  background: var(--coral);
  color: #fff;
  display: grid; place-items: center;
  font-size: 1.25rem; font-weight: 800;
}
.account-head b { display: block; font-size: .95rem; }
.account-head span { font-size: .76rem; color: var(--ink-35); }

/* --- Barra inferior -------------------------------------------------------- */
.tabbar {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 460px;
  height: var(--nav-h);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  background: var(--ink);
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 30;
}
.tabbar button {
  border: 0; background: transparent;
  display: grid; justify-items: center; gap: .22rem;
  padding: .3rem 0;
  color: rgba(255, 255, 255, .45);
  font-family: inherit;
  transition: color .16s;
}
.tabbar em { font-style: normal; display: block; line-height: 0; }
.tabbar em svg { width: 22px; height: 22px; }
.tabbar__main em svg { width: 24px; height: 24px; }
.tabbar span { font-size: .58rem; font-weight: 600; }
.tabbar button.is-on { color: #fff; }

/* Acao principal: circulo coral elevado no centro */
.tabbar__main { position: relative; justify-self: center; }
.tabbar__main em {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: var(--coral);
  color: #fff;
  display: grid; place-items: center;
  font-size: 1.3rem;
  box-shadow: 0 8px 20px -8px rgba(240, 138, 99, .9);
  transform: translateY(-15px);
  transition: transform .18s ease, background .18s ease;
}
.tabbar__main span { transform: translateY(-13px); color: rgba(255, 255, 255, .75); }
.tabbar__main:hover em { transform: translateY(-18px); background: var(--coral-dark); }
.tabbar button.tabbar__main.is-on { color: rgba(255, 255, 255, .75); }
.tabbar button.tabbar__main.is-on em { background: var(--coral-dark); }

/* --- Toast ----------------------------------------------------------------- */
.toast {
  position: fixed;
  left: 50%; bottom: calc(var(--nav-h) + 18px);
  transform: translate(-50%, 16px);
  width: min(420px, calc(100vw - 2.4rem));
  background: var(--ink);
  color: #fff;
  border-radius: var(--r);
  padding: .95rem 1.15rem;
  font-size: .84rem;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transition: opacity .24s ease, transform .24s ease;
  z-index: 60;
  box-shadow: var(--sh-3);
}
.toast.is-up { opacity: 1; transform: translate(-50%, 0); }
.toast b { color: var(--coral); display: block; margin-bottom: .15rem; font-weight: 700; }

/* --- Modal ----------------------------------------------------------------- */
.modal {
  position: fixed; inset: 0;
  z-index: 70;
  display: grid;
  place-items: end center;
  background: rgba(23, 23, 26, .45);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .24s ease;
}
.modal.is-open { opacity: 1; pointer-events: auto; }
.modal__panel {
  width: 100%;
  max-width: 460px;
  max-height: 92dvh;
  overflow-y: auto;
  background: var(--paper);
  border: 0;
  border-radius: 28px 28px 0 0;
  padding: 1.1rem 1.15rem calc(1.5rem + env(safe-area-inset-bottom));
  transform: translateY(20px);
  transition: transform .28s cubic-bezier(.22, 1, .36, 1);
}
.modal.is-open .modal__panel { transform: none; }
.modal__grab { width: 40px; height: 4px; background: var(--ink-12); border-radius: 99px; margin: 0 auto 1rem; }
.modal__head { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.modal__head h3 { font-size: 1.2rem; }
.modal__head .tag { color: var(--coral-dark); font-weight: 700; }
.modal__close {
  margin-left: auto; flex: none;
  width: 34px; height: 34px;
  border: 0;
  border-radius: 50%;
  background: var(--surface-2);
  font-size: .85rem;
}
.modal__actions { display: grid; gap: .5rem; margin-top: 1.15rem; }
.modal__micro { text-align: center; font-size: .72rem; color: var(--ink-35); margin-top: .7rem; }

/* Cartao de partilha */
.storycard {
  aspect-ratio: 9 / 16;
  max-height: 44dvh;
  margin-inline: auto;
  background: var(--coral);
  border: 0;
  border-radius: var(--r-lg);
  padding: 1.3rem;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  text-align: center;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.storycard__tag { font-size: .6rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.storycard__art { width: 38%; }
.storycard h4 { font-size: clamp(.95rem, 3.6vw, 1.25rem); line-height: 1.15; }
.storycard__macros { display: flex; gap: .3rem; flex-wrap: nowrap; justify-content: center; }
.storycard__macros span {
  font-size: .55rem; font-weight: 700;
  background: rgba(255, 255, 255, .2);
  border-radius: var(--pill);
  padding: .3rem .5rem;
}
.storycard__foot { font-weight: 800; font-size: .78rem; margin-top: auto; }
.storycard__day {
  font-weight: 800;
  background: #fff; color: var(--coral-dark);
  border-radius: var(--pill);
  padding: .25rem .8rem;
  font-size: .72rem;
}

/* --- Favoritos ------------------------------------------------------------- */
.card-wrap, .row-wrap { position: relative; }

.fav-btn {
  position: absolute;
  border: 0;
  background: transparent;
  display: grid;
  place-items: center;
  color: var(--ink-35);
  transition: transform .16s ease, color .16s ease;
}
.fav-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.fav-btn:hover { transform: scale(1.15); color: var(--coral); }
.fav-btn.is-on { color: var(--coral); }
.fav-btn.is-on svg { fill: currentColor; stroke: currentColor; }

.fav-btn--card { top: .55rem; right: .55rem; width: 34px; height: 34px; }
.fav-btn--row { top: 50%; right: .55rem; transform: translateY(-50%); width: 34px; height: 34px; }
.fav-btn--row:hover { transform: translateY(-50%) scale(1.15); }

/* Na ficha, o coracao flutua sobre a arte */
.recipe__art { position: relative; }
.fav-btn--art {
  top: .8rem; right: .8rem;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--sh-1);
}
.fav-btn--art svg { width: 22px; height: 22px; }

/* O cartao encolhe para o coracao nao tapar o conteudo */
.card-wrap .card__body { padding-right: 1.6rem; }
.row-wrap .row-recipe { padding-right: 2.6rem; }

/* --- Previa da lista no Desafio -------------------------------------------- */
.lista-card {
  width: 100%;
  text-align: left;
  border: 0;
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  padding: 1.05rem 1.15rem;
  display: grid;
  gap: .7rem;
  transition: transform .16s ease, box-shadow .16s ease;
}
.lista-card:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
.lista-card__top { display: flex; align-items: baseline; gap: .5rem; }
.lista-card__top b { font-size: 1.15rem; font-weight: 700; }
.lista-card__top span { font-size: .8rem; color: var(--ink-35); }
.lista-card__top .card__go { margin-left: auto; }
.lista-card__bar { height: 7px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.lista-card__bar i { display: block; height: 100%; background: var(--sage); border-radius: 99px; transition: width .4s ease; }
.lista-card__aisles { display: flex; flex-wrap: wrap; gap: .35rem; }
.lista-card__aisles span {
  font-size: .7rem;
  font-weight: 600;
  color: var(--ink-50);
  background: var(--surface-2);
  border-radius: var(--pill);
  padding: .3rem .6rem;
}
.lista-card__aisles b { color: var(--ink); }

/* --- Ecra da lista --------------------------------------------------------- */
.fontes { display: flex; gap: .45rem; padding-top: .9rem; flex-wrap: wrap; }
.fonte-pill {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  border: 0;
  background: var(--surface);
  box-shadow: var(--sh-1);
  border-radius: var(--pill);
  padding: .6rem 1rem;
  font-family: inherit;
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink-50);
  transition: background .16s, color .16s;
}
.fonte-pill i { font-style: normal; font-size: .9rem; }
.fonte-pill b { font-weight: 700; }
.fonte-pill.is-on { background: var(--coral); color: #fff; }

.lista-head {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: 1.1rem;
  padding: .95rem 1.1rem;
  background: var(--surface);
  border-radius: var(--r);
  box-shadow: var(--sh-1);
}
.lista-head > div { flex: 1; }
.lista-head b { display: block; font-size: 1.05rem; font-weight: 700; }
.lista-head span { font-size: .76rem; color: var(--ink-35); }
body.app .btn--mini { padding: .5rem .9rem; font-size: .78rem; }

.item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: .8rem;
  text-align: left;
  padding: .8rem 1rem;
  background: var(--surface);
  border: 0;
  border-bottom: 1px solid var(--ink-12);
  transition: background .14s;
}
.item:last-child { border-bottom: 0; }
.item:hover { background: var(--surface-2); }
.item__box {
  width: 24px; height: 24px; flex: none;
  border-radius: 8px;
  background: var(--surface-2);
  color: transparent;
  display: grid; place-items: center;
  font-size: .7rem;
  font-weight: 700;
  transition: background .16s, color .16s;
}
.item__body { min-width: 0; flex: 1; }
.item__body b { display: block; font-size: .87rem; font-weight: 600; line-height: 1.3; }
.item__body span { display: block; font-size: .7rem; color: var(--ink-35); margin-top: .1rem; }
.item.is-on .item__box { background: var(--sage); color: #fff; }
.item.is-on .item__body b { text-decoration: line-through; color: var(--ink-35); font-weight: 500; }

/* --- Estado vazio ---------------------------------------------------------- */
.empty {
  display: grid;
  justify-items: center;
  gap: .6rem;
  text-align: center;
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  padding: 2rem 1.5rem;
}
.empty__ic {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--coral-soft);
  color: var(--coral-dark);
}
.empty__ic svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.empty b { font-size: 1.02rem; font-weight: 700; }
.empty p { font-size: .84rem; color: var(--ink-50); line-height: 1.5; max-width: 34ch; }
.empty .btn { margin-top: .5rem; }

/* --- Fotos das receitas ---------------------------------------------------- */
.foto { width: 100%; height: 100%; object-fit: cover; display: block; }

.card__art { overflow: hidden; }
.card__art .foto { border-radius: 50%; }

.row-recipe__ic { overflow: hidden; }
.row-recipe__ic--foto { background: var(--surface-3); }

/* Com foto, a arte perde o enchimento e vira imagem sangrada */
.hero-card__art--foto {
  padding: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-3);
}
.recipe__art--foto {
  padding: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--surface-3);
}

/* Subdivisao dentro da lista de ingredientes (massa, molho, cobertura) */
.steps--ing .steps__sub {
  grid-template-columns: 1fr;
  background: var(--surface-2);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--ink-50);
  padding: .5rem 1rem;
}
.steps--ing .steps__sub::before { display: none; }

/* ====================================================== Meal Prep (extra) */
.mp-abas { display: flex; gap: .4rem; overflow-x: auto; padding: .2rem 0 1rem; }
.mp-aba {
  flex: 0 0 auto; padding: .55rem 1rem; border-radius: 999px;
  border: 1px solid var(--ink-12); background: var(--white);
  font-size: .8rem; font-weight: 600; color: var(--ink-60); cursor: pointer;
}
.mp-aba.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }

.mp-papel {
  display: inline-block; min-width: 4.6rem;
  font-size: .65rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-40); font-weight: 700;
}

.mp-dia {
  background: var(--white); border-radius: .9rem;
  padding: .85rem 1rem; margin-bottom: .55rem;
}
.mp-dia h4 { margin: 0 0 .5rem; font-size: .8rem; color: var(--ink-40); font-weight: 700; }
.mp-dia__linha { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; margin-bottom: .3rem; }
.mp-dia__rot { font-size: .7rem; color: var(--ink-40); min-width: 3.4rem; font-weight: 600; }
.mp-dia__prato {
  border: 0; background: none; padding: 0; cursor: pointer;
  font: inherit; font-size: .88rem; font-weight: 600; color: var(--ink);
  text-align: left; text-decoration: underline; text-decoration-color: var(--ink-12);
}
.mp-dia__prato:hover { text-decoration-color: var(--terracotta); }
.mp-dia__com { font-size: .78rem; color: var(--ink-60); }

.mp-lista { background: var(--white); border-radius: .9rem; padding: .9rem 1rem; }
.mp-corredor + .mp-corredor { margin-top: .9rem; }
.mp-corredor h5 { margin: 0 0 .35rem; font-size: .78rem; color: var(--ink-60); }
.mp-corredor ul { margin: 0; padding-left: 1.1rem; }
.mp-corredor li { font-size: .82rem; margin-bottom: .18rem; }

.mp-guia { display: grid; gap: .6rem; }
.mp-passo {
  display: flex; gap: .8rem; background: var(--white);
  border-radius: .9rem; padding: .85rem 1rem;
}
.mp-hora {
  flex: 0 0 2.7rem; font-variant-numeric: tabular-nums;
  font-size: .78rem; font-weight: 700; color: var(--terracotta);
}
.mp-passo b { display: block; font-size: .88rem; margin-bottom: .2rem; }
.mp-passo p { margin: 0; font-size: .82rem; color: var(--ink-60); line-height: 1.5; }

.mp-tabela {
  width: 100%; border-collapse: collapse; background: var(--white);
  border-radius: .9rem; overflow: hidden; font-size: .8rem;
}
.mp-tabela th {
  text-align: left; padding: .6rem .8rem; font-size: .68rem;
  text-transform: uppercase; letter-spacing: .05em; color: var(--ink-40);
  border-bottom: 1px solid var(--ink-12);
}
.mp-tabela td { padding: .6rem .8rem; border-bottom: 1px solid var(--ink-12); }
.mp-tabela tr:last-child td { border-bottom: 0; }

.mp-regras { margin: 0; padding-left: 1.2rem; }
.mp-regras li { font-size: .84rem; margin-bottom: .4rem; color: var(--ink-80); }

.mp-etiqueta {
  margin-top: 1rem; font-size: .82rem; color: var(--ink-60);
  background: var(--paper-2); border-radius: .7rem; padding: .7rem .9rem;
}
.mp-corredor li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem; }
.mp-onde { font-size: .68rem; color: var(--ink-40); }
