/* Conta do Bolo — componentes do app (v2). Depende de tokens.css. Mobile first, 375 px de largura de referência. */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cb-creme); color: var(--cb-texto); font-family: var(--font-text); font-size: var(--fs-md); line-height: 1.5; font-feature-settings: "tnum" 1; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
h1, h2, .display { font-family: var(--font-display); font-weight: 800; font-variation-settings: "SOFT" 100; letter-spacing: -0.015em; line-height: 1.1; }
h1 { font-size: var(--fs-xl); }
h2 { font-size: var(--fs-lg); letter-spacing: -0.01em; }
a { color: var(--cb-terracota); }
:focus-visible { outline: 3px solid var(--cb-foco); outline-offset: 3px; border-radius: var(--r-sm); }
.i { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Estrutura da tela */
.screen { width: 375px; min-height: 100vh; margin: 0 auto; padding-bottom: 112px; position: relative; background:
  radial-gradient(120% 40% at 100% 0, rgba(239, 179, 94, .22), transparent 60%), var(--cb-creme); }
.page { padding: var(--sp-2) var(--page-x) 0; }
.stack > * + * { margin-top: var(--sp-4); }
.stack-lg > * + * { margin-top: var(--sp-6); }
.muted { color: var(--cb-texto-2); }
.hint { color: var(--cb-texto-3); font-size: var(--fs-sm); line-height: 1.4; }

/* Barra do topo */
.appbar { display: flex; align-items: center; gap: var(--sp-2); height: 64px; padding: 0 var(--sp-3) 0 var(--sp-3); position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--cb-creme) 88%, transparent); backdrop-filter: blur(12px); }
.appbar .title { font-family: var(--font-display); font-weight: 800; font-variation-settings: "SOFT" 100; font-size: var(--fs-lg); flex: 1; }
.iconbtn { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: var(--r-pill); border: 0; background: transparent; color: var(--cb-texto); cursor: pointer; transition: background var(--t-fast) var(--ease); }
.iconbtn:hover, .iconbtn:active { background: var(--cb-massa-50); }
.brandmark { display: flex; align-items: center; gap: 10px; padding-left: var(--sp-2); font-family: var(--font-display); font-weight: 800; font-variation-settings: "SOFT" 100; font-size: 1.125rem; letter-spacing: -0.01em; flex: 1; }
.brandmark img { width: 32px; height: 32px; border-radius: 9px; }
.brandmark span b { font-weight: 500; color: var(--cb-terracota); }

/* Botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: var(--tap); padding: 0 var(--sp-5); border: 0; border-radius: var(--r-md); font: 700 var(--fs-md)/1.2 var(--font-text); text-decoration: none; cursor: pointer; transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease), box-shadow var(--t-base) var(--ease); }
.btn:active { transform: translateY(1px) scale(.992); }
.btn.primary { background: var(--cb-terracota); color: var(--cb-creme); box-shadow: var(--sh-btn); }
.btn.primary:hover { background: var(--cb-terracota-600); }
.btn.secondary { background: var(--cb-massa-50); color: var(--cb-texto); box-shadow: inset 0 0 0 1.5px var(--cb-linha); }
.btn.ghost { background: transparent; color: var(--cb-terracota); }
.btn.big { min-height: 64px; font-size: var(--fs-lg); border-radius: var(--r-lg); }
.btn[aria-disabled=true] { opacity: .55; cursor: not-allowed; }

/* Cartões */
.card { background: var(--cb-surface); border-radius: var(--r-lg); box-shadow: var(--sh-2); border: 1px solid var(--cb-linha); padding: var(--sp-5); }
.card.flat { box-shadow: none; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .02em; background: var(--cb-massa-50); color: var(--cb-texto); border: 1px solid var(--cb-linha); }
.badge.exemplo { background: var(--cb-caramelo-100); border-color: #E6C48A; }
.badge.ganho { background: var(--cb-ganho-100); color: var(--cb-ganho); border-color: #C5DDB8; }
.badge.lock { background: transparent; border-style: dashed; color: var(--cb-texto-2); }

/* Início */
.hero-cta { display: block; position: relative; overflow: hidden; border-radius: var(--r-xl); padding: var(--sp-6); color: var(--cb-creme); text-decoration: none; background:
  radial-gradient(90% 80% at 100% 0, rgba(239, 179, 94, .35), transparent 62%),
  linear-gradient(160deg, #B5501F 0%, var(--cb-terracota) 55%, #7F3211 100%); box-shadow: 0 24px 40px -18px rgba(127, 50, 17, .7); }
.hero-cta h1, .hero-cta h2 { font-size: 1.75rem; max-width: 12ch; }
.hero-cta p { margin-top: var(--sp-2); color: #FBE3D2; font-size: var(--fs-md); max-width: 24ch; }
.hero-cta .go { display: inline-flex; align-items: center; gap: 10px; margin-top: var(--sp-5); min-height: 52px; padding: 0 var(--sp-5) 0 var(--sp-4); border-radius: var(--r-pill); background: var(--cb-creme); color: var(--cb-terracota); font-weight: 700; }
.hero-cta::after { content: ""; position: absolute; right: -36px; bottom: -44px; width: 168px; height: 168px; border-radius: 50%; border: 22px solid rgba(255, 251, 245, .13); }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: var(--sp-8) 0 var(--sp-3); }
.section-title h2 { font-size: var(--fs-lg); }
.section-title a { font-weight: 700; font-size: var(--fs-sm); text-decoration: none; }
.recipe-row { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-4); min-height: 72px; text-decoration: none; color: inherit; }
.recipe-row + .recipe-row { border-top: 1px solid var(--cb-linha); }
.recipe-row .dot { width: 44px; height: 44px; flex: none; border-radius: 14px; display: grid; place-items: center; background: var(--cb-massa-50); font-family: var(--font-display); font-weight: 800; color: var(--cb-terracota); font-size: 1.25rem; }
.recipe-row .name { font-weight: 700; line-height: 1.2; }
.recipe-row .sub { font-size: var(--fs-sm); color: var(--cb-texto-3); }
.recipe-row .price { white-space: nowrap; margin-left: auto; text-align: right; font-weight: 800; color: var(--cb-terracota); font-size: var(--fs-lg); line-height: 1.1; }
.recipe-row .price small { display: block; font-weight: 700; font-size: var(--fs-xs); color: var(--cb-ganho); }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.tile { display: flex; flex-direction: column; justify-content: flex-start; gap: var(--sp-3); min-height: 124px; padding: var(--sp-4); border-radius: var(--r-lg); background: var(--cb-surface); border: 1px solid var(--cb-linha); box-shadow: var(--sh-1); color: var(--cb-texto); text-decoration: none; transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease); }
.tile:active { transform: scale(.985); }
.tile .ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--cb-terracota-100); color: var(--cb-terracota); }
.tile b { display: block; line-height: 1.2; }
.tile small { display: block; margin-top: 2px; color: var(--cb-texto-3); font-size: var(--fs-sm); line-height: 1.3; }
.tile.locked { background: transparent; box-shadow: none; border-style: dashed; border-color: var(--cb-borda-campo); }
.tile.locked .ico { background: var(--cb-massa-50); color: var(--cb-texto-2); }
.tile.wide { grid-column: 1 / -1; flex-direction: row; align-items: center; min-height: 88px; }
.note { display: flex; gap: var(--sp-3); align-items: flex-start; padding: var(--sp-4); border-radius: var(--r-lg); background: var(--cb-massa-50); color: var(--cb-texto-2); font-size: var(--fs-sm); line-height: 1.45; }
.note .i { color: var(--cb-terracota); margin-top: 1px; }
.note a { font-weight: 700; }

/* Barra de abas (Início e Tabela; some no passo a passo e no Resultado) */
.tabbar { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: min(100%, 560px); display: grid; grid-template-columns: repeat(4, 1fr); padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--cb-creme) 92%, transparent); backdrop-filter: blur(14px); border-top: 1px solid var(--cb-linha); z-index: 6; }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; border-radius: var(--r-sm); font-size: var(--fs-xs); font-weight: 700; color: var(--cb-texto-2); text-decoration: none; }
.tab[aria-current=page] { color: var(--cb-terracota); }
.tab[aria-current=page] .i { stroke-width: 2.2; }

/* Passo a passo (Receita) */
.stepper { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: var(--sp-2) 0 var(--sp-4); }
.stepper i { height: 6px; border-radius: var(--r-pill); background: var(--cb-massa); }
.stepper i.done { background: var(--cb-terracota); }
.stepper i.now { background: linear-gradient(90deg, var(--cb-terracota) 55%, var(--cb-massa) 55%); }
.kicker { font-size: var(--fs-sm); font-weight: 700; color: var(--cb-terracota); letter-spacing: .02em; }
.field label, .field .label { display: block; font-weight: 700; margin-bottom: 6px; line-height: 1.3; }
.control { display: flex; align-items: center; min-height: var(--tap); padding: 0 var(--sp-4); background: var(--cb-surface); border: 1.5px solid var(--cb-borda-campo); border-radius: var(--r-sm); gap: var(--sp-2); transition: box-shadow var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
.control:focus-within, .control.focus { border-color: var(--cb-terracota); box-shadow: 0 0 0 4px var(--cb-terracota-100); }
.control input, .control select { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: 600 var(--fs-lg)/1 var(--font-text); color: var(--cb-texto); padding: 0; height: 100%; min-height: 52px; }
.control .adorn { color: var(--cb-texto-2); font-weight: 700; }
.field .hint { margin-top: 6px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: var(--r-md); background: var(--cb-massa-50); box-shadow: inset 0 0 0 1px var(--cb-linha); gap: 4px; }
.seg button { min-height: 48px; border: 0; border-radius: 12px; background: transparent; font: 700 var(--fs-sm)/1.1 var(--font-text); color: var(--cb-texto-2); cursor: pointer; padding: 0 var(--sp-2); transition: background var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease), color var(--t-base) var(--ease); }
.seg button[aria-pressed=true] { background: var(--cb-surface); color: var(--cb-texto); box-shadow: var(--sh-1), 0 0 0 1px var(--cb-linha); }
.live { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md); background: var(--cb-ganho-100); color: var(--cb-ganho); font-weight: 700; font-size: var(--fs-sm); line-height: 1.35; }
.live b { font-size: var(--fs-md); }
.ing { padding: var(--sp-4); }
.ing + .ing { margin-top: var(--sp-3); }
.ing-head { display: flex; align-items: center; gap: var(--sp-3); }
.ing-head .n { width: 32px; height: 32px; border-radius: 50%; background: var(--cb-terracota-100); color: var(--cb-terracota); font-weight: 800; display: grid; place-items: center; }
.ing-head .cost { margin-left: auto; font-weight: 800; color: var(--cb-terracota); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.two > * { min-width: 0; }
.two.end { align-items: end; }
.dock { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: min(100%, 560px); display: flex; gap: var(--sp-3); padding: var(--sp-3) var(--page-x) calc(var(--sp-4) + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--cb-creme) 68%, transparent); z-index: 6; }
.dock .btn.secondary, .dock .btn.ghost { width: auto; flex: 0 0 auto; }
.dock .btn.primary { flex: 1; }
.running { display: flex; justify-content: space-between; align-items: center; padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md); background: var(--cb-massa-50); font-size: var(--fs-sm); color: var(--cb-texto-2); font-weight: 700; }
.running b { color: var(--cb-texto); font-size: var(--fs-md); }

/* Resultado */
.result-card { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: var(--sp-6) var(--sp-5) var(--sp-5); color: var(--cb-creme); background:
  radial-gradient(70% 60% at 0 0, rgba(239, 179, 94, .22), transparent 60%),
  radial-gradient(80% 70% at 100% 100%, rgba(185, 228, 164, .12), transparent 60%),
  var(--cb-chocolate-900); box-shadow: var(--sh-3); }
.result-card .eyebrow { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--cb-pessego); }
.result-card .price { margin-top: 4px; font-family: var(--font-display); font-weight: 800; font-variation-settings: "SOFT" 100; font-size: var(--fs-2xl); letter-spacing: -0.02em; line-height: 1; }
.result-card .price small { font: 500 var(--fs-md)/1 var(--font-text); color: #E8D9C3; margin-left: 6px; letter-spacing: 0; }
.gain { position: relative; margin-top: var(--sp-5); padding: var(--sp-4) var(--sp-5) var(--sp-5); border-radius: var(--r-lg); background: linear-gradient(180deg, rgba(185, 228, 164, .17), rgba(185, 228, 164, .07)); box-shadow: inset 0 0 0 1px rgba(185, 228, 164, .38); overflow: hidden; }
.gain .eyebrow { color: var(--cb-ganho-claro); }
.gain .num { display: block; margin-top: 2px; color: var(--cb-ganho-claro); font-family: var(--font-display); font-weight: 800; font-variation-settings: "SOFT" 100; font-size: var(--fs-hero); letter-spacing: -0.03em; line-height: 1.05; }
.gain .num span { display: block; margin-top: 2px; font: 700 var(--fs-md)/1.1 var(--font-text); letter-spacing: 0; color: var(--cb-creme); }
.gain .sub { margin-top: var(--sp-2); font-size: var(--fs-sm); line-height: 1.4; color: #E8D9C3; }
.gain .total { display: flex; justify-content: space-between; margin-top: var(--sp-4); padding-top: var(--sp-3); border-top: 1px dashed rgba(185, 228, 164, .4); font-size: var(--fs-sm); color: #E8D9C3; }
.gain .total b { color: var(--cb-creme); }
.gain::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 251, 245, .22) 50%, transparent 65%); background-size: 250% 100%; background-position: 140% 0; animation: sweep 1.1s var(--ease) .55s 1 both; pointer-events: none; }
.receipt { position: relative; padding: var(--sp-6) var(--sp-5) var(--sp-8); background: #FFFDF8; box-shadow: var(--sh-2); border-radius: 6px; --zig: 10px;
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 20px 100% repeat-x, linear-gradient(#000 0 0) top / 100% calc(100% - 9px) no-repeat;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 20px 100% repeat-x, linear-gradient(#000 0 0) top / 100% calc(100% - 9px) no-repeat; }
.receipt-wrap { filter: drop-shadow(0 10px 18px rgba(42, 29, 21, .12)); }
.receipt h2 { font-size: var(--fs-lg); }
.receipt .sub { font-size: var(--fs-sm); color: var(--cb-texto-3); margin-top: 2px; }
.receipt dl { margin: var(--sp-4) 0 0; }
.receipt .row { display: flex; align-items: baseline; gap: 8px; padding: 7px 0; font-size: var(--fs-md); animation: rise var(--t-slow) var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms + 200ms); }
.receipt .row dt { color: var(--cb-texto-2); }
.receipt .row::before { content: ""; order: 1; flex: 1; border-bottom: 2px dotted #D8C6AB; transform: translateY(-4px); }
.receipt .row dd { order: 2; margin: 0; font-weight: 700; }
.receipt .row.sum { margin-top: 6px; padding-top: 12px; border-top: 1.5px solid var(--cb-texto); }
.receipt .row.sum::before { display: none; }
.receipt .row.sum dd { margin-left: auto; }
.receipt .row.win dt, .receipt .row.win dd { color: var(--cb-ganho); font-weight: 800; }
.receipt .row.total { padding-top: 12px; margin-top: 4px; border-top: 1.5px solid var(--cb-texto); }
.receipt .row.total::before { display: none; }
.receipt .row.total dt { color: var(--cb-texto); font-weight: 800; font-size: var(--fs-lg); font-family: var(--font-display); }
.receipt .row.total dd { margin-left: auto; color: var(--cb-terracota); font-size: var(--fs-xl); font-family: var(--font-display); font-weight: 800; letter-spacing: -0.01em; }
.details { border-radius: var(--r-lg); border: 1px solid var(--cb-linha); background: var(--cb-surface); }
.details summary { display: flex; align-items: center; justify-content: space-between; min-height: 56px; padding: 0 var(--sp-5); font-weight: 700; cursor: pointer; list-style: none; }
.details summary::-webkit-details-marker { display: none; }
.details[open] summary .i { transform: rotate(90deg); }
.details summary .i { transition: transform var(--t-base) var(--ease); }

/* Tabela */
.desk { position: relative; padding: var(--sp-3); border-radius: var(--r-xl); background: var(--cb-massa); box-shadow: inset 0 0 0 1px var(--cb-linha); }
.desk .paper { display: block; width: 100%; height: auto; border-radius: 14px; box-shadow: 0 18px 30px -12px rgba(42, 29, 21, .5); background: #fff; }
.desk .tag { position: absolute; left: 22px; top: 22px; }
.check { display: flex; align-items: center; gap: var(--sp-3); min-height: 60px; padding: var(--sp-3) var(--sp-4); background: var(--cb-surface); border: 1.5px solid var(--cb-borda-campo); border-radius: var(--r-md); font-weight: 700; }
.check .box { width: 28px; height: 28px; flex: none; border-radius: 9px; border: 2px solid var(--cb-borda-campo); display: grid; place-items: center; color: transparent; }
.check.on { border-color: var(--cb-terracota); background: var(--cb-terracota-100); }
.check.on .box { background: var(--cb-terracota); border-color: var(--cb-terracota); color: var(--cb-creme); }
.check .p { margin-left: auto; color: var(--cb-terracota); font-weight: 800; }
.check .box .i { width: 18px; height: 18px; stroke-width: 3; }

/* Motion (descrição e uso no README) */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { opacity: 0; transform: scale(.94); } 60% { opacity: 1; transform: scale(1.025); } 100% { transform: scale(1); } }
@keyframes sweep { from { background-position: 140% 0; } to { background-position: -40% 0; } }
.result-card { animation: pop var(--t-slow) var(--ease) both; }
.result-card .price { animation: rise var(--t-slow) var(--ease) .1s both; }
.gain { animation: rise var(--t-slow) var(--ease) .22s both; }
