/* =====================================================================
   VIVA — direção editorial (revista de culinária)
   Papel creme + tinta preta; verde só em pormenores; filetes finos em vez de sombras.
   Carregado depois de styles.css e sobrepõe-se a ele.
   ===================================================================== */
:root {
  --bg: #F2EDE3;
  --surface: #FAF7F1;
  --surface-2: #E9E2D5;
  --surface-3: #DFD7C7;
  --ink: #151412;
  --ink-2: #5C564D;
  --ink-3: #8F877B;
  --line: #D6CDBC;
  --brand: #151412;
  --brand-2: #2A2825;
  --brand-ink: #F6F1E8;
  --brand-soft: #E7E0D2;
  --accent: #3E6A4E;
  --accent-2: #A9C9A0;
  --warm: #B4532A;
  --warm-soft: #F0E0D4;
  --warn-soft: #F2E6D2;
  --cover-bg: #151412;
  --cover-ink: #F2EDE3;
  --font-display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --radius: 6px;
  --shadow: 0 1px 0 rgba(0, 0, 0, .02);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12110F; --surface: #1A1916; --surface-2: #23211D; --surface-3: #2C2A25;
    --ink: #EFE9DE; --ink-2: #ABA396; --ink-3: #736C61; --line: #2F2C27;
    --brand: #EFE9DE; --brand-2: #FFFFFF; --brand-ink: #12110F; --brand-soft: #24221E;
    --accent: #9CC3A3; --warm: #E08A5F; --warm-soft: #33231A; --warn-soft: #302619;
    --cover-bg: #1D1B18; --cover-ink: #EFE9DE;
  }
}
:root[data-theme="dark"] {
  --bg: #12110F; --surface: #1A1916; --surface-2: #23211D; --surface-3: #2C2A25;
  --ink: #EFE9DE; --ink-2: #ABA396; --ink-3: #736C61; --line: #2F2C27;
  --brand: #EFE9DE; --brand-2: #FFFFFF; --brand-ink: #12110F; --brand-soft: #24221E;
  --accent: #9CC3A3; --warm: #E08A5F; --warm-soft: #33231A; --warn-soft: #302619;
  --cover-bg: #1D1B18; --cover-ink: #EFE9DE;
}

body { background: var(--bg); background-attachment: initial; }
body::before { opacity: .045; }
h1, h2, h3 { font-weight: 400; letter-spacing: -.012em; }
h1 em, h2 em, .ob-title em { font-style: italic; color: var(--accent); font-weight: 400; }
::selection { background: var(--ink); color: var(--bg); }

/* ---------- Botões ---------- */
.btn, .btn:not(.soft):not(.ghost) {
  background: var(--ink); color: var(--bg); background-image: none; box-shadow: none;
  font-weight: 500; letter-spacing: .02em; height: 52px;
}
.btn:hover, .btn:not(.soft):not(.ghost):hover { background: var(--ink); opacity: .86; }
.btn.soft { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn.soft:hover { background: var(--ink); color: var(--bg); opacity: 1; }
.btn.ghost { background: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: transparent; color: var(--ink); text-decoration: underline; text-underline-offset: 4px; opacity: 1; }

/* ---------- Marca ---------- */
.brand { gap: 0; }
.wordmark { font-family: var(--font-display); font-size: 32px; line-height: 1; letter-spacing: -.02em; font-weight: 400; color: var(--ink); }
.wordmark i, .cover-mast i { font-style: normal; color: var(--accent); }
.brand-mark { display: none; }

/* ---------- Capa (entrada) ---------- */
.split-art { background: var(--cover-bg); color: var(--cover-ink); padding: 40px 48px; }
.cover { display: flex; flex-direction: column; height: 100%; color: var(--cover-ink); }
.cover-top { display: flex; justify-content: space-between; gap: 12px; font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; padding-bottom: 12px; border-bottom: 1px solid color-mix(in srgb, var(--cover-ink) 30%, transparent); }
.cover-mast { font-family: var(--font-display); font-size: clamp(140px, 15vw, 230px); line-height: .82; letter-spacing: -.035em; margin-top: 28px; }
.cover-mast i { color: var(--accent-2); }
.cover-quote { font-family: var(--font-display); font-size: 38px; line-height: 1.08; max-width: 13ch; margin-top: auto; padding-top: 32px; }
.cover-quote em { font-style: italic; color: var(--accent-2); }
.cover-index { list-style: none; margin: 28px 0 0; padding: 14px 0 0; border-top: 1px solid color-mix(in srgb, var(--cover-ink) 30%, transparent); display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 16px; font-size: 13px; opacity: .85; }
.cover-index b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 20px; opacity: .6; }
.cover.cover-sm { border-radius: 4px; background: var(--cover-bg); padding: 18px 18px 20px; margin-bottom: 8px; }
.cover.cover-sm .cover-mast { font-size: 104px; margin-top: 16px; }
.cover.cover-sm .cover-quote { font-size: 26px; padding-top: 12px; margin-top: 4px; }
.cover.cover-sm .cover-index { display: none; }
.cover.cover-sm .cover-top span:nth-child(2) { display: none; }
.mobile-only { margin-bottom: 0; }

.login { gap: 24px; }
.login h1 { font-size: 56px; line-height: .98; }
.login h1 em { color: var(--accent); }
.login .lead { font-size: 16px; }
.code-label { display: block; font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 4px; }
.code-input {
  background: transparent; border: 0; border-bottom: 1.5px solid var(--ink); border-radius: 0; padding: 0;
  height: 60px; font-size: 24px; letter-spacing: .14em;
}
.code-input:focus { border-color: var(--accent); box-shadow: none; }
.hint code { background: transparent; border: 1px solid var(--line); }

/* ---------- Questionário ---------- */
.ob-kicker { color: var(--ink-2); letter-spacing: .22em; font-size: 11px; }
.ob-title { font-size: 46px; line-height: 1.02; }
@media (min-width: 960px) { .ob-title { font-size: 56px; } }
.ob-sub { font-size: 16px; }
.progress { height: 2px; background: var(--line); border-radius: 0; }
.progress > i { background: var(--ink); border-radius: 0; }
.input {
  background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  padding: 0 2px; height: 52px; font-size: 18px;
}
.input-unit .input { padding-right: 52px; }
.input-unit span { right: 2px; }
.input:focus { border-bottom-color: var(--ink); box-shadow: none; }
.big-input { font-family: var(--font-display); font-size: 44px; height: 76px; }
.field > label, .label { font-size: 11px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-2); }

.choice { background: transparent; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.choice:hover { border-color: var(--ink-3); }
.choice.on { border-color: var(--ink); background: var(--surface); }
.choice .c-ico { background: transparent; border: 1px solid var(--line); border-radius: 99px; color: var(--ink); }
.choice.on .c-ico { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.choice .c-check { border-color: var(--line); }
.choice.on .c-check { background: var(--ink); border-color: var(--ink); color: var(--bg); }

.seg, .portion-seg { background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg button, .portion-seg button { border-radius: 999px; color: var(--ink-2); font-weight: 500; }
.seg button.on, .portion-seg button.on { background: var(--ink); color: var(--bg); box-shadow: none; }

.chip { background: transparent; border: 1px solid var(--line); height: 38px; font-weight: 500; }
.chip:hover { border-color: var(--ink); }
.chip.on, .chip.love { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip.no { border-style: dashed; }

.note { background: transparent; border-left: 2px solid var(--accent); border-radius: 0; padding: 2px 0 2px 14px; color: var(--ink-2); }
.note b { color: var(--ink); }
.note svg { color: var(--accent); }
.note.warn { background: transparent; border-left-color: var(--warm); }
.note.warn svg { color: var(--warm); }
.pref-legend { background: transparent; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0; padding: 10px 0; }
.pref-group h4 { letter-spacing: .2em; font-size: 11px; }
.hand-guide > div { background: transparent; border-top: 1px solid var(--ink); border-radius: 0; padding: 12px 0 0; }
.hand-guide .hand-ico, .hand-ico { background: transparent; border: 1px solid var(--line); border-radius: 99px; color: var(--ink); }

.pulse { background: transparent; border: 1px solid var(--ink); color: var(--ink); }
.pulse::before, .pulse::after { border-color: var(--ink); }
.analyzing li.done .tick { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* ---------- Estrutura da app ---------- */
.sidebar { background: var(--bg); border-right: 1px solid var(--line); backdrop-filter: none; -webkit-backdrop-filter: none; }
.sidebar .brand { padding: 0 12px 30px; }
.sidebar nav button { border-radius: 0; border-left: 2px solid transparent; padding-left: 14px; }
.sidebar nav button:hover { background: transparent; color: var(--ink); }
.sidebar nav button.on { background: transparent; color: var(--ink); border-left-color: var(--ink); font-weight: 600; }
button.side-user, .side-user { background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 14px 6px 4px; }
button.side-user:hover, button.side-user.open { background: transparent; border-color: var(--ink); }
.avatar { background: var(--ink); color: var(--bg); font-family: var(--font-display); font-weight: 400; font-size: 20px; }
button.avatar:hover, button.avatar[aria-expanded="true"] { box-shadow: 0 0 0 3px var(--line); }

.tabbar {
  left: 0; right: 0; bottom: 0; border-radius: 0; border: 0; border-top: 1px solid var(--line); box-shadow: none;
  background: color-mix(in srgb, var(--bg) 94%, transparent); padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
}
.tabbar button { border-radius: 0; color: var(--ink-3); font-weight: 500; position: relative; }
.tabbar button.on { background: transparent; color: var(--ink); }
.tabbar button.on::before { content: ""; position: absolute; top: -5px; left: 30%; right: 30%; height: 2px; background: var(--ink); }

.mobile-top { padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.page-head { border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.page-head h1 { font-size: 46px; line-height: 1; }
@media (min-width: 960px) { .page-head h1 { font-size: 60px; } }
.page-head .eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }

.card { background: transparent; border: 0; border-top: 1px solid var(--ink); border-radius: 0; padding: 16px 0 6px; box-shadow: none; }
.card h3 { font-size: 28px; line-height: 1.1; }
.sec-h { font-size: 36px; }

/* ---------- Cabeçalho do dia ---------- */
.hero-card, .ck-hero:not(.due) {
  background: none; color: var(--ink); box-shadow: none; border-radius: 0;
  border-top: 3px double var(--ink); border-bottom: 1px solid var(--line); padding: 18px 0 20px;
}
.hero-rings { display: none; }
.hero-eyebrow { opacity: 1; color: var(--ink-2); letter-spacing: .2em; font-size: 11px; }
.hero-card h1 { color: var(--ink); font-size: 48px; line-height: .98; }
@media (min-width: 960px) { .hero-card h1 { font-size: 72px; } .hero-card { padding: 24px 0 28px; } }
.hero-card h1 em { color: var(--accent); }
.hero-card p { color: var(--ink-2); opacity: 1; }
.hero-card p b { color: var(--ink); }
.hero-ring .trk { stroke: var(--line); }
.hero-ring .val { stroke: var(--ink); }
.hero-ring circle { stroke-width: 3; }
.hero-ring > div { color: var(--ink); }
.hero-ring b { font-size: 26px; }
.ck-hero .ck-btn { background: var(--ink); color: var(--bg); }
.ck-hero .ck-btn:hover { background: var(--ink); opacity: .86; }

/* Dias */
.days { gap: 0; border-bottom: 1px solid var(--line); }
.day { background: transparent; border: 0; border-radius: 0; padding: 8px 0 12px; }
.day:hover:not(.on) { border: 0; background: var(--surface-2); }
.day .d-n { font-size: 28px; }
.day.on { background: var(--ink); color: var(--bg); border-radius: 2px; }
.d-dot.train { background: var(--warm); }

/* Resumo do dia */
.day-sum { gap: 0; }
.day-sum > div { background: transparent; border: 0; border-left: 1px solid var(--line); border-radius: 0; padding: 4px 10px; }
.day-sum > div:first-child { border-left: 0; padding-left: 0; }
.day-sum .v { font-size: 26px; }
.bar { height: 2px; border-radius: 0; background: var(--line); }
.bar i { background: var(--ink); border-radius: 0; }

/* Lista de refeições: numerada como uma revista */
.timeline { counter-reset: refeicao; }
.timeline::before { background: var(--line); width: 1px; }
.meal::before { background: var(--bg); border: 1.5px solid var(--ink-3); }
.meal.is-done::before { background: var(--ink); border-color: var(--ink); }
.meal.is-next::before { background: var(--warm); border-color: var(--warm); box-shadow: 0 0 0 4px color-mix(in srgb, var(--warm) 18%, transparent); }
.meal-time b { font-size: 22px; font-weight: 400; }
.meal-card {
  background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 14px 0 16px;
  box-shadow: none !important; transform: none !important;
}
.meal-card:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.meal.is-next .meal-card { border-color: var(--line); box-shadow: none; }
.meal-info .tag { color: var(--ink-3); letter-spacing: .18em; font-size: 10.5px; }
.meal-info .tag::before { counter-increment: refeicao; content: counter(refeicao, decimal-leading-zero) " — "; color: var(--ink); }
.meal-info h3 { font-family: var(--font-display); font-weight: 400; font-size: 25px; line-height: 1.05; letter-spacing: -.005em; margin: 4px 0 8px; }
@media (max-width: 599px) { .meal-info h3 { font-size: 22px; } }
.meal.is-done .meal-info h3 { color: var(--ink-3); text-decoration: line-through; text-decoration-thickness: 1px; }
.next-pill { background: var(--warm); border-radius: 2px; }
.done-btn { background: transparent; border: 1px solid var(--line); top: 14px; right: 0; }
.meal.is-done .done-btn { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.fast-line { border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 12px 0; font-style: italic; }
.ck-banner { background: transparent; border: 1px solid var(--ink); border-radius: var(--radius); }
.ck-banner .c-ico { background: var(--ink); color: var(--bg); border-radius: 99px; }

/* Pratos: natureza-morta sobre o papel */
.thumb, .thumb.photo { background: transparent !important; border-radius: 99px; }
.thumb .plate { width: 100%; padding: 8%; box-shadow: 0 1px 0 rgba(0,0,0,.06), 0 6px 14px rgba(0,0,0,.08); }
.thumb.big { border-radius: 0; background: var(--surface-2) !important; }
.thumb.big .plate { width: auto; height: 78%; }
.thumb.photo img { border-radius: 99px; }
.thumb.big.photo img { border-radius: 0; }

.badge { border-radius: 2px; background: transparent; border: 1px solid currentColor; text-transform: uppercase; letter-spacing: .06em; font-size: 10px; }
.badge.batch { color: var(--accent); background: transparent; }
.badge.train { color: var(--warm); background: transparent; }

/* Números e anéis */
.ring > div { background: var(--bg); }
.ring b { font-weight: 400; font-size: 26px; }
.stats { gap: 18px 24px; }
.stat { background: transparent; border: 0; border-top: 1px solid var(--ink); border-radius: 0; padding: 12px 0 0; }
.stat .v { font-size: 50px; line-height: .95; }
.stat.hero { background: var(--ink); color: var(--bg); border-radius: 2px; padding: 18px; }
.stat.hero .k, .stat.hero .v small { color: var(--bg); opacity: .7; }
.scale { height: 4px; border-radius: 0; }
.scale i { border-color: var(--ink); background: var(--bg); }
.kv > div { padding: 11px 0; }
.sched b { font-size: 22px; font-weight: 400; }

/* ---------- Receita ---------- */
.overlay { background: rgba(18, 17, 15, .5); }
.sheet { background: var(--bg); border-radius: 10px 10px 0 0; }
@media (min-width: 760px) { .sheet { border-radius: 4px; } }
.sheet-close { background: var(--bg); color: var(--ink); border: 1px solid var(--line); }
.sheet-body h2 { font-size: 44px; line-height: 1; margin: 6px 0 12px; }
.macros-row { gap: 0; }
.macros-row > div { background: transparent; border: 0; border-top: 1px solid var(--ink); border-left: 1px solid var(--line); border-radius: 0; text-align: left; padding: 10px 10px 0; }
.macros-row > div:first-child { border-left: 0; padding-left: 0; }
.macros-row b { font-size: 28px; font-weight: 400; }
.sec-t { border-bottom: 1px solid var(--ink); padding-bottom: 8px; }
.sec-t h4 { color: var(--ink); letter-spacing: .22em; font-size: 11px; }
.ing { background: transparent; border: 0; border-radius: 0; }
.ing li { padding: 12px 0; }
.ing .q { font-weight: 500; }
.steps li::before { background: transparent; border: 1px solid var(--ink); color: var(--ink); font-family: var(--font-display); font-weight: 400; font-size: 18px; }
.why { background: transparent; border-radius: 0; padding: 4px 0 4px 18px; border-left: 2px solid var(--accent); font-family: var(--font-display); font-size: 21px; line-height: 1.3; }
.why svg { display: none; }
.alt-list .meal-card { border-bottom: 1px solid var(--line); }
.preg-box { border-radius: 2px; }

/* ---------- Compras, perfil, progresso ---------- */
.shop-item { padding: 11px 0; }
.box { border-radius: 2px; }
.shop-item.done .box { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.install-card .c-ico, .ck-msg .c-ico { background: transparent; border: 1px solid var(--line); border-radius: 99px; color: var(--ink); }
.ck-kcal { background: transparent; border: 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); border-radius: 0; }
.ck-kcal b { font-weight: 400; font-size: 40px; }
.ck-kcal div:last-of-type b { color: var(--accent); }
.ck-msg { background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 14px 0; }
.scale5 button { border-radius: 2px; background: transparent; }
.scale5 button.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.scale5 button b { font-weight: 400; font-size: 22px; }
.wchart .ln { stroke: var(--ink); stroke-width: 2; }
.wchart .pt { stroke: var(--ink); }
.wchart .pt.last { fill: var(--ink); }
.chart-empty { border-radius: 0; }
.preg-card { background: transparent; border-top-color: var(--warm); }

/* Chat */
.chat.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 0; }
.chef-av { background: var(--ink); color: var(--bg); border-radius: 99px; }
.msg.me > div { background: var(--ink); color: var(--bg); }
.msg.ai > div { background: var(--surface); border: 1px solid var(--line); }
.chat-in textarea { border-radius: var(--radius); }
.ai-card { background: transparent; border-radius: 0; border: 0; border-top: 1px solid var(--line); padding: 14px 0; }

/* Menu da conta, toast */
.user-menu { border-radius: var(--radius); background: var(--bg); border-color: var(--ink); box-shadow: 0 18px 40px rgba(0, 0, 0, .14); }
.um-item { border-radius: 2px; }
.toast { background: var(--ink); color: var(--bg); }
body.offline .mobile-top::after, body.offline .sidebar .brand::after { background: transparent; border: 1px solid var(--warn); border-radius: 2px; }

/* ---------- Painel admin ---------- */
.login-card.card { border: 1px solid var(--line); border-top: 3px double var(--ink); padding: 24px; border-radius: 0; }
.new-code { background: transparent; border: 1px solid var(--ink); border-radius: 2px; }
.pill.on { background: transparent; border: 1px solid var(--accent); color: var(--accent); }
.code-input::placeholder { color: var(--ink-3); opacity: .55; font-weight: 400; }
.meal.is-done .meal-card { background: transparent; }

/* ---------- Logótipo com rebento ---------- */
.wordmark { display: inline-block; white-space: nowrap; }
.wm-i { position: relative; display: inline-block; }
.sprout {
  position: absolute; left: 50%; bottom: .66em; width: .46em; height: .46em; transform: translateX(-46%);
  color: var(--accent); fill: currentColor; overflow: visible;
}
.cover .sprout, .cover-mast .sprout { color: var(--accent-2); }

/* ---------- Capa com fotografia ---------- */
.split-art {
  position: sticky; background: #151412 url("img/capa.jpg") center bottom / cover no-repeat; overflow: hidden;
}
.split-art::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(14,13,12,.55) 0%, rgba(14,13,12,.1) 38%, rgba(14,13,12,0) 60%, rgba(14,13,12,.82) 100%);
}
.split-art .cover { position: relative; z-index: 1; }
.cover-mast { margin-top: 22px; }
.cover-quote { margin-top: 18px; padding-top: 0; font-size: 34px; max-width: 15ch; text-shadow: 0 1px 18px rgba(0,0,0,.35); }
.cover-index { margin-top: auto; border-top-color: color-mix(in srgb, var(--cover-ink) 40%, transparent); opacity: 1; text-shadow: 0 1px 10px rgba(0,0,0,.5); }
.cover-index b { opacity: .75; }
@media (min-width: 960px) { .split-art { padding: 36px 44px 32px; } }

.cover.cover-sm {
  background: #151412 url("img/capa-m.jpg") center 78% / cover no-repeat; min-height: 360px; position: relative; overflow: hidden;
  display: flex; flex-direction: column;
}
.cover.cover-sm::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(14,13,12,.7) 0%, rgba(14,13,12,.25) 45%, rgba(14,13,12,0) 70%);
}
.cover.cover-sm > * { position: relative; z-index: 1; }
.cover-mast .wordmark { font-size: inherit; color: var(--cover-ink); letter-spacing: inherit; line-height: inherit; }
.cover-mast .wordmark i { color: var(--accent-2); }
.split-art .cover-mast { margin-top: 48px; }
.cover.cover-sm .cover-mast { margin-top: 30px; }
.cover.cover-sm { min-height: 330px; background-position: center 88%; }
.cover.cover-sm .cover-quote { display: none; }
.cover.cover-sm::after { background: linear-gradient(180deg, rgba(14,13,12,.78) 0%, rgba(14,13,12,.35) 40%, rgba(14,13,12,0) 62%); }
.cover.cover-sm { min-height: 380px; background-position: center 18%; background-size: 118% auto; }
