/* ownership: product */
/* BeefFi v4 — design spec derivado do estudo em docs/estudo-infinitepay.md (tokens, anatomia e medidas).
   Carregado por ultimo. Tres blocos: (1) tokens, (2) casca e home nas medidas do spec, (3) kit das telas
   internas (classes k-*) e ajuste das pecas antigas que continuam em uso.
   Medidas em px de uma tela de 430 de largura; a margem lateral encolhe um pouco em telas menores. */

@font-face {
  font-family: 'Geologica';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/geologica-latin-wght-normal.woff2') format('woff2');
}

/* ── 1. Tokens ─────────────────────────────────────────────────────────── */
:root {
  --sans: 'Geologica', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: var(--sans);
  --page: #f5f5f5;
  --surface: #ffffff;
  --tile: #f5f5f5;
  --tile-2: #eeeeee;
  --line: #ebebeb;
  --line-2: #e0e0e0;
  --hair: #f0f0f0;
  --text: #121212;
  --soft: #616161;
  --mute: #7a7a7a;
  --faint: #9e9e9e;
  --ink: #121212;
  --black: #000000;
  --on-ink: #ffffff;
  --ink-soft: #9e9e9e;
  --tab: #222222;
  --lime: #baff1a;
  --on-lime: #121212;
  --lime-ink: #baff1a;
  --lime-soft: #e8ffb2;
  --link: #476600;
  --link-dark: #8fcc00;
  --pos: #006c3b;
  --ok: #0f852c;
  --neg: #dd375b;
  --warn: #cc7e00;
  --vio: #6e08f2;
  --vio-soft: #ede5ff;
  --vio-text: #7c3eff;
  --green: var(--pos);
  --green-2: var(--pos);
  --green-deep: var(--pos);
  --gold: var(--text);
  --gold-2: var(--text);
  --gold-deep: var(--text);
  --red: var(--neg);
  --pos-bg: #e6f4ea;
  --warn-bg: #fff5e5;
  --neg-bg: #ffe5e8;
  --info-bg: var(--vio-soft);
  --bg: var(--page);
  --bg-2: var(--surface);
  --card: var(--surface);
  --card-2: var(--surface);
  --radius: 16px;
  --radius-sm: 8px;
  --shadow: none;
  --float: 0 6px 24px rgba(0, 0, 0, 0.08);
  --nav-h: 70px;
  --gutter: clamp(20px, 5.6vw, 24px);
  --fast: 160ms;
  --std: 280ms;
  --out: cubic-bezier(0.19, 1, 0.22, 1);
  --inout: cubic-bezier(0.455, 0.03, 0.515, 0.955);
}
:root[data-theme='dark'] {
  --page: #090909;
  --surface: #121212;
  --tile: #1c1c1c;
  --tile-2: #222222;
  --line: #2a2a2a;
  --line-2: #383838;
  --hair: #222222;
  --text: #f8f8f8;
  --soft: #c7c7c7;
  --mute: #9e9e9e;
  --faint: #7a7a7a;
  --ink: #222222;
  --black: #f8f8f8;
  --on-ink: #ffffff;
  --tab: #f8f8f8;
  --link: #baff1a;
  --pos: #7ee2a8;
  --ok: #46c56a;
  --neg: #ff6678;
  --warn: #ffb133;
  --vio-soft: #2d0363;
  --vio-text: #ba99ff;
  --pos-bg: #0f2a1a;
  --warn-bg: #33250a;
  --neg-bg: #33000a;
  --float: 0 6px 24px rgba(0, 0, 0, 0.5);
}

html, body { background: var(--page); }
body { font-family: var(--sans); font-weight: 500; font-size: 14px; line-height: 1.4; color: var(--text); font-variant-numeric: normal; -webkit-font-smoothing: antialiased; }
body * { letter-spacing: 0 !important; }
.app { background: var(--page); }
.ico { stroke-width: 1.5; }
.sim-banner { display: none; }
::selection { background: var(--lime); color: var(--on-lime); }

/* ── 2. Casca ──────────────────────────────────────────────────────────── */
/* Cabecalho da home: avatar 43 + saudacao + icones soltos. */
.hd { padding: calc(18px + env(safe-area-inset-top)) var(--gutter) 0; gap: 12px; min-height: 0; }
.hd-me { gap: 9px; }
.hd .avatar { width: 43px; height: 43px; border-radius: 50%; font-size: 14px; font-weight: 700; color: var(--on-lime); background: var(--lime); box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--line); }
.hd-hello { line-height: 1.38; }
.hd-hello small { font-size: 12px; font-weight: 400; color: var(--text); }
.hd-hello b { font-size: 14px; font-weight: 500; }
.hd-actions { gap: 0; margin-right: -10px; }
.hd-btn { width: 40px; height: 40px; }
.hd-btn .ico { width: 21px; height: 21px; stroke-width: 1.5; }
.hd-dot { top: 8px; right: 9px; width: 8px; height: 8px; background: #f83a53; border: 0; }

/* Abas em pilula: so a ativa tem fundo. */
.pilltabs { gap: 0; padding: 31px calc(var(--gutter) - 0px) 16px; }
.pilltabs button, .pilltabs a { min-height: 30px; padding: 0 13px; font-size: 14px; font-weight: 500; color: var(--soft); transition: background var(--std) var(--out), color var(--fast); }
.pilltabs .on { color: #fff; background: var(--tab); font-weight: 500; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18); }
:root[data-theme='dark'] .pilltabs .on { color: #121212; }

/* Folha branca: sobe ate o fim da tela. */
main.view { gap: 0; margin-top: 0; padding: 28px var(--gutter) calc(var(--nav-h) + 70px + env(safe-area-inset-bottom)); background: var(--surface); border-radius: 24px 24px 0 0; min-height: calc(100dvh - 182px); box-shadow: none; }
.hd + .offline-bar + main.view { margin-top: 24px; }
main.view > * + * { margin-top: 16px; }
main.view > *, main.view > *:nth-child(n) { animation: none; }
.k-in main.view > * { animation: kRise var(--std) var(--out) backwards; animation-delay: calc(var(--i, 0) * 36ms); }
/* Quem tem barra fixa dentro so esmaece: transform no pai prenderia a barra fixa a ele. */
.k-in main.view > form, .k-in main.view > :has(.k-cta-bar) { animation-name: kFade; }
.k-cta-bar { animation: none !important; }
.k-in main.view > *:nth-child(1) { --i: 0; } .k-in main.view > *:nth-child(2) { --i: 1; } .k-in main.view > *:nth-child(3) { --i: 2; }
.k-in main.view > *:nth-child(4) { --i: 3; } .k-in main.view > *:nth-child(5) { --i: 4; } .k-in main.view > *:nth-child(6) { --i: 5; }
.k-in main.view > *:nth-child(n + 7) { --i: 6; }
main.view.still > * { animation: none !important; }
@keyframes kRise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes kFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes kPop { 0% { transform: scale(0.6); opacity: 0; } 70% { transform: scale(1.06); opacity: 1; } 100% { transform: scale(1); } }
@keyframes kDraw { to { stroke-dashoffset: 0; } }
@keyframes kPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

/* Telas internas (abas e telas empurradas): fundo branco inteiro, barra com voltar e acao. */
.app.inner, .app.inner main.view { background: var(--surface); }
html:has(.app.inner), html:has(.app.inner) body { background: var(--surface); }
.app.inner main.view { border-radius: 0; padding-top: 4px; min-height: 0; }
.app.push main.view { padding-bottom: calc(118px + env(safe-area-inset-bottom)); }
.k-top { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 40px 1fr auto; align-items: center; min-height: 52px; padding: calc(8px + env(safe-area-inset-top)) calc(var(--gutter) - 10px) 0; background: var(--surface); }
.k-top-t { justify-self: center; font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-top-r { display: flex; align-items: center; justify-content: flex-end; min-width: 40px; }
.k-ic { position: relative; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--text); transition: background var(--fast), transform var(--fast); }
.k-ic .ico { width: 22px; height: 22px; stroke-width: 1.5; }
.k-ic:active { background: var(--tile-2); transform: scale(0.9); }
.k-ic.lime { background: var(--lime-soft); color: #243300; }
.k-ic .avatar { width: 30px; height: 30px; border-radius: 50%; font-size: 11px; font-weight: 700; color: var(--on-lime); background: var(--lime); display: grid; place-items: center; }

/* Barra inferior flutuante + botao preto da acao principal. */
.dock { bottom: calc(8px + env(safe-area-inset-bottom)); width: min(calc(100% - var(--gutter) * 2), 432px); height: var(--nav-h); gap: 18px; }
.dock::before { content: ''; position: fixed; left: 50%; bottom: calc(-8px - env(safe-area-inset-bottom)); transform: translateX(-50%); width: 100vw; max-width: 480px; height: calc(var(--nav-h) + 62px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--surface) 92%, transparent) 46%, var(--surface)); pointer-events: none; z-index: -1; }
.dock-pill { padding: 0 8px; border-radius: 17px; background: var(--surface); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.03); }
:root[data-theme='dark'] .dock-pill { background: #1c1c1c; box-shadow: 0 0 0 1px var(--line), 0 10px 28px rgba(0, 0, 0, 0.6); }
.dock-pill a { gap: 7px; font-size: 11px; font-weight: 500; color: var(--faint); }
.dock-pill a .ico { width: 21px; height: 21px; stroke-width: 1.5; }
.dock-pill a.on { color: var(--text); font-weight: 500; }
.dock-pill a.on .ico { stroke-width: 1.9; }
.dock-cta { flex: 0 0 80px; gap: 7px; border-radius: 17px; font-size: 11.5px; font-weight: 500; color: #e0e0e0; background: #0f0f0f; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22); }
:root[data-theme='dark'] .dock-cta { background: #222; box-shadow: 0 0 0 1px var(--line-2), 0 10px 28px rgba(0, 0, 0, 0.6); }
.dock-ring { width: 22px; height: 22px; padding: 3px; background: conic-gradient(from 200deg, #baff1a, #ffd23a, #baff1a 70%, #7c3eff, #baff1a); box-shadow: 0 0 0 4px rgba(124, 62, 255, 0.18); }
.dock-ring b { background: #0f0f0f; }
.dock-ring .ico { display: none; }
.app.push .dock { display: none; }
.app.push .dock::before { display: none; }

/* Aviso flutuante. */
.snack { bottom: calc(var(--nav-h) + 66px + env(safe-area-inset-bottom)); width: min(calc(100% - 32px), 448px); gap: 15px; min-height: 74px; padding: 0 24px 0 19px; border-radius: 18px; color: #fff; background: #121212; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28); }
:root[data-theme='dark'] .snack { background: #222; }
.snack > .ico { width: 22px; height: 22px; stroke-width: 1.5; }
.snack-txt { line-height: 1.5; }
.snack-txt b { font-size: 13.5px; font-weight: 500; }
.snack-txt small { font-size: 13.5px; font-weight: 400; color: #9e9e9e; }
.snack-go { font-size: 13.5px; font-weight: 500; color: var(--link-dark); text-decoration: underline; text-underline-offset: 3px; }

/* ── Home ──────────────────────────────────────────────────────────────── */
.bal { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 32px; padding-right: 8px; }
.bal-main { display: flex; flex-direction: column; min-width: 0; }
.bal-value { font-size: 22px; font-weight: 700; line-height: 1.25; color: var(--text); }
.bal-note { display: none; }
.bal > .ico { width: 18px; height: 18px; stroke-width: 2; flex: none; }
main.view > .strip { margin-top: 18px; }
.strip { display: flex; gap: 8px; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.strip-card { flex: 0 0 calc(100% - 39px); scroll-snap-align: start; display: flex; align-items: center; gap: 16px; min-height: 63px; padding: 0 24px 0 20px; border-radius: 16px; background: var(--tile); box-shadow: none; border: 0; }
.strip-ico { flex: none; width: 28px; height: 28px; display: grid; place-items: center; color: var(--text); }
.strip-ico .ico { width: 24px; height: 24px; }
.strip-ico .coin { width: 28px; height: 28px; }
.strip-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.strip-txt small { font-size: 12px; font-weight: 400; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip-txt b { font-size: 14px; font-weight: 500; color: var(--text); }
.strip-card > .ico { width: 14px; height: 14px; stroke-width: 2; color: var(--text); }
main.view > .acts { margin-top: 31px; }
.acts { display: flex; gap: 31px; margin-inline: calc(var(--gutter) * -1); padding: 0 var(--gutter) 2px; overflow-x: auto; scrollbar-width: none; }
.acts::-webkit-scrollbar { display: none; }
.act { flex: 0 0 55px; display: flex; flex-direction: column; align-items: center; gap: 11px; font-size: 14px; font-weight: 500; color: var(--soft); white-space: nowrap; }
.act > span:last-child { display: block; width: max-content; }
.act-disc { position: relative; width: 55px; height: 55px; border-radius: 50%; display: grid; place-items: center; color: var(--text); background: var(--tile-2); box-shadow: none; transition: transform var(--fast) var(--out); }
.act:active .act-disc { transform: scale(0.94); }
.act-disc .ico { width: 21px; height: 21px; stroke-width: 1.5; }
.act-new { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); min-width: 40px; height: 18px; padding: 0 7px; border-radius: 9px; display: grid; place-items: center; font-size: 11px; font-weight: 500; font-style: normal; color: var(--on-lime); background: var(--lime); animation: none; box-shadow: none; }
main.view > .banners { margin-top: 38px; }
.banners { display: flex; gap: 15px; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.banners::-webkit-scrollbar { display: none; }
.bn { position: relative; flex: 0 0 min(278px, 72vw); height: 141px; scroll-snap-align: start; border-radius: 14px; overflow: hidden; display: block; text-align: left; color: #fff; background-color: #151515; box-shadow: none; border: 0; }
.bn-title { position: absolute; left: 16px; bottom: 15px; width: 46%; font-size: 13.5px; font-weight: 500; line-height: 20px; color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5); }
.bn-btn { position: absolute; right: 16px; bottom: 16px; min-width: 96px; height: 34px; padding: 0 16px; border-radius: 17px; display: grid; place-items: center; font-size: 13.5px; font-weight: 500; color: #121212; background: #f1f1f1; white-space: nowrap; box-shadow: none; }
.bn-tag { position: absolute; left: 12px; top: 12px; height: 20px; padding: 0 8px; border-radius: 10px; display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 500; color: #fff; background: rgba(0, 0, 0, 0.42); backdrop-filter: blur(6px); }
.rail-dots { display: none; }
.sec { margin-top: 37px !important; font-size: 17px; font-weight: 700; color: var(--text); }
main.view > .sec + * { margin-top: 18px; }

/* "Sua conta": cartao com contorno; linha = nome pequeno em cima, valor embaixo, pilula a direita. */
.acct { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: none; padding: 0; overflow: hidden; }
.acct-row { display: flex; align-items: center; gap: 12px; min-height: 76px; padding: 14px 16px; border: 0; border-top: 1px solid var(--hair); background: none; text-align: left; width: 100%; }
.acct-row:first-child { border-top: 0; }
.acct-ico { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--text); background: var(--tile); }
.acct-ico .ico { width: 20px; height: 20px; }
.acct-ico .coin { width: 40px; height: 40px; }
.acct-ico.brl, .acct-ico.bfi, .acct-ico.cow, .acct-ico.yield, .acct-ico.rw { color: var(--text); background: var(--tile); }
.acct-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.acct-txt b { font-size: 14px; font-weight: 500; color: var(--text); display: flex; align-items: center; gap: 6px; }
.acct-txt small { font-size: 12px; font-weight: 400; color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-val { flex: none; font-size: 14px; font-weight: 500; color: var(--text); }
.acct-val .up { color: var(--pos); }
.acct-row > .ico { flex: none; width: 14px; height: 14px; stroke-width: 2; color: var(--faint); }
.acct-row.prod { min-height: 84px; padding: 16px; }
.acct-row.prod .acct-txt { gap: 6px; }
.acct-row.prod .acct-txt b { font-size: 13px; font-weight: 500; }
.acct-row.prod .acct-txt strong { font-size: 17px; font-weight: 500; color: var(--text); }
.acct-row.prod .acct-txt strong .up { color: var(--pos); }
.acct-row.prod .acct-txt small { font-size: 12px; }
.pill-btn { flex: none; height: 34px; padding: 0 16px; border-radius: 17px; font-size: 13px; font-weight: 500; color: var(--text); background: var(--tile-2); transition: transform var(--fast); }
.pill-btn:active { transform: scale(0.96); }
.info-i { width: 17px; height: 17px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 11px; font-weight: 500; font-style: normal; color: var(--vio-text); border: 1.5px solid var(--vio-text); background: none; }
.acct-alloc { padding: 16px; border-top: 1px solid var(--hair); }
.alloc { height: 8px; border-radius: 4px; background: var(--tile-2); }
.c-brl { background: #c7c7c7; } .c-bfi { background: var(--text); } .c-cow { background: var(--lime); }

/* Palco do curral e blocos da home viva: cartao com contorno, sem sombra. */
.stage { border-radius: 14px; box-shadow: none; }
.shorts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.short { min-height: 0; padding: 16px; border-radius: 16px; background: var(--tile); border: 0; box-shadow: none; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; }
.short-ico { width: 24px; height: 24px; margin-bottom: 10px; background: none; color: var(--text); display: grid; place-items: center; border-radius: 0; }
.short-ico .ico { width: 22px; height: 22px; }
.short b { font-size: 14px; font-weight: 500; }
.short small { font-size: 12px; font-weight: 400; color: var(--mute); }

/* ── 3. Kit das telas internas ─────────────────────────────────────────── */
.k-h1 { font-size: 26px; font-weight: 700; line-height: 1.2; color: var(--text); margin-top: 10px !important; }
.k-sub { margin-top: 8px !important; font-size: 14px; font-weight: 400; color: var(--mute); }
.k-lbl { display: block; font-size: 13px; font-weight: 500; color: var(--text); }
.k-note { font-size: 12px; font-weight: 400; line-height: 1.5; color: var(--mute); }
.k-note b { font-weight: 500; color: var(--soft); }
.k-h2 { margin-top: 32px !important; font-size: 17px; font-weight: 700; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.k-h2 a, .k-h2 button { font-size: 13px; font-weight: 500; color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
:root[data-theme='dark'] .k-h2 a { color: var(--link-dark); }

.k-tag { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 12px; font-size: 12px; font-weight: 500; color: var(--vio-text); background: var(--vio-soft); white-space: nowrap; }
.k-tag .ico { width: 14px; height: 14px; }
.k-tag.lime { color: var(--on-lime); background: var(--lime); }
.k-tag.grey { color: var(--soft); background: var(--tile-2); }
.k-tag.pos { color: var(--pos); background: var(--pos-bg); }
.k-tag.warn { color: var(--warn); background: var(--warn-bg); }
.k-tag.neg { color: var(--neg); background: var(--neg-bg); }

.k-card { display: block; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); padding: 16px; }
.k-card.flush { padding: 0; overflow: hidden; }
.k-card.tile { border: 0; background: var(--tile); }
a.k-card, button.k-card { text-align: left; width: 100%; transition: transform var(--fast), background var(--fast); }
a.k-card:active, button.k-card:active { transform: scale(0.985); background: var(--tile); }
.k-card > * + * { margin-top: 12px; }
.k-card.flush > * + * { margin-top: 0; }
.k-rows > * + * { border-top: 1px solid var(--hair); }
.k-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 48px; padding: 10px 16px; font-size: 14px; }
.k-row > span { font-weight: 400; color: var(--mute); }
.k-row > b { font-weight: 500; text-align: right; color: var(--text); }
.k-row > b.pos { color: var(--pos); } .k-row > b.neg { color: var(--neg); }
.k-row.big > b { font-size: 22px; font-weight: 700; }

/* Linha de lista: icone em circulo, titulo + apoio, valor a direita com status embaixo. */
.k-list > * + * { border-top: 1px solid var(--hair); }
.k-item { display: flex; align-items: center; gap: 12px; min-height: 68px; padding: 12px 0; width: 100%; text-align: left; }
.k-card.flush .k-item { padding-inline: 16px; }
a.k-item:active, button.k-item:active { background: var(--tile); }
.k-item-ic { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--text); background: var(--tile); font-size: 13px; font-weight: 700; }
.k-item-ic .ico { width: 19px; height: 19px; }
.k-item-ic.in { color: var(--pos); } .k-item-ic.out { color: var(--text); }
.k-item-ic svg.cow-avatar, .k-item > svg.cow-avatar { width: 40px; height: 40px; flex: none; }
.k-item-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.k-item-t b { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-item-t small { font-size: 12px; font-weight: 400; color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-item-v { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font-size: 14px; font-weight: 500; }
.k-item-v small { font-size: 12px; font-weight: 400; color: var(--mute); }
.k-item-v .pos, .k-item-v.pos { color: var(--pos); } .k-item-v .neg { color: var(--neg); } .k-item-v .warn { color: var(--warn); }
.k-item > .ico { flex: none; width: 14px; height: 14px; stroke-width: 2; color: var(--faint); }
.k-date { margin-top: 20px !important; font-size: 12px; font-weight: 400; color: var(--mute); }
.k-date + .k-list { margin-top: 2px; }

/* Botoes. */
.k-cta { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px; padding: 0 22px; border-radius: 26px; font-size: 15px; font-weight: 500; color: #fff; background: var(--black); transition: transform var(--fast) var(--out), opacity var(--fast); }
:root[data-theme='dark'] .k-cta { color: #121212; }
.k-cta:active { transform: scale(0.975); }
.k-cta[disabled], .k-cta[aria-disabled='true'] { opacity: 0.32; pointer-events: none; }
.k-cta .ico { width: 18px; height: 18px; }
.k-btn2 { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 0 18px; border-radius: 20px; font-size: 14px; font-weight: 500; color: var(--text); background: var(--tile-2); transition: transform var(--fast); white-space: nowrap; }
.k-btn2:active { transform: scale(0.96); }
.k-btn2 .ico { width: 17px; height: 17px; }
.k-btn2.lime { color: #243300; background: var(--lime-soft); }
.k-btn2.wide { width: 100%; min-height: 52px; border-radius: 26px; font-size: 15px; }
.k-link { font-size: 14px; font-weight: 500; color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
:root[data-theme='dark'] .k-link { color: var(--link-dark); }
.k-link.center { display: block; text-align: center; width: 100%; padding: 10px; }
.k-cta-bar { position: fixed; left: 50%; bottom: 0; z-index: 25; transform: translateX(-50%); width: min(100%, 480px); display: flex; flex-direction: column; gap: 10px; padding: 14px var(--gutter) calc(16px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, transparent, var(--surface) 26%); }
.k-btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Chips e controle segmentado. */
.k-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.k-chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
.k-chips.scroll::-webkit-scrollbar { display: none; }
.k-chips.center { justify-content: center; }
.k-chip { flex: none; min-height: 34px; padding: 0 14px; border-radius: 17px; font-size: 13.5px; font-weight: 500; color: var(--text); background: var(--surface); border: 1px solid var(--line-2); transition: background var(--fast), border-color var(--fast), transform var(--fast); }
.k-chip:active { transform: scale(0.95); }
.k-chip.on { background: var(--tile-2); border-color: var(--text); }
.k-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: 24px; background: var(--tile-2); }
.k-seg button { min-height: 40px; border-radius: 20px; font-size: 14px; font-weight: 500; color: var(--soft); transition: background var(--std) var(--out), color var(--fast), box-shadow var(--std); }
.k-seg button.on { color: var(--text); background: var(--surface); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); }
:root[data-theme='dark'] .k-seg button.on { background: #383838; }

/* Campos. */
.k-field { display: flex; flex-direction: column; gap: 8px; font-size: 13px; font-weight: 500; color: var(--text); }
.k-field input, .k-field select { width: 100%; min-height: 52px; padding: 0 16px; border-radius: 8px; border: 1px solid transparent; font: 500 16px var(--sans); color: var(--text); background: var(--tile-2); outline: none; transition: border-color var(--fast), background var(--fast); }
.k-field input:focus, .k-field select:focus { border-color: var(--text); background: var(--surface); }
.k-field input::placeholder { color: var(--faint); }
.k-field.xl input { min-height: 72px; font-size: 30px; }
.k-form { display: flex; flex-direction: column; gap: 16px; }
.k-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.k-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.k-stat { display: flex; flex-direction: column; gap: 5px; padding: 14px; border-radius: 16px; background: var(--tile); min-width: 0; }
.k-stat small { font-size: 12px; font-weight: 400; color: var(--mute); }
.k-stat b { font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-stat b.pos { color: var(--pos); } .k-stat b.neg { color: var(--neg); }
.k-stat i { font-style: normal; font-size: 12px; font-weight: 400; color: var(--mute); }
.k-range { display: flex; flex-direction: column; gap: 10px; font-size: 13px; font-weight: 500; }
.k-range > span { display: flex; justify-content: space-between; }
.k-range input[type='range'] { width: 100%; height: 28px; accent-color: var(--text); background: none; }

/* Valor grande + teclado numerico. */
.k-amt { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 34px 0 6px; text-align: center; }
.k-amt-v { display: flex; align-items: baseline; justify-content: center; gap: 10px; font-size: 44px; font-weight: 500; line-height: 1.1; color: var(--text); transition: transform var(--fast) var(--out); }
.k-amt-v.zero { color: var(--faint); }
.k-amt-v.s { font-size: 36px; } .k-amt-v.xs { font-size: 29px; }
.k-amt-v.bump { transform: scale(1.035); }
.k-amt-v.shake { animation: kShake 0.32s; }
@keyframes kShake { 25% { transform: translateX(-6px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }
.k-amt-s { min-height: 20px; font-size: 14px; font-weight: 400; color: var(--mute); }
.k-amt-s b { font-weight: 500; color: var(--text); }
.k-amt-s.err { color: var(--neg); }
.k-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px 10px; margin-top: 14px !important; user-select: none; -webkit-user-select: none; }
.k-keys button { height: 58px; border-radius: 16px; display: grid; place-items: center; font-size: 26px; font-weight: 500; color: var(--text); transition: background var(--fast), transform var(--fast); touch-action: manipulation; }
.k-keys button:active, .k-keys button.hit { background: var(--tile-2); transform: scale(0.94); }
.k-keys button .ico { width: 26px; height: 26px; }
.k-keys button.ghost { pointer-events: none; }

/* Troca: duas pontas. */
.k-ends { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.k-end { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 16px; background: var(--tile); min-width: 0; }
.k-end small { font-size: 12px; font-weight: 400; color: var(--mute); }
.k-end b { font-size: 16px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-end .k-tok { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; }
.k-tok i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 10px; font-weight: 700; color: #fff; background: var(--ink); }
.k-tok .coin { width: 24px; height: 24px; }
.k-ends-go { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--text); background: var(--surface); border: 1px solid var(--line-2); }
.k-ends-go .ico { width: 16px; height: 16px; stroke-width: 2; animation: kNudge 1.6s var(--inout) infinite; }
@keyframes kNudge { 0%, 100% { transform: translateX(-2px); } 50% { transform: translateX(3px); } }

/* Sucesso / recibo. */
.k-done { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 56px 0 8px; text-align: center; }
.k-done-ok { width: 76px; height: 76px; color: var(--ok); animation: kPop 0.5s var(--out) both; }
.k-done-ok circle { fill: none; stroke: currentColor; stroke-width: 3; }
.k-done-ok path { fill: none; stroke: currentColor; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 30; stroke-dashoffset: 30; animation: kDraw 0.42s 0.28s var(--out) forwards; }
.k-done h1 { font-size: 22px; font-weight: 700; }
.k-done p { max-width: 300px; font-size: 14px; font-weight: 400; color: var(--mute); }
.k-done-v { font-size: 30px; font-weight: 500; color: var(--pos); }

/* Circulos pretos de acao (hub). */
.k-discs { display: flex; justify-content: space-around; gap: 8px; padding: 6px 0; }
.k-disc { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 9px; font-size: 12.5px; font-weight: 500; color: var(--text); text-align: center; }
.k-disc i { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--ink); transition: transform var(--fast) var(--out); }
.k-disc:active i { transform: scale(0.93); }
.k-disc i .ico { width: 20px; height: 20px; }

/* Valor centrado (carteira, investimentos). */
.k-hero { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px 0 6px; text-align: center; }
.k-hero small { font-size: 13px; font-weight: 400; color: var(--mute); }
.k-hero b { font-size: 34px; font-weight: 700; line-height: 1.15; }

/* Barra de progresso, esqueleto e vazio. */
.bar { height: 6px; border-radius: 3px; background: var(--tile-2); box-shadow: none; }
.bar i { border-radius: 3px; background: var(--text); box-shadow: none; }
.bar.green i { background: #2ec721; } .bar.gold i { background: var(--text); } .bar.blue i { background: #7c3eff; }
.skeleton { border-radius: 16px; background: var(--tile-2); animation: kPulse 1.2s var(--inout) infinite !important; }
.skeleton.hero-skel { height: 34px; width: 46%; border-radius: 8px; }
.skeleton.line { height: 63px; width: 100%; border-radius: 16px; }
.skeleton.block { height: 76px; }
.k-empty { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 36px 16px; text-align: center; }
.k-empty-ic { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; color: var(--faint); background: var(--tile); }
.k-empty-ic .ico { width: 30px; height: 30px; }
.k-empty p { max-width: 280px; font-size: 14px; font-weight: 400; color: var(--mute); }

/* Detalhe do boi. */
.k-cow { display: flex; align-items: center; gap: 14px; }
.k-cow svg.cow-avatar { width: 64px; height: 64px; flex: none; }
.k-cow .k-h1 { margin-top: 0 !important; font-size: 24px; }
.k-meter { display: flex; flex-direction: column; gap: 10px; }
.k-meter > div:not(.bar) { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; font-weight: 400; color: var(--mute); }
.k-step { display: grid; grid-template-columns: 52px 1fr 52px; align-items: center; gap: 12px; padding: 8px; border-radius: 8px; background: var(--tile-2); }
.k-step button { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--text); transition: transform var(--fast); }
.k-step button:active { transform: scale(0.92); }
.k-step button .ico { width: 20px; height: 20px; }
.k-step input { width: 100%; border: 0; background: none; outline: none; text-align: center; font: 500 30px var(--sans); color: var(--text); -moz-appearance: textfield; appearance: textfield; }
.k-step input::-webkit-outer-spin-button, .k-step input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* Entrada (login) e boas-vindas. */
.k-auth { min-height: 100dvh; display: flex; flex-direction: column; padding: calc(28px + env(safe-area-inset-top)) var(--gutter) calc(24px + env(safe-area-inset-bottom)); background: var(--surface); }
.k-auth-brand { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; }
.k-auth-brand .coin { width: 34px; height: 34px; }
.k-auth h1 { margin-top: 44px; font-size: 30px; font-weight: 700; line-height: 1.15; }
.k-auth > p { margin-top: 12px; font-size: 15px; font-weight: 400; color: var(--mute); }
.k-auth .k-seg { margin-top: 28px; }
.k-auth form { margin-top: 20px; flex: 1; display: flex; flex-direction: column; gap: 16px; }
.k-auth form .k-cta { margin-top: auto; }
.k-auth .k-note { margin-top: 14px; text-align: center; }
html:has(.k-auth), html:has(.k-auth) body { background: var(--surface); }

/* Folhas de baixo. */
.sheet-backdrop { background: rgba(0, 0, 0, 0.42); backdrop-filter: none; -webkit-backdrop-filter: none; animation: kFade var(--std) both; }
.sheet { gap: 16px; padding: 14px var(--gutter) calc(24px + env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0; background: var(--surface); border: 0; box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.16); animation: kSheet 0.38s var(--out) both; }
@keyframes kSheet { from { transform: translate(-50%, 100%); } to { transform: translate(-50%, 0); } }
.sheet h2 { font-size: 20px; font-weight: 700; text-align: left; }
.sheet-grip { height: 20px; margin: 0 0 -6px; }
.sheet-grip::after { width: 36px; height: 4px; border-radius: 2px; background: var(--line-2); }
.sheet-tile { min-height: 56px; border-radius: 16px; font-size: 13.5px; font-weight: 500; color: var(--text); background: var(--tile); border: 0; }
.sheet-tile .ico { color: var(--text); }
.sheet-tile.hot { color: var(--on-lime); background: var(--lime); }
.toast { top: calc(14px + env(safe-area-inset-top)); padding: 14px 18px; border-radius: 18px; font-size: 13.5px; font-weight: 500; color: #fff; background: #121212; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28); }
.toast.error { background: #b3002d; }
.toast.xp { color: var(--on-lime); background: var(--lime); }
.splash { background: var(--surface); }
.splash b { font-size: 26px; font-weight: 700; color: var(--text); }
.splash b em { color: var(--text); }
.splash small { font-size: 12px; font-weight: 400; text-transform: none; color: var(--mute); }
.splash img { width: 72px; height: 72px; filter: none; }
.offline-bar { font-weight: 500; background: #121212; }

/* ── Pecas antigas que continuam em uso, no desenho do spec ────────────── */
.title { font-size: 26px; font-weight: 700; }
.subtitle { font-size: 14px; font-weight: 400; color: var(--mute); }
.page-head { margin-top: 10px; }
.section, p.section { margin-top: 32px !important; font-size: 17px; font-weight: 700; color: var(--text); text-transform: none; }
.label { font-size: 12px; font-weight: 400; color: var(--mute); text-transform: none; }
.soft { font-weight: 400; color: var(--mute); }
.tiny { font-size: 12px; }
.num { font-family: var(--sans); font-weight: 500; font-size: 14px; }
.big { font-family: var(--sans); font-weight: 700; font-size: 26px; }
.gold-text { color: var(--text); } .green-text { color: var(--pos); } .red-text { color: var(--neg); }
.card { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: none; padding: 16px; }
.card.hero, .card.gold, .card.glass { border: 1px solid var(--line); background: var(--surface); box-shadow: none; }
.hero-glow { display: none; }
.card.flat { border: 0; background: var(--tile); }
.btn { min-height: 52px; border-radius: 26px; font-size: 15px; font-weight: 500; color: #fff; background: var(--black); border: 0; box-shadow: none; }
:root[data-theme='dark'] .btn { color: #121212; }
.btn .ico { width: 18px; height: 18px; }
.btn:active { transform: scale(0.975); }
.btn.ghost { color: var(--text); background: var(--tile-2); border: 0; }
.btn.gold { color: var(--on-lime); background: var(--lime); }
.btn.small { min-height: 40px; border-radius: 20px; font-size: 14px; padding: 0 18px; }
.btn[disabled] { opacity: 0.32; }
.btn-link { font-size: 14px; font-weight: 500; color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
.badge { height: 24px; padding: 0 9px; border-radius: 12px; font-size: 12px; font-weight: 500; text-transform: none; color: var(--soft); background: var(--tile-2); border: 0; }
.badge.green { color: var(--pos); background: var(--pos-bg); }
.badge.gold { color: var(--on-lime); background: var(--lime); }
.badge.red { color: var(--neg); background: var(--neg-bg); }
.chip { min-height: 34px; padding: 0 14px; border-radius: 17px; font-size: 13.5px; font-weight: 500; color: var(--text); background: var(--surface); border: 1px solid var(--line-2); box-shadow: none; }
.chip.on { color: var(--text); background: var(--tile-2); border-color: var(--text); }
.tabs { padding: 4px; border-radius: 24px; background: var(--tile-2); border: 0; }
.tabs button { min-height: 40px; border-radius: 20px; font-size: 14px; font-weight: 500; color: var(--soft); background: none; box-shadow: none; }
.tabs button.on { color: var(--text); background: var(--surface); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); }
.field { font-size: 13px; font-weight: 500; color: var(--text); gap: 8px; }
.field input, .field select { min-height: 52px; border-radius: 8px; border: 1px solid transparent; font: 500 16px var(--sans); color: var(--text); background: var(--tile-2); box-shadow: none; }
.field input:focus, .field select:focus { border-color: var(--text); background: var(--surface); box-shadow: none; }
.field input.money, input.money { font-family: var(--sans); font-weight: 500; font-size: 22px; }
.list > .row + .row, .timeline > .row + .row { border-top: 1px solid var(--hair); }
.entry-ico { width: 40px; height: 40px; border-radius: 50%; color: var(--text); background: var(--tile); border: 0; }
.entry-ico.in { color: var(--pos); background: var(--tile); } .entry-ico.out { color: var(--text); background: var(--tile); }
.kv .label { font-size: 12px; } .kv .num { font-size: 15px; font-weight: 500; }
.avatar.big { color: var(--on-lime); background: var(--lime); font-weight: 700; }
.xp-pill { color: var(--text); background: var(--tile-2); border: 0; font-weight: 500; }
.xp-pill.fire { color: #995e00; background: var(--warn-bg); }
.delta.up { color: var(--pos); background: var(--pos-bg); } .delta.down { color: var(--neg); background: var(--neg-bg); }
.icon-btn { background: var(--tile-2); border: 0; color: var(--text); box-shadow: none; }
.tile { border: 0; border-radius: 16px; background: var(--tile); box-shadow: none; }
.quick a { border: 0; background: none; box-shadow: none; font-weight: 500; }
.back { display: none; }
.ticker { border: 0; border-radius: 16px; background: var(--tile); box-shadow: none; }
.price-card .coin, .journey .coin { filter: none; }
.empty { color: var(--mute); }
.mono-small { font-family: var(--sans); font-size: 11.5px; color: var(--mute); }
.tl-dot { background: var(--text); box-shadow: none; }
.level-ring b { font-weight: 700; }
.next-mission { border: 0; border-radius: 16px; background: var(--tile); }
.next-ico { color: var(--on-lime); background: var(--lime); }
.node-dot { box-shadow: none; }

/* Boas-vindas: tela limpa, folha branca e botao preto. */
.ob { background: var(--page); }
.ob-body { gap: 12px; padding: 26px var(--gutter) calc(22px + env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0; background: var(--surface); box-shadow: none; }
.ob-body h2 { font-size: 26px; font-weight: 700; line-height: 1.2; }
.ob-body > p:not(.soft) { font-size: 15px; font-weight: 400; color: var(--mute); }
.ob-body > p b { font-weight: 500; color: var(--text); }
.ob-dots i.on { background: var(--text); } .ob-dots i.past { background: var(--line-2); }
.ob-chip { min-width: 108px; padding: 16px 12px; border-radius: 16px; font-size: 13px; font-weight: 500; background: var(--surface); border: 1px solid var(--line); box-shadow: none; }
.ob-arrow { color: var(--text); }
.ob-cow-ico { color: var(--lime); background: #121212; box-shadow: none; }
.ob-pill { font-weight: 500; border: 1px solid var(--line); box-shadow: none; }
.ob-fractions i.on { background: var(--lime); }

/* Complementos do kit. */
.k-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.k-head .k-h1 { margin-top: 0 !important; }
.k-quote { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.k-quote > div { display: flex; flex-direction: column; gap: 4px; }
.k-quote-v { font-size: 26px; font-weight: 700; line-height: 1.15; }
.k-meta { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; font-weight: 400; color: var(--mute); }
.k-animal .k-item { min-height: 0; padding: 0; }
main.view > .k-animal + .k-animal { margin-top: 10px; }
.k-pad { display: flex; flex-direction: column; }
.k-pad > * + * { margin-top: 14px; }
.k-pad .k-cta { margin-top: 12px; }
.k-note.center, .center { text-align: center; }
.k-tol { display: flex; flex-direction: column; gap: 10px; }
.k-item-ic.lime { color: var(--on-lime); background: var(--lime); }
.k-item-ic .coin { width: 40px; height: 40px; }
.k-item h2 { font-size: 20px; font-weight: 700; }
button.k-item { background: none; }
.k-json { white-space: normal !important; word-break: break-all; font-size: 11px !important; }
.k-item.audit { align-items: flex-start; }
.k-hero b.green-text { color: var(--pos); } .k-hero b.red-text { color: var(--neg); }
.versus > * + * { margin-top: 14px; }
.live-pill { display: inline-flex; align-items: center; gap: 5px; margin-left: 6px; padding: 0; font-size: 12px; font-weight: 400; color: var(--pos); background: none; border: 0; }
.live-pill i { width: 6px; height: 6px; border-radius: 50%; background: #2ec721; animation: kPulse 1.6s var(--inout) infinite; }
.live-pill.off { color: var(--faint); } .live-pill.off i { background: var(--faint); animation: none; }
#swap-rate.flash { color: var(--text); font-weight: 500; }
.slide { height: 56px; border-radius: 28px; background: #000; box-shadow: none; }
.slide-fill { border-radius: 28px; background: var(--lime); }
.slide-label { font-size: 15px; font-weight: 500; }
.slide-thumb { top: 4px; left: 4px; width: 48px; height: 48px; color: #121212; background: var(--lime); box-shadow: none; }
.slide-thumb .ico { width: 20px; height: 20px; stroke-width: 2; }
.slide[aria-disabled='true'] { background: var(--tile-2); }
.target input[type='range'] { width: 100%; accent-color: var(--text); }
.target .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.target .big { font-size: 22px; }
.alert-list { margin-top: 4px; }
.alert-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.chart-wrap { margin-inline: -4px; }
.k-card.you .k-item, .k-card.rank .k-item { min-height: 0; padding: 0; }
.k-form > .k-btn2.wide, form > .k-btn2.wide { margin-top: 4px; }
.sheet .k-list .k-item { min-height: 60px; }
.sheet > .k-item { min-height: 0; padding: 0; }
.sheet .k-amt { padding-top: 10px; }
.sheet .k-keys button { height: 52px; }
.who { color: var(--mute); }

@media (prefers-reduced-motion: reduce) {
  .k-in main.view > *, .k-done-ok, .k-done-ok path, .sheet, .sheet-backdrop, .k-ends-go .ico, .skeleton { animation: none !important; }
  .k-done-ok path { stroke-dashoffset: 0; }
  .k-amt-v, .k-cta, .act-disc, .k-keys button { transition: none !important; }
}

/* Boas-vindas: marca neutra e pontas maiores. */
.ob .brand, .ob .brand em { font-size: 20px; font-weight: 700; font-style: normal; color: var(--text); }
.ob-top .btn-link { color: var(--link); }
.ob-flow { gap: 12px; }
.ob-arrow.two { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); background: var(--surface); animation: none; }
.ob-arrow.two .ico { width: 16px; height: 16px; }
