/* Primeiros Sabores · Mãe em Construção — estilos compartilhados (app e bônus) */
:root {
  --bg: #fbf6f2;
  --surface: #ffffff;
  --surface-2: #f6eee9;
  --ink: #3a2e2b;
  --muted: #76665f;
  --line: #eadcd4;
  --brand: #a5545f;
  --brand-strong: #8c4550;
  --brand-ink: #ffffff;
  --brand-soft: #f7e6e5;
  --sage: #5f7d5b;
  --sage-soft: #e6efe2;
  --amber: #9a6514;
  --amber-soft: #fbefd8;
  --danger: #b3261e;
  --danger-soft: #fde9e7;
  --sky: #3f6f8f;
  --sky-soft: #e4eff6;
  --shadow: 0 1px 2px rgba(58, 46, 43, .06), 0 6px 20px rgba(58, 46, 43, .06);
  --radius: 18px;
  --radius-sm: 12px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Lora", Georgia, "Times New Roman", serif;
  --fs: 17px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1d1817; --surface: #282120; --surface-2: #322928; --ink: #f3e9e5; --muted: #c2b2ab; --line: #433835;
    --brand: #e0909a; --brand-strong: #eda7af; --brand-ink: #2a1a1c; --brand-soft: #4a2f33;
    --sage: #a6c69f; --sage-soft: #2d3a2b; --amber: #f0c27a; --amber-soft: #3f3220;
    --danger: #ff8a80; --danger-soft: #4a2422; --sky: #9cc7e3; --sky-soft: #213444;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1d1817; --surface: #282120; --surface-2: #322928; --ink: #f3e9e5; --muted: #c2b2ab; --line: #433835;
  --brand: #e0909a; --brand-strong: #eda7af; --brand-ink: #2a1a1c; --brand-soft: #4a2f33;
  --sage: #a6c69f; --sage-soft: #2d3a2b; --amber: #f0c27a; --amber-soft: #3f3220;
  --danger: #ff8a80; --danger-soft: #4a2422; --sky: #9cc7e3; --sky-soft: #213444;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25); color-scheme: dark;
}
:root[data-size="lg"] { --fs: 19px }
:root[data-size="xl"] { --fs: 21px }

* { box-sizing: border-box }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--fs)/1.6 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden }
img { max-width: 100%; display: block }
a { color: var(--brand-strong) }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em }
h1 { font-size: 1.75em } h2 { font-size: 1.4em } h3 { font-size: 1.15em } h4 { font-size: 1em }
p { margin: 0 0 1em }
button, input, select, textarea { font: inherit; color: inherit }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap }

/* ---------- estrutura ---------- */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line) }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; flex: 1 }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-size: 20px; flex: none }
.logo b { display: block; font-family: var(--serif); font-size: 1.02em; line-height: 1.1 }
.logo small { display: block; color: var(--muted); font-size: .72em; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.sos { display: inline-flex; align-items: center; gap: 6px; background: var(--danger); color: #fff; border: 0; border-radius: 999px; padding: 9px 14px; font-weight: 700; font-size: .85em; text-decoration: none; white-space: nowrap; box-shadow: 0 2px 8px rgba(179, 38, 30, .3) }
.sos:hover { filter: brightness(1.05) }
.iconbtn { width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; font-size: 18px; flex: none }

main { max-width: 820px; margin: 0 auto; padding: 18px 16px 120px }
@media (prefers-reduced-motion: no-preference) { .view { animation: rise .25s ease } }
@keyframes rise { from { transform: translateY(6px) } to { transform: none } }
@keyframes fade { from { opacity: 0; transform: translateY(4px) } to { opacity: 1; transform: none } }

.tabbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; display: flex; justify-content: space-around; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 20px rgba(0, 0, 0, .05) }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 12px; text-decoration: none; color: var(--muted); font-size: .7em; font-weight: 600; min-width: 0 }
.tabbar a .ti { font-size: 1.55em; line-height: 1.1 }
.tabbar a[aria-current="page"] { color: var(--brand-strong); background: var(--brand-soft) }

@media (min-width: 960px) {
  body { display: grid; grid-template-columns: 240px 1fr }
  .topbar { grid-column: 1 / -1 }
  .tabbar { position: sticky; top: 64px; bottom: auto; flex-direction: column; justify-content: flex-start; height: calc(100vh - 64px); border-top: 0; border-right: 1px solid var(--line); padding: 16px 12px; gap: 4px; box-shadow: none; background: transparent }
  .tabbar a { flex: none; flex-direction: row; gap: 12px; font-size: .95em; padding: 12px 14px; justify-content: flex-start }
  .tabbar a .ti { font-size: 1.3em }
  main { padding-bottom: 60px; width: 100% }
}

/* ---------- componentes ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 16px }
.card.soft { background: var(--surface-2); box-shadow: none }
.card.brand { background: var(--brand-soft); border-color: transparent }
.card.sage { background: var(--sage-soft); border-color: transparent }
.card.amber { background: var(--amber-soft); border-color: transparent }
.card.danger { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 30%, transparent) }
.card.sky { background: var(--sky-soft); border-color: transparent }
.card > :last-child { margin-bottom: 0 }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .7em; font-weight: 700; color: var(--brand-strong); margin: 0 0 6px }
.muted { color: var(--muted) }
.small { font-size: .85em }
.tiny { font-size: .75em }
.center { text-align: center }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap }
.spacer { flex: 1 }
.stack > * + * { margin-top: 12px }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px }
@media (max-width: 560px) { .grid3 { grid-template-columns: 1fr } }
@media (max-width: 380px) { .grid2 { grid-template-columns: 1fr } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; text-decoration: none; cursor: pointer; text-align: center; line-height: 1.2 }
.btn:hover { border-color: var(--brand) }
.btn.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand) }
.btn.primary:hover { background: var(--brand-strong) }
.btn.danger { background: var(--danger); color: #fff; border-color: var(--danger) }
.btn.ghost { background: transparent; border-color: transparent; color: var(--brand-strong) }
.btn.block { width: 100% }
.btn.sm { min-height: 38px; padding: 6px 12px; font-size: .88em; border-radius: 11px }
.btn[aria-pressed="true"] { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-strong) }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: none; margin: 0 -2px }
.chips::-webkit-scrollbar { display: none }
.chip { flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 8px 14px; font-size: .88em; font-weight: 600; cursor: pointer; color: var(--ink); white-space: nowrap; min-height: 40px }
.chip[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); border-color: var(--brand) }
.tag { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 3px 10px; font-size: .74em; font-weight: 700; background: var(--surface-2); color: var(--muted) }
.tag.brand { background: var(--brand-soft); color: var(--brand-strong) }
.tag.sage { background: var(--sage-soft); color: var(--sage) }
.tag.amber { background: var(--amber-soft); color: var(--amber) }
.tag.danger { background: var(--danger-soft); color: var(--danger) }
.tag.sky { background: var(--sky-soft); color: var(--sky) }

.search { position: relative; margin-bottom: 14px }
.search input { width: 100%; min-height: 52px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); padding: 12px 16px 12px 46px }
.search::before { content: "🔎"; position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-size: 1em; opacity: .7 }

/* listas clicáveis */
.list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px }
.list li + li { border-top: 1px solid var(--line) }
.list a, .list button.li { display: flex; align-items: center; gap: 12px; padding: 14px 16px; text-decoration: none; color: var(--ink); min-height: 58px; width: 100%; background: none; border: 0; text-align: left; cursor: pointer }
.list a:hover, .list button.li:hover { background: var(--surface-2) }
.list .lt { flex: 1; min-width: 0 }
.list .lt b { display: block; font-weight: 600; line-height: 1.3 }
.list .lt small { display: block; color: var(--muted); font-size: .8em; line-height: 1.35; margin-top: 2px }
.list .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); flex: none; font-size: 1.15em }
.list .chev { color: var(--muted); flex: none }
.done-dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); flex: none; display: grid; place-items: center; font-size: 13px; color: #fff }
.done-dot.on { background: var(--sage); border-color: var(--sage) }

.section-title { display: flex; align-items: baseline; gap: 10px; margin: 26px 0 12px }
.section-title h2 { margin: 0; font-size: 1.25em }
.section-title a { margin-left: auto; font-size: .85em; font-weight: 600; text-decoration: none; white-space: nowrap }

/* início */
.hero { position: relative; border-radius: 24px; overflow: hidden; margin-bottom: 18px; background: var(--brand-soft) }
.hero img { width: 100%; height: 210px; object-fit: cover; object-position: center 30% }
.hero .hero-txt { padding: 18px 18px 20px }
.hero h1 { font-size: 1.55em; margin-bottom: 6px }
.hero p { margin: 0; color: var(--muted) }
@media (min-width: 700px) { .hero { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center } .hero img { height: 100%; min-height: 260px } .hero .hero-txt { padding: 26px } }
.need-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 10px }
@media (min-width: 700px) { .need-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) } }
.need { display: flex; flex-direction: column; gap: 6px; padding: 16px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); min-height: 118px; transition: transform .15s }
.need:hover { transform: translateY(-2px); border-color: var(--brand) }
.need .em { font-size: 1.7em; line-height: 1 }
.need b { font-family: var(--serif); font-size: 1.02em; line-height: 1.25 }
.need small { color: var(--muted); font-size: .78em; line-height: 1.35 }
.need.alert { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 35%, transparent) }

.progress { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden }
.progress > i { display: block; height: 100%; background: var(--sage); border-radius: 999px; transition: width .4s }

/* receitas */
.rgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px }
@media (min-width: 700px) { .rgrid { grid-template-columns: repeat(3, minmax(0, 1fr)) } }
@media (max-width: 360px) { .rgrid { grid-template-columns: 1fr } }
.rcard { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: var(--shadow) }
.rcard img { width: 100%; aspect-ratio: 16/10; object-fit: cover; background: var(--surface-2) }
.rcard .rc { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1 }
.rcard b { font-family: var(--serif); font-weight: 600; font-size: .98em; line-height: 1.25 }
.rcard .row { gap: 6px }
.recipe-hero { border-radius: 22px; overflow: hidden; margin-bottom: 16px; background: var(--surface-2) }
.recipe-hero img { width: 100%; max-height: 340px; object-fit: cover }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0 16px }
.fact { background: var(--surface-2); border-radius: 14px; padding: 10px; text-align: center }
.fact b { display: block; font-size: .95em }
.fact small { color: var(--muted); font-size: .72em; text-transform: uppercase; letter-spacing: .06em; font-weight: 700 }
.ingr { list-style: none; padding: 0; margin: 0 0 1em }
.ingr li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); cursor: pointer }
.ingr li input { width: 22px; height: 22px; accent-color: var(--sage); flex: none; margin-top: 2px }
.ingr li.got span { text-decoration: line-through; color: var(--muted) }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0 0 1em }
.steps li { counter-increment: s; position: relative; padding: 4px 0 14px 46px }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 2px; width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-weight: 700; font-size: .9em }

/* leitura */
.reader { font-size: 1.02em }
.reader h3 { margin-top: 1.4em; color: var(--brand-strong) }
.reader ul, .reader ol { padding-left: 1.3em; margin: 0 0 1em }
.reader li { margin-bottom: .45em }
.reader .lead { font-family: var(--serif); font-size: 1.12em; line-height: 1.5; background: var(--brand-soft); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 1.2em }
.reader .sign { font-family: var(--serif); font-style: italic; font-size: 1.1em; color: var(--brand-strong) }
.reader p b.k { font-weight: 700 }
.chapter-head { margin-bottom: 14px }
.chapter-head .tag { margin-bottom: 8px }
.chapter-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 24px }
.chapter-nav a { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); background: var(--surface); min-height: 64px }
.chapter-nav a small { color: var(--muted); font-size: .74em; text-transform: uppercase; letter-spacing: .08em; font-weight: 700 }
.chapter-nav a span { font-size: .9em; font-weight: 600; line-height: 1.3 }
.chapter-nav a.next { text-align: right }
.summary-box { background: var(--sage-soft); border-radius: var(--radius); padding: 16px 18px; margin: 1.4em 0 }
.summary-box h4 { margin: 0 0 8px; color: var(--sage); font-family: var(--font); text-transform: uppercase; letter-spacing: .1em; font-size: .78em }
.summary-box ul { margin: 0; padding-left: 1.2em }
.topic-img { border-radius: var(--radius); overflow: hidden; margin: 0 0 16px; background: var(--surface-2) }
.topic-img img { width: 100%; max-height: 300px; object-fit: cover }

/* checklists */
.checks { list-style: none; padding: 0; margin: 0 0 1em }
.checks li { margin-bottom: 8px }
.checks label { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; cursor: pointer; line-height: 1.45 }
.checks input { width: 24px; height: 24px; accent-color: var(--sage); flex: none; margin: 0 }
.checks input:checked + span { color: var(--muted) }
.checks label:has(input:checked) { background: var(--sage-soft); border-color: transparent }

/* tabelas responsivas */
.tbl-wrap { overflow-x: auto; margin: 0 0 1.2em; border-radius: var(--radius-sm); border: 1px solid var(--line) }
table.rt { width: 100%; border-collapse: collapse; font-size: .9em; background: var(--surface) }
table.rt th, table.rt td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line) }
table.rt th { background: var(--surface-2); font-size: .82em; text-transform: uppercase; letter-spacing: .05em; color: var(--muted) }
table.rt tr:last-child td { border-bottom: 0 }
table.rt td:first-child { font-weight: 600 }
@media (max-width: 620px) {
  .tbl-wrap { border: 0; overflow: visible }
  table.rt, table.rt tbody, table.rt tr, table.rt td { display: block; width: 100% }
  table.rt thead { display: none }
  table.rt { background: transparent }
  table.rt tr { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; padding: 6px 0 }
  table.rt td { border: 0; padding: 6px 14px }
  table.rt td::before { content: attr(data-label); display: block; font-size: .72em; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700 }
  table.rt td:first-child { font-family: var(--serif); font-size: 1.05em }
  table.rt td:first-child::before { display: none }
}

/* segurança */
.emergency { background: var(--danger); color: #fff; border-radius: 22px; padding: 20px; margin-bottom: 18px }
.emergency h2 { color: #fff; margin-bottom: 6px }
.emergency p { margin-bottom: 14px; opacity: .95 }
.emergency .btn { background: #fff; color: #b3261e; border-color: #fff; font-size: 1.05em; min-height: 56px }
.emergency .btn.sec { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .6) }
.sit { border-radius: var(--radius); padding: 16px; border: 2px solid transparent; margin-bottom: 12px }
.sit h3 { font-family: var(--font); font-size: .78em; text-transform: uppercase; letter-spacing: .1em; margin: 0 0 6px }
.sit .see { font-size: 1.02em; margin-bottom: 8px }
.sit .todo { font-weight: 700 }
.sit.ok { background: var(--sage-soft) } .sit.ok h3 { color: var(--sage) }
.sit.warn { background: var(--amber-soft) } .sit.warn h3 { color: var(--amber) }
.sit.bad { background: var(--danger-soft); border-color: var(--danger) } .sit.bad h3 { color: var(--danger) }
.sit.info { background: var(--sky-soft) } .sit.info h3 { color: var(--sky) }
.cmp { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 1.2em }
@media (max-width: 620px) { .cmp { grid-template-columns: 1fr } }
.cmp .col { border-radius: var(--radius); padding: 14px }
.cmp .col h4 { font-family: var(--font); margin-bottom: 8px }
.cmp dl { margin: 0 } .cmp dt { font-size: .72em; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; opacity: .75; margin-top: 8px } .cmp dd { margin: 0; font-weight: 500 }
.cutcard { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; margin-bottom: 10px }
.cutcard summary { cursor: pointer; list-style: none; display: block }
.cutcard summary > .row + .now, .cutcard .now { margin-top: 4px }
.cutcard[open] .tag { background: var(--brand-soft); color: var(--brand-strong) }
.cutcard summary::-webkit-details-marker { display: none }
.cutcard summary b { font-family: var(--serif); font-size: 1.05em }
.cutcard .now { margin-top: 4px }
.cutcard .ages { display: grid; gap: 8px; margin-top: 12px }
.cutcard .ages div { background: var(--surface-2); border-radius: 12px; padding: 8px 12px; font-size: .92em }
.cutcard .ages div.cur { background: var(--brand-soft) }
.cutcard .ages small { display: block; font-weight: 700; font-size: .72em; text-transform: uppercase; letter-spacing: .07em; color: var(--muted) }
.swap { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; font-size: .95em }
.swap .from { color: var(--danger); text-decoration: line-through; text-decoration-thickness: 1px }
.swap .to { color: var(--sage); font-weight: 600 }
.myth { border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); padding: 14px 16px; margin-bottom: 10px }
.myth summary { cursor: pointer; list-style: none; display: flex; gap: 10px; align-items: flex-start; font-family: var(--serif); font-size: 1.04em }
.myth summary::-webkit-details-marker { display: none }
.myth p { margin: 10px 0 0 }
.phase { border-left: 4px solid var(--brand); background: var(--surface); border-radius: 0 14px 14px 0; padding: 12px 14px; margin-bottom: 10px }
.phase dl { margin: 6px 0 0 } .phase dt { font-size: .72em; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; color: var(--muted); margin-top: 6px } .phase dd { margin: 0 }

/* formulários */
.field { margin-bottom: 14px }
.field > label, .field > .lbl { display: block; font-weight: 600; font-size: .9em; margin-bottom: 6px }
.field input[type=text], .field input[type=date], .field input[type=time], .field input[type=password], .field input:not([type]), .field select, .field textarea { width: 100%; min-height: 50px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); padding: 10px 14px }
.field textarea { min-height: 96px; resize: vertical }
.seg { display: flex; flex-wrap: wrap; gap: 8px }
.seg label { position: relative }
.seg input { position: absolute; opacity: 0; pointer-events: none }
.seg span { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: .9em; font-weight: 600; cursor: pointer; min-height: 42px }
.seg input:checked + span { background: var(--brand); border-color: var(--brand); color: var(--brand-ink) }
.seg input:focus-visible + span { outline: 3px solid var(--brand); outline-offset: 2px }
.how-ok input:checked + span { background: var(--sage); border-color: var(--sage) }
.how-meh input:checked + span { background: var(--amber); border-color: var(--amber); color: #fff }
.how-no input:checked + span { background: var(--danger); border-color: var(--danger); color: #fff }

.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 8px; scrollbar-width: none }
.tabs::-webkit-scrollbar { display: none }
.tabs a { flex: none; padding: 9px 14px; border-radius: 12px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .88em; background: var(--surface); border: 1px solid var(--line); white-space: nowrap }
.tabs a[aria-current="page"] { background: var(--ink); color: var(--bg); border-color: var(--ink) }

.entry { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 8px }
.entry .row { gap: 6px }
.food-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 10px 14px; border-top: 1px solid var(--line); align-items: center }
.food-row:first-child { border-top: 0 }
.food-row small { grid-column: 1 / -1; color: var(--muted); font-size: .78em }

.week { width: 100%; border-collapse: separate; border-spacing: 0 6px }
.week th { text-align: left; font-size: .78em; color: var(--muted); font-weight: 700; padding: 0 6px }
.week td { padding: 0 4px }
.week input { width: 100%; min-height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); padding: 6px 10px; font-size: .9em }
.weekday { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; margin-bottom: 10px }
.weekday h4 { font-family: var(--font); margin-bottom: 8px }
.weekday .meal { display: grid; grid-template-columns: 92px 1fr; gap: 8px; align-items: center; margin-bottom: 6px }
.weekday .meal span { font-size: .8em; color: var(--muted); font-weight: 600 }
.weekday .meal input { width: 100%; min-height: 42px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); padding: 6px 10px; font-size: .92em }

.photo-drop { border: 2px dashed var(--line); border-radius: var(--radius); padding: 18px; text-align: center; cursor: pointer; background: var(--surface) }
.photo-drop img { max-height: 280px; margin: 0 auto; border-radius: 12px }

/* autora */
.author { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: center; margin-bottom: 16px }
.author img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; object-position: center 20%; border: 4px solid var(--surface); box-shadow: var(--shadow) }
@media (max-width: 420px) { .author { grid-template-columns: 1fr; text-align: center } .author img { margin: 0 auto } }
.quote { font-family: var(--serif); font-size: 1.2em; line-height: 1.45; border-left: 4px solid var(--brand); padding: 6px 0 6px 16px; margin: 18px 0 }
.social { display: grid; gap: 10px }
.social a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--ink); font-weight: 600 }
.social a span.ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); font-size: 1.1em }
.refs { padding-left: 1.2em; font-size: .85em; color: var(--muted) }
.refs li { margin-bottom: 10px; word-break: break-word }

/* bônus bloqueado */
.gift { display: flex; gap: 14px; align-items: flex-start }
.gift .gi { font-size: 2em; line-height: 1 }

/* modal */
.modal-bg { position: fixed; inset: 0; z-index: 100; background: rgba(30, 20, 18, .45); display: grid; place-items: center; padding: 16px; animation: fade .2s }
.modal { background: var(--surface); border-radius: 24px; padding: 22px; width: 100%; max-width: 480px; max-height: 90vh; overflow: auto; box-shadow: 0 20px 60px rgba(0, 0, 0, .3) }
.toast { position: fixed; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 14px; z-index: 120; font-weight: 600; font-size: .9em; box-shadow: 0 6px 24px rgba(0, 0, 0, .25); max-width: calc(100% - 32px); text-align: center; animation: fade .2s }
@media (min-width: 960px) { .toast { bottom: 30px } }

.back { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .9em; margin-bottom: 12px; min-height: 40px }
.empty { text-align: center; color: var(--muted); padding: 24px 12px }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0 }
details.more summary { cursor: pointer; font-weight: 600; color: var(--brand-strong); padding: 8px 0 }

/* versão incorporada (link de teste): sem impressão e sem instalação */
.embedded [data-act="print"], .embedded [data-act="printconsult"], .embedded [data-act="install"] { display: none !important }
.embedded .grid2:has(> [data-act="print"]:only-of-type) { grid-template-columns: 1fr }

/* impressão */
.print-only { display: none }
@media print {
  body { display: block; background: #fff; color: #000; font-size: 12pt }
  .topbar, .tabbar, .no-print, .btn, .toast, .back { display: none !important }
  main { padding: 0; max-width: none }
  body.printing main > .view > *:not(.printable) { display: none !important }
  .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid }
  .print-only { display: block }
  .checks label { border: 0; padding: 4px 0; background: none !important }
  a { color: #000; text-decoration: none }
}

/* login e assinatura */
.no-chrome .topbar, .no-chrome .tabbar { display: none }
@media (min-width: 960px) { body.no-chrome { display: block } }
.auth-wrap { max-width: 460px; margin: 0 auto; padding-top: 24px }
.auth-logo { display: flex; align-items: center; gap: 12px; margin: 8px 0 20px }
.auth-logo .brand-mark { width: 52px; height: 52px; font-size: 26px; border-radius: 16px }
.auth-logo b { display: block; font-family: var(--serif); font-size: 1.3em; line-height: 1.1 }
.auth-logo small { color: var(--muted) }
.need.locked { opacity: .75; background: var(--surface-2); box-shadow: none }
