/* App Caneta com Estratégia · visual */
:root {
  --ink: #1f2a29; --muted: #5d6c67; --faint: #8a9893;
  --deep: #214f46; --green: #2f6f62; --mint: #e7f1ed; --mint2: #d5e8e0;
  --coral: #d9694b; --coral2: #f0896d; --peach: #f4b8a4; --sand: #fdeee7;
  --cream: #fbf7f1; --card: #ffffff; --line: #e6ebe8;
  --warn: #b3261e; --warnbg: #fdecea;
  --r: 22px; --r-sm: 14px;
  --shadow: 0 1px 2px rgba(33,79,70,.06), 0 8px 24px -12px rgba(33,79,70,.18);
  --shadow-lg: 0 24px 60px -20px rgba(20,50,44,.45);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Nunito Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --nav-h: 74px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: #e9efec; color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
body { min-height: 100dvh; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; }
a.gitem, a.chip, a.btn, a.setrow, a.back, a.avatar, a.rcard, .card-head a.link { text-decoration: none; color: inherit; }
a.btn { color: #fff; }
a.btn.ghost { color: var(--deep); }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; letter-spacing: -.01em; margin: 0; line-height: 1.12; }
em { font-style: normal; }
svg { display: block; }

.app { max-width: 480px; margin: 0 auto; min-height: 100dvh; background: var(--cream); position: relative; box-shadow: 0 0 60px rgba(0,0,0,.08); overflow-x: clip; }
.screen { padding: 0 18px calc(var(--nav-h) + var(--safe-b) + 28px); }
.screen.anim { animation: fade .22s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* inicialização */
.boot { min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--muted); font-weight: 700; }
.boot-logo, .logo { width: 56px; height: 56px; border-radius: 50%; background: conic-gradient(from 0deg, var(--coral) 0 120deg, var(--green) 120deg 240deg, var(--peach) 240deg 360deg); box-shadow: inset 0 0 0 4px var(--cream); }
.boot-logo { animation: spin 1.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* topo */
.hero { margin: 0 -18px 18px; padding: calc(var(--safe-t) + 18px) 22px 26px; background: var(--deep); color: #fff; border-radius: 0 0 30px 30px; position: relative; overflow: hidden; }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.hero::before { width: 220px; height: 220px; right: -70px; top: -90px; background: var(--green); opacity: .9; }
.hero::after { width: 120px; height: 120px; right: 40px; top: -40px; background: var(--coral); opacity: .55; }
.hero > * { position: relative; z-index: 1; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 15px; }
.brand .logo { width: 30px; height: 30px; box-shadow: inset 0 0 0 2.5px #fff; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.14); display: grid; place-items: center; font-weight: 900; border: 1.5px solid rgba(255,255,255,.3); }
.avatar svg { width: 20px; height: 20px; }
.hero h1 { font-size: 30px; }
.hero h1 em { color: var(--peach); }
.hero p { margin: 8px 0 0; color: #cfe3dc; font-weight: 600; font-size: 15px; line-height: 1.45; }
.hero-row { display: flex; align-items: center; gap: 18px; }
.hero-row .grow { flex: 1; min-width: 0; }
.ring { width: 92px; height: 92px; flex: none; position: relative; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .lbl { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring b { font-family: var(--serif); font-size: 28px; line-height: 1; }
.ring small { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #cfe3dc; }
.pagehead { padding: calc(var(--safe-t) + 22px) 0 14px; }
.pagehead h1 { font-size: 32px; color: var(--deep); }
.pagehead h1 em { color: var(--coral); }
.pagehead p { margin: 6px 0 0; color: var(--muted); font-weight: 600; line-height: 1.45; }
.back { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: var(--green); margin: calc(var(--safe-t) + 16px) 0 4px; font-size: 15px; }
.back svg { width: 18px; height: 18px; transform: rotate(180deg); }

/* cartões */
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px; margin-bottom: 14px; position: relative; }
.card h2 { font-size: 21px; color: var(--deep); }
.card h3 { font-size: 18px; color: var(--deep); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-head .link { font-size: 14px; font-weight: 800; color: var(--coral); }
.kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: var(--coral); }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.note { font-size: 13px; color: var(--muted); line-height: 1.5; margin: 10px 0 0; }
.banner { display: flex; gap: 12px; align-items: flex-start; border-radius: var(--r-sm); padding: 13px 14px; background: var(--sand); color: #7a3a26; font-weight: 700; font-size: 14px; line-height: 1.45; margin-bottom: 14px; }
.banner svg { width: 22px; height: 22px; flex: none; margin-top: 1px; }
.banner.mint { background: var(--mint); color: var(--deep); }
.banner.warn { background: var(--warnbg); color: var(--warn); }
.banner a { font-weight: 900; }

/* refeições */
.meal { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); align-items: flex-start; }
.meal:first-of-type { border-top: 0; padding-top: 2px; }
.meal .tick { margin-top: 2px; }
.meal .k { font-size: 12px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: var(--green); }
.meal .t { font-size: 15.5px; line-height: 1.45; font-weight: 600; margin-top: 2px; }
.meal.done .t { color: var(--faint); text-decoration: line-through; text-decoration-color: rgba(0,0,0,.18); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: var(--mint); color: var(--deep); font-weight: 800; font-size: 13px; }
.chip svg { width: 14px; height: 14px; }
.chip.coral { background: var(--sand); color: #a8452b; }
.tick { width: 26px; height: 26px; flex: none; border-radius: 50%; border: 2px solid var(--mint2); display: grid; place-items: center; transition: .15s; background: #fff; }
.tick svg { width: 15px; height: 15px; opacity: 0; color: #fff; }
.on > .tick, .tick.on { background: var(--green); border-color: var(--green); }
.on > .tick svg, .tick.on svg { opacity: 1; }

/* contadores */
.counters { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.counter { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.counter .top { display: flex; align-items: center; gap: 8px; font-weight: 900; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.counter .top svg { width: 18px; height: 18px; }
.counter .big { font-family: var(--serif); font-size: 30px; color: var(--deep); line-height: 1; }
.counter .big small { font-family: var(--sans); font-size: 14px; color: var(--faint); font-weight: 700; }
.bar { height: 9px; border-radius: 99px; background: var(--mint); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--green), #48a08d); transition: width .3s; }
.bar.coral i { background: linear-gradient(90deg, var(--coral), var(--coral2)); }
.btnrow { display: flex; gap: 6px; flex-wrap: wrap; }
.mini { flex: 1; min-width: 44px; white-space: nowrap; padding: 9px 6px; border-radius: 12px; background: var(--mint); color: var(--deep); font-weight: 900; font-size: 13.5px; text-align: center; }
.mini.coral { background: var(--sand); color: #a8452b; }
.mini:active { transform: scale(.96); }
.mini svg { width: 17px; height: 17px; margin: 0 auto; }

/* checklist */
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: var(--r-sm); background: #f6f8f7; font-weight: 800; font-size: 14px; text-align: left; transition: .15s; }
.check.on { background: var(--mint); color: var(--deep); }
.mood { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 10px; }
.mood button { padding: 8px 12px; border-radius: 999px; background: #f2f5f4; font-weight: 800; font-size: 13.5px; }
.mood button.on { background: var(--deep); color: #fff; }
textarea, input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], input[type=date], select {
  width: 100%; border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 13px 14px; background: #fff; font-size: 16px; outline: none; transition: border .15s;
}
textarea { min-height: 84px; resize: vertical; line-height: 1.45; }
textarea:focus, input:focus, select:focus { border-color: var(--green); }
label.f { display: block; font-weight: 800; font-size: 14px; margin: 14px 0 6px; color: var(--deep); }

/* botões */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 16px 18px; border-radius: 16px; background: var(--coral); color: #fff; font-weight: 900; font-size: 16.5px; box-shadow: 0 10px 22px -10px rgba(217,105,75,.8); transition: transform .1s; }
.btn:active { transform: scale(.98); }
.btn svg { width: 20px; height: 20px; }
.btn.dark { background: var(--deep); box-shadow: 0 10px 22px -10px rgba(33,79,70,.8); }
.btn.ghost { background: transparent; color: var(--deep); box-shadow: none; border: 1.5px solid var(--line); }
.btn[disabled] { opacity: .55; pointer-events: none; }
.linkbtn { font-weight: 800; color: var(--green); text-decoration: underline; text-underline-offset: 3px; }

/* semanas e dias */
.week { margin-bottom: 18px; }
.week-head { display: flex; align-items: baseline; gap: 10px; margin: 6px 2px 10px; }
.week-head h2 { font-size: 22px; color: var(--deep); }
.week-head span { font-size: 12px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: var(--coral); }
.week-desc { margin: -4px 2px 12px; color: var(--muted); font-weight: 600; font-size: 14px; line-height: 1.45; }
.days { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.daytile { aspect-ratio: 1; border-radius: 18px; background: var(--card); box-shadow: var(--shadow); display: grid; place-content: center; text-align: center; position: relative; transition: .15s; }
.daytile b { font-family: var(--serif); font-size: 24px; color: var(--deep); line-height: 1; }
.daytile small { font-size: 11px; font-weight: 900; letter-spacing: .08em; color: var(--faint); text-transform: uppercase; }
.daytile.today { background: var(--deep); }
.daytile.today b, .daytile.today small { color: #fff; }
.daytile.done { background: var(--mint); }
.daytile .badge { position: absolute; top: 7px; right: 7px; width: 18px; height: 18px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; }
.daytile .badge svg { width: 11px; height: 11px; }
.daytile .lock { position: absolute; top: 8px; right: 8px; color: var(--faint); }
.daytile .lock svg { width: 14px; height: 14px; }

/* receitas */
.search { position: relative; margin-bottom: 12px; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--faint); }
.search input { padding-left: 42px; border-radius: 999px; }
.filters { display: flex; gap: 8px; overflow-x: auto; margin: 0 -18px 14px; padding: 0 18px 4px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filter { flex: none; padding: 9px 14px; border-radius: 999px; background: #fff; box-shadow: var(--shadow); font-weight: 800; font-size: 13.5px; color: var(--muted); }
.filter.on { background: var(--deep); color: #fff; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rcard { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; text-align: left; display: flex; flex-direction: column; position: relative; }
.rcard .art { height: 104px; display: grid; place-items: center; font-size: 46px; position: relative; }
.rcard .art::after { content: ""; position: absolute; width: 90px; height: 90px; border-radius: 50%; background: rgba(255,255,255,.35); right: -26px; bottom: -36px; }
.rcard .body { padding: 12px 13px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.rcard h3 { font-family: var(--sans); font-size: 15px; font-weight: 900; line-height: 1.25; color: var(--ink); }
.rcard .meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border-radius: 999px; background: var(--mint); color: var(--deep); font-size: 12px; font-weight: 900; }
.pill.p { background: var(--coral); color: #fff; }
.pill svg { width: 12px; height: 12px; }
.lockbadge { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.92); display: grid; place-items: center; color: var(--deep); box-shadow: 0 4px 10px rgba(0,0,0,.12); z-index: 2; }
.lockbadge svg { width: 15px; height: 15px; }
.rhero { margin: 0 -18px; height: 210px; display: grid; place-items: center; font-size: 92px; position: relative; border-radius: 0 0 30px 30px; overflow: hidden; }
.rhero .back { position: absolute; left: 18px; top: 0; margin-top: calc(var(--safe-t) + 14px); background: rgba(255,255,255,.85); padding: 8px 14px 8px 10px; border-radius: 999px; }
.rtitle { padding: 18px 0 6px; }
.rtitle h1 { font-size: 28px; color: var(--deep); }
.list { margin: 0; padding: 0; list-style: none; }
.list li { display: flex; gap: 12px; align-items: flex-start; padding: 11px 0; border-top: 1px solid var(--line); font-size: 15.5px; line-height: 1.45; font-weight: 600; }
.list li:first-child { border-top: 0; padding-top: 2px; }
.steps { counter-reset: s; }
.steps li::before { counter-increment: s; content: counter(s); flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--deep); color: #fff; display: grid; place-items: center; font-weight: 900; font-size: 14px; }
.tipbox { background: var(--mint); border-radius: var(--r-sm); padding: 13px 15px; color: var(--deep); font-weight: 700; font-size: 14.5px; line-height: 1.45; display: flex; gap: 10px; }
.tipbox svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }

/* guia */
.gitem { display: flex; gap: 14px; align-items: center; width: 100%; text-align: left; padding: 15px; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); margin-bottom: 10px; position: relative; }
.gitem .ico { width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; font-size: 26px; flex: none; }
.gitem b { display: block; font-size: 16px; font-weight: 900; }
.gitem span { display: block; color: var(--muted); font-size: 13.5px; font-weight: 600; margin-top: 2px; line-height: 1.35; }
.gitem .ico svg { width: 24px; height: 24px; }
.gitem.alert .ico { color: var(--warn); }
.gitem .chev { margin-left: auto; color: var(--faint); flex: none; }
.gitem .chev svg { width: 18px; height: 18px; }
.gitem.alert { background: var(--warnbg); }
.gitem.alert b { color: var(--warn); }
.rules li b { color: var(--deep); }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table td { padding: 10px 4px; border-top: 1px solid var(--line); line-height: 1.4; font-weight: 600; }
.table tr:first-child td { border-top: 0; }
.table td.n { text-align: right; font-weight: 900; color: var(--coral); white-space: nowrap; }
.plate { width: 190px; margin: 6px auto 10px; }

/* mercado */
.mk-cat { margin-bottom: 14px; }
.mk-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 2px; border-top: 1px solid var(--line); text-align: left; font-weight: 700; font-size: 15px; }
.mk-item:first-of-type { border-top: 0; }
.mk-item.on span { color: var(--faint); text-decoration: line-through; }
.seg { display: flex; background: #fff; border-radius: 999px; padding: 4px; box-shadow: var(--shadow); margin-bottom: 14px; }
.seg button { flex: 1; padding: 9px 4px; border-radius: 999px; font-weight: 900; font-size: 13.5px; color: var(--muted); }
.seg button.on { background: var(--deep); color: #fff; }
.addrow { display: flex; gap: 8px; margin-top: 10px; }
.addrow input { flex: 1; }
.addrow button { flex: none; width: 50px; border-radius: var(--r-sm); background: var(--deep); color: #fff; display: grid; place-items: center; }
.addrow button svg { width: 20px; height: 20px; }

/* trancado (vitrine) */
.locked { position: relative; overflow: hidden; }
.blur { filter: blur(6px); user-select: none; pointer-events: none; opacity: .75; }
.lockcard { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; padding: 22px; background: linear-gradient(180deg, rgba(251,247,241,.35), rgba(251,247,241,.92) 55%); z-index: 3; gap: 10px; }
.lockcard .lk { width: 52px; height: 52px; border-radius: 50%; background: var(--deep); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 22px -8px rgba(33,79,70,.7); }
.lockcard .lk svg { width: 22px; height: 22px; }
.lockcard h3 { font-size: 21px; color: var(--deep); }
.lockcard p { margin: 0; color: var(--muted); font-weight: 700; font-size: 14px; line-height: 1.45; max-width: 290px; }
.lockcard .btn { width: auto; padding: 13px 22px; font-size: 15.5px; }
.promo { background: var(--deep); color: #fff; border-radius: var(--r); padding: 20px; margin-bottom: 14px; position: relative; overflow: hidden; box-shadow: var(--shadow-lg); }
.promo::after { content: ""; position: absolute; width: 150px; height: 150px; border-radius: 50%; background: var(--coral); opacity: .5; right: -50px; top: -60px; }
.promo > * { position: relative; z-index: 1; }
.promo h2 { font-size: 23px; color: #fff; }
.promo h2 em { color: var(--peach); }
.promo p { color: #cfe3dc; font-weight: 600; font-size: 14.5px; line-height: 1.45; margin: 8px 0 14px; }
.promo ul { margin: 0 0 16px; padding: 0; list-style: none; display: grid; gap: 8px; }
.promo li { display: flex; gap: 10px; align-items: center; font-weight: 700; font-size: 14.5px; }
.promo li svg { width: 18px; height: 18px; color: var(--peach); flex: none; }

/* menu de baixo */
.nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b); background: rgba(255,255,255,.94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr); z-index: 20; }
.nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-decoration: none; color: var(--faint); font-weight: 800; font-size: 11.5px; }
.nav a svg { width: 24px; height: 24px; }
.nav a.on { color: var(--deep); }
.nav a.on .ni { background: var(--mint); }
.nav .ni { width: 52px; height: 32px; border-radius: 999px; display: grid; place-items: center; transition: background .2s; }

/* folha de baixo (planos, ajustes) */
.overlay { position: fixed; inset: 0; background: rgba(15,30,27,.5); z-index: 40; animation: ov .2s ease; }
@keyframes ov { from { opacity: 0; } }
.sheet { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 480px; max-height: 92dvh; overflow-y: auto; background: var(--cream); border-radius: 26px 26px 0 0; z-index: 41; padding: 10px 18px calc(22px + var(--safe-b)); animation: up .28s cubic-bezier(.2,.8,.2,1); box-shadow: var(--shadow-lg); }
@keyframes up { from { transform: translate(-50%, 100%); } }
.grab { width: 44px; height: 5px; border-radius: 9px; background: #d4dcd8; margin: 2px auto 14px; }
.sheet h2 { font-size: 25px; color: var(--deep); }
.sheet h2 em { color: var(--coral); }
.x { position: absolute; right: 14px; top: 12px; width: 36px; height: 36px; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: var(--shadow); }
.x svg { width: 18px; height: 18px; }
.plans { display: grid; gap: 10px; margin: 16px 0 14px; }
.plan { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; background: #fff; border: 2px solid var(--line); border-radius: 18px; padding: 14px 16px; position: relative; transition: .15s; }
.plan.on { border-color: var(--green); box-shadow: 0 0 0 4px rgba(47,111,98,.12); }
.plan .radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--mint2); flex: none; display: grid; place-items: center; }
.plan.on .radio { border-color: var(--green); }
.plan.on .radio::after { content: ""; width: 11px; height: 11px; border-radius: 50%; background: var(--green); }
.plan b { font-size: 16.5px; font-weight: 900; }
.plan small { display: block; color: var(--muted); font-weight: 700; font-size: 13px; margin-top: 2px; }
.plan .price { margin-left: auto; text-align: right; }
.plan .price strong { font-family: var(--serif); font-size: 21px; color: var(--deep); display: block; line-height: 1.1; }
.plan .tag { position: absolute; top: -10px; left: 16px; background: var(--coral); color: #fff; font-size: 11px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; }
.perks { display: grid; gap: 9px; margin: 14px 0 16px; padding: 0; list-style: none; }
.perks li { display: flex; gap: 10px; align-items: flex-start; font-weight: 700; font-size: 14.5px; line-height: 1.4; }
.perks li svg { width: 19px; height: 19px; color: var(--green); flex: none; margin-top: 1px; }
.trust { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; margin: 12px 0 4px; color: var(--muted); font-size: 12.5px; font-weight: 800; }
.trust span { display: inline-flex; align-items: center; gap: 5px; }
.trust svg { width: 15px; height: 15px; }

/* entrar */
.tabs { display: flex; gap: 6px; background: #fff; border-radius: 999px; padding: 5px; box-shadow: var(--shadow); margin: 6px 0 4px; }
.tabs button { flex: 1; padding: 11px; border-radius: 999px; font-weight: 900; color: var(--muted); }
.tabs button.on { background: var(--deep); color: #fff; }
.err { margin: 12px 0 0; padding: 11px 13px; border-radius: 12px; background: var(--warnbg); color: var(--warn); font-weight: 800; font-size: 14px; display: none; }
.err.show { display: block; }

/* progresso */
.heat { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; }
.heat div { aspect-ratio: 1; border-radius: 10px; background: #eef2f0; display: grid; place-items: center; font-size: 12px; font-weight: 900; color: var(--faint); }
.heat .l1 { background: #d9ebe4; color: var(--deep); }
.heat .l2 { background: #a9d3c4; color: var(--deep); }
.heat .l3 { background: #5fa892; color: #fff; }
.heat .l4 { background: var(--deep); color: #fff; }
.meas { display: grid; grid-template-columns: 70px 1fr 1fr 1fr; gap: 8px; align-items: center; font-weight: 800; font-size: 13.5px; }
.meas input { padding: 10px 8px; font-size: 15px; text-align: center; }

.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--safe-b) + 14px); transform: translate(-50%, 20px); background: var(--ink); color: #fff; font-weight: 800; font-size: 14px; padding: 12px 18px; border-radius: 999px; opacity: 0; pointer-events: none; transition: .25s; z-index: 60; max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.foot { text-align: center; color: var(--faint); font-size: 12px; font-weight: 700; line-height: 1.5; margin: 22px 8px 0; }
.foot a { color: var(--muted); }
.row { display: flex; align-items: center; gap: 12px; }
.row .grow { flex: 1; }
.setrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 14px 0; border-top: 1px solid var(--line); text-align: left; font-weight: 800; }
.setrow:first-child { border-top: 0; }
.setrow span { color: var(--muted); font-weight: 700; font-size: 14px; }
.setrow svg { width: 18px; height: 18px; color: var(--faint); }
.hide { display: none !important; }

/* escolha de trilha (caneta / saúde) */
.hero-q { margin: 18px 0 8px !important; font-size: 12px !important; font-weight: 900 !important; letter-spacing: .12em; text-transform: uppercase; color: var(--peach) !important; }
.trackswitch { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.trackswitch button { display: flex; align-items: center; gap: 8px; padding: 12px; border-radius: 16px; background: rgba(255,255,255,.1); color: #fff; font-weight: 800; font-size: 14px; line-height: 1.2; text-align: left; border: 1.5px solid rgba(255,255,255,.18); transition: .15s; }
.trackswitch button svg { width: 20px; height: 20px; flex: none; color: var(--peach); }
.trackswitch button.on { background: #fff; color: var(--deep); border-color: #fff; }
.trackswitch button.on svg { color: var(--coral); }

/* partes que viram colunas no computador */
.dash { display: flex; flex-direction: column; }
.vgrid > div, .cols2 > div, .rcols > div { min-width: 0; }
.nav .nav-brand, .nav .nav-acct { display: none; }
.avatar.sm { width: 34px; height: 34px; background: var(--mint); color: var(--deep); border: 0; font-size: 14px; }
.avatar.sm svg { width: 17px; height: 17px; }

@media (min-width: 900px) {
  html, body { background: var(--cream); }
  .app { max-width: none; display: grid; grid-template-columns: 252px minmax(0, 1fr); box-shadow: none; min-height: 100vh; }
  .app > .nav { grid-column: 1; grid-row: 1; position: sticky; top: 0; height: 100vh; width: auto; max-width: none; left: auto; transform: none; padding: 26px 16px; display: flex; flex-direction: column; gap: 4px; border-top: 0; border-right: 1px solid var(--line); background: #fff; backdrop-filter: none; }
  .nav a { flex-direction: row; justify-content: flex-start; gap: 12px; font-size: 15px; padding: 11px 12px; border-radius: 14px; color: var(--muted); }
  .nav a:hover { background: #f4f7f6; }
  .nav a .ni { width: auto; height: auto; background: none !important; }
  .nav a svg { width: 22px; height: 22px; }
  .nav a.on { background: var(--mint); color: var(--deep); }
  .nav-brand { display: flex !important; align-items: center; gap: 10px; margin: 0 0 22px; padding: 4px 8px !important; font-family: var(--serif); font-size: 19px !important; font-weight: 700 !important; color: var(--deep) !important; line-height: 1.1; }
  .nav-brand:hover { background: none !important; }
  .nav-brand em { color: var(--coral); }
  .nav-brand .logo { width: 38px; height: 38px; flex: none; }
  .nav-acct { display: flex !important; align-items: center; margin-top: auto; }
  .app > .screen { grid-column: 2; grid-row: 1; width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 44px 64px; }
  .screen.narrow { max-width: 760px; }
  .narrowbox { max-width: 560px; }
  .narrowbtn { max-width: 320px; }
  .hero { margin: 28px 0 22px; border-radius: 30px; padding: 34px 40px 36px; }
  .hero .topbar { display: none; }
  .hero h1 { font-size: 42px; max-width: 760px; }
  .hero p { font-size: 17px; max-width: 640px; }
  .hero-v .trackswitch { max-width: 560px; }
  .ring { width: 116px; height: 116px; }
  .ring b { font-size: 34px; }
  .pagehead { padding-top: 38px; }
  .pagehead h1 { font-size: 42px; }
  .pagehead p { font-size: 16.5px; max-width: 700px; }
  .back { margin-top: 30px; }
  .vgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
  .dash { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); grid-template-areas: "menu side" "menu day"; gap: 0 20px; align-items: start; }
  .d-menu { grid-area: menu; } .d-side { grid-area: side; } .d-day { grid-area: day; }
  .cols2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 20px; align-items: start; }
  .rcols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 0 20px; align-items: start; margin-top: 8px; }
  .rhero { margin: 28px 0 0; border-radius: 30px; height: 250px; font-size: 110px; }
  .rhero .back { margin-top: 18px; }
  .rtitle h1 { font-size: 36px; }
  .rtools { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
  .rtools .search { flex: 0 0 300px; margin: 0; }
  .rtools .filters { margin: 0; padding: 4px 0; flex-wrap: wrap; overflow: visible; }
  .rgrid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
  .rcard { transition: transform .15s, box-shadow .15s; }
  .rcard:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(33,79,70,.06), 0 18px 34px -16px rgba(33,79,70,.3); }
  .rcard .art { height: 130px; font-size: 54px; }
  .weeks { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 28px; }
  .days { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .daytile:hover, .gitem:hover { transform: translateY(-2px); }
  .gitem { transition: transform .15s; }
  .glist { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin-bottom: 14px; }
  .glist .gitem { margin: 0; }
  .mkgrid { columns: 2; column-gap: 18px; }
  .mkgrid > .card { break-inside: avoid; display: block; }
  .sheet { top: 50%; bottom: auto; transform: translate(-50%, -50%); border-radius: 26px; max-width: 560px; max-height: 90vh; padding: 26px 28px 26px; animation: pop .22s ease; }
  @keyframes pop { from { opacity: 0; transform: translate(-50%, -47%); } }
  .grab { display: none; }
  .toast { bottom: 30px; left: calc(50% + 126px); }
  .btn { max-width: 100%; }
  .promo { padding: 26px; }
  .promo h2 { font-size: 27px; }
  .card { padding: 22px; }
}
@media (min-width: 1280px) {
  .days { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .weeks { grid-template-columns: 1fr; }
}
