/* App do lojista. Dois temas: escuro (grafite com laranja bitcoin) e claro
   (branco com o azul-marinho e o verde-água da DePay). theme.js põe data-theme no <html> antes
   da pintura. Sem fonte remota, para caber na CSP. */

:root,
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121214;
  --bg-top: #2a1a08;
  --surface: #1c1c20;
  --surface-2: #26262b;
  --surface-3: #313137;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.12);
  --ink: #f7f6f3;
  --ink-2: #dcdad4;
  --muted: #a6a4a0;
  --placeholder: #75736f;
  --accent: #ff9419;
  --accent-hover: #ffa53d;
  --accent-2: #ffad4a;
  --accent-soft: rgba(255, 148, 25, 0.14);
  --accent-line: rgba(255, 148, 25, 0.3);
  --on-accent: #1d1102;
  --brand-grad: linear-gradient(140deg, #ffb13b, #f7760d);
  --on-brand: #1d1102;
  --ok: #3fd18b;
  --ok-soft: rgba(63, 209, 139, 0.14);
  --warn: #f3b74f;
  --warn-soft: rgba(243, 183, 79, 0.13);
  --bad: #ff7a7a;
  --bad-soft: rgba(255, 122, 122, 0.13);
  --on-bad: #1b0f12;
  --tabs-bg: rgba(24, 24, 27, 0.92);
  --toast-bg: #f4f3ef;
  --toast-ink: #18181b;
  --qr-line: transparent;
  --shadow: none;
  --ghost-bg: var(--surface-2);
  --ghost-line: transparent;
  --opt-on-bg: var(--accent-soft);
  --opt-on-ink: var(--ink);
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 20px;
  --radius-sm: 14px;
  --tabs-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

:root[data-theme="light"] {
  /* Paleta DePay (QR/badge): azul-marinho #13223f e verde-água #12a69a. */
  color-scheme: light;
  --bg: #f3f6f8;
  --bg-top: #dcefed;
  --surface: #ffffff;
  --surface-2: #eef2f5;
  --surface-3: #e1e7ec;
  --line: rgba(19, 34, 63, 0.08);
  --line-strong: rgba(19, 34, 63, 0.16);
  --ink: #13223f;
  --ink-2: #2b3b57;
  --muted: #5a687d;
  --placeholder: #8e99a9;
  --accent: #0a7a92;
  --accent-hover: #086a80;
  --accent-2: #0e8c82;
  --accent-soft: rgba(18, 166, 154, 0.1);
  --accent-line: rgba(18, 166, 154, 0.35);
  --on-accent: #ffffff;
  --brand-grad: linear-gradient(140deg, #34c3d4, #0a7a92);
  --on-brand: #ffffff;
  --ok: #0e8a55;
  --ok-soft: rgba(14, 138, 85, 0.1);
  --warn: #a35f00;
  --warn-soft: rgba(230, 150, 20, 0.13);
  --bad: #c62828;
  --bad-soft: rgba(198, 40, 40, 0.08);
  --on-bad: #ffffff;
  --tabs-bg: rgba(255, 255, 255, 0.94);
  --toast-bg: #13223f;
  --toast-ink: #ffffff;
  --qr-line: rgba(19, 34, 63, 0.1);
  --shadow: 0 1px 2px rgba(19, 34, 63, 0.05), 0 4px 16px rgba(19, 34, 63, 0.05);
  --ghost-bg: #ffffff;
  --ghost-line: rgba(19, 34, 63, 0.2);
  --opt-on-bg: #0a7a92;
  --opt-on-ink: #ffffff;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
  /* Sem zoom de toque duplo. O pinch também fica travado pelo viewport. */
  touch-action: manipulation;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body {
  background: radial-gradient(120% 60% at 50% -10%, var(--bg-top) 0%, var(--bg) 60%) fixed;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

/* O iOS dá zoom sozinho ao focar um campo menor que 16px. */
input,
select,
textarea {
  font-size: max(16px, 1em);
}

button {
  cursor: pointer;
}

a {
  color: var(--accent-2);
}

code {
  font-family: var(--mono);
  background: var(--surface-2);
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 0.92em;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

.ico {
  width: 22px;
  height: 22px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ico-fill {
  fill: currentColor;
  stroke: none;
}

.sr,
.offscreen {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.offscreen {
  left: -9999px;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.875rem;
}

.center {
  text-align: center;
}

.center-block {
  display: block;
  margin: 8px auto 0;
}

.mono {
  font-family: var(--mono);
}

.break {
  word-break: break-all;
}

.pad {
  padding: 0 4px;
}

/* ---------- estrutura ---------- */

/* --app-h é a altura da área visível medida no JS (visualViewport). Depois
   que o teclado fecha, o 100dvh do celular pode ficar maior que a tela (app
   instalado no iPhone, Android de ponta a ponta) e o menu sumia abaixo dela. */
.app {
  height: 100%;
  height: 100dvh;
  height: min(100dvh, var(--app-h, 100dvh));
  max-height: 100dvh;
  max-height: min(100dvh, var(--app-h, 100dvh));
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.screen {
  flex: 1 1 auto;
  align-self: center;
  min-height: 0;
  width: 100%;
  max-width: 520px;
  padding: calc(16px + var(--safe-t)) 16px calc(var(--tabs-h) + 24px + var(--safe-b));
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
  overscroll-behavior: none;
}

.screen-scroll {
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.screen-account {
  gap: 14px;
  overflow: hidden;
  margin-bottom: calc(var(--tabs-h) + var(--safe-b));
  padding-bottom: var(--btn-gap-nav, 20px);
}

.screen-account > * {
  flex-shrink: 0;
}

/* Os cartões rolam. Sair fica parado, 20px acima do menu, como o botão do Cobrar. */
.screen-account > .account-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.screen-account > .account-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.screen-account .card {
  padding: 14px 16px;
}

/* Celular baixo (360x640): os cartões da Conta cabem sem rolar. Só as
   folgas diminuem (14px -> 10px); fonte, botões e ícones ficam iguais. */
@media (max-height: 680px) {
  .screen-account,
  .screen-account > .account-body {
    gap: 10px;
  }

  .screen-account .card {
    padding-top: 10px;
    padding-bottom: 10px;
  }
}


.screen-full {
  padding-bottom: calc(28px + var(--safe-b));
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 4px 4px;
}

.title {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.bar {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  padding: 2px 0 4px;
}

.bar h1 {
  margin: 0;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 600;
}

/* Dois botões à direita (QR e ⓘ): as colunas laterais iguais mantêm o título no centro. */
.bar-tools {
  grid-template-columns: 1fr auto 1fr;
}

.bar-tools > .icon-btn {
  justify-self: start;
}

.bar-tools > .account-tools {
  justify-self: end;
}

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: var(--surface);
  display: grid;
  place-items: center;
}

.label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
}

.label .ico {
  width: 18px;
  height: 18px;
}

/* ---------- botões ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: transform 0.08s ease, background 0.15s ease, opacity 0.15s ease;
}

.btn:active {
  transform: scale(0.985);
}

.btn[disabled] {
  opacity: 0.45;
  cursor: default;
  transform: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}

.btn-primary:hover:not([disabled]) {
  background: var(--accent-hover);
}

.btn-big {
  min-height: 58px;
  font-size: 1.05rem;
}

.btn-ghost {
  background: var(--ghost-bg);
  box-shadow: inset 0 0 0 1px var(--ghost-line);
  color: var(--ink);
}

.btn-ghost:hover {
  background: var(--surface-3);
}

.btn-danger {
  background: var(--bad);
  color: var(--on-bad);
}

.link {
  background: none;
  border: 0;
  padding: 4px 0;
  color: var(--accent-2);
  font-weight: 500;
  text-decoration: none;
}

/* ---------- formulários ---------- */

.form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.field > span,
.field > legend {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0;
  margin-bottom: 6px;
}

.field > span {
  margin-bottom: 0;
}

.field input {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  font-size: 1.05rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.field input::placeholder {
  color: var(--placeholder);
}

.field input:focus {
  border-color: var(--accent);
  background: var(--surface-3);
}

.field-inline input {
  min-height: 46px;
  font-size: 1rem;
}

.form-error {
  margin: 0;
  min-height: 0;
  color: var(--bad);
  font-size: 0.92rem;
}

.form-error:empty {
  display: none;
}

.opts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.opt {
  border: 1px solid var(--line-strong);
  background: transparent;
  border-radius: 999px;
  padding: 9px 15px;
  font-size: 0.95rem;
  color: var(--ink-2);
}

.opt.on {
  background: var(--opt-on-bg);
  border-color: var(--accent);
  color: var(--opt-on-ink);
  font-weight: 600;
}

/* ---------- entrar ---------- */

.app-auth {
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
}

/* Abertura, antes do JS: o mesmo fundo da primeira tela e o logo do tema.
   O claro (padrão) usa o DePay azul-marinho, não o logo branco. */
.boot {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.boot-mark {
  width: 200px;
  height: auto;
  /* O logo grande do meio só aparece se o app demorar. Quando abre rápido
     (o normal, com o cache), a splash do celular vai direto para o Cobrar,
     sem piscar o logo no meio por um instante. */
  animation: boot-in 0.25s ease-out 0.6s both;
}

@keyframes boot-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.auth {
  width: 100%;
  max-width: 420px;
  max-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
  padding: calc(48px + var(--safe-t)) 20px calc(32px + var(--safe-b));
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: var(--brand-grad);
  color: var(--on-brand);
  font-weight: 800;
}

.auth-title {
  margin: 18px 0 0;
  font-size: 1.85rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.auth-sub {
  margin: 0;
  color: var(--muted);
}

.auth-help {
  color: var(--muted);
  font-size: 0.9rem;
}

.auth-help p {
  margin: 0 0 10px;
}

.auth-help strong {
  color: var(--ink-2);
}

/* ---------- cobrar e sacar ---------- */

.amount {
  margin: 0;
  text-align: center;
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.amount-empty {
  color: var(--placeholder);
}

.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.key {
  min-height: 52px;
  border: 0;
  border-radius: 16px;
  background: var(--surface-2);
  font-size: 1.55rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  display: grid;
  place-items: center;
  transition: background 0.1s ease, transform 0.06s ease;
  user-select: none;
}

.key:active {
  background: var(--surface-3);
  transform: scale(0.97);
}

.key-soft {
  background: transparent;
  color: var(--muted);
  font-size: 1.15rem;
}

/* Valor grande do Sacar: o campo do teclado numérico do celular
   com a cara do valor (sem caixa; o cursor mostra que está digitando). */
.amount-input {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-family: inherit;
  caret-color: var(--accent);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.amount-input::placeholder {
  color: var(--placeholder);
  opacity: 1;
}

.pay-slide {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface-2);
}

.pay-slide .opt {
  border: 0;
  border-radius: 999px;
  background: transparent;
  padding: 8px 10px;
  font-size: 0.92rem;
}

.pay-slide .opt.on {
  background: var(--accent);
  color: var(--on-accent);
}

/* O texto ocupa sempre o lugar da versão em negrito: trocar Pix/Link não
   muda a quebra de linha nem a altura do seletor. */
.opt-l {
  display: grid;
  place-items: center;
  text-align: center;
}

.opt-l > span,
.opt-l::after {
  grid-area: 1 / 1;
}

.opt-l::after {
  content: attr(data-text);
  font-weight: 600;
  visibility: hidden;
}

/* ---------- QR ---------- */

.charge-live {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: stretch;
}

.screen-charge > .charge-live {
  flex: 1 1 auto;
}

/* O QR fica no grupo de cima. O botão vem logo depois do prazo, com a folga de 14px. */
.charge-live .qr-card {
  flex: none;
  margin: 0 auto;
}

.charge-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: none;
}

/* A bolinha fica ao lado da pílula, fora dela. A pílula é só o texto. */
.charge-status {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Tela estreita: "expira em 19:58" desce inteiro para a linha de baixo. */
.charge-status > .muted {
  white-space: nowrap;
}

.qr-card {
  background: #fff;
  box-shadow: 0 0 0 1px var(--qr-line);
  border-radius: 24px;
  padding: 18px;
  width: min(100%, 340px);
  aspect-ratio: 1;
  margin: 4px auto;
  display: grid;
  place-items: center;
}

.qr-card > svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* QR de depósito: o código fica quadrado e o prazo fica no branco, embaixo. */
.qr-card.qr-deposit {
  aspect-ratio: auto;
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 18px 18px 14px;
  margin: 0 auto;
}

.qr-card.qr-deposit > svg {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
}

.qr-deposit-exp {
  margin: 6px 0 0;
  text-align: center;
}

.qr-small {
  width: min(100%, 240px);
}

.qr-dim {
  opacity: 0.35;
}

.qr-loading {
  background: var(--surface);
}

.live-dot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

.load-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(19, 34, 63, 0.45);
}

.load-card {
  width: min(100%, 280px);
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.load-card p {
  margin: 0;
  font-weight: 600;
}

.spinner {
  display: inline-block;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid var(--surface-3);
  border-top-color: var(--accent-2);
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- resultado ---------- */

.result {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 26px 8px 10px;
}

.result h2 {
  margin: 6px 0 0;
  font-size: 1.45rem;
  letter-spacing: -0.01em;
}

.result p {
  margin: 0;
}

.result .btn {
  margin-top: 8px;
}

.result-icon {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--muted);
}

.result-icon .ico {
  width: 40px;
  height: 40px;
  stroke-width: 2.2;
}

.result-ok .result-icon {
  background: var(--ok-soft);
  color: var(--ok);
  animation: pop 0.35s ease-out;
}

.result-bad .result-icon {
  background: var(--bad-soft);
  color: var(--bad);
}

.result-wait .result-icon {
  background: var(--warn-soft);
  color: var(--warn);
}

.result-icon-soft {
  width: 64px;
  height: 64px;
  margin: 0 auto 8px;
  background: var(--accent-soft);
  color: var(--accent-2);
}

.result-icon-soft .ico {
  width: 30px;
  height: 30px;
}

@keyframes pop {
  0% {
    transform: scale(0.6);
    opacity: 0;
  }
  70% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ---------- status ---------- */

.pill {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}

.pill-ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.pill-wait {
  background: var(--warn-soft);
  color: var(--warn);
}

.pill-bad {
  background: var(--bad-soft);
  color: var(--bad);
}

.pill-off {
  background: var(--surface-2);
  color: var(--muted);
}

/* ---------- histórico ---------- */

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
}

.segmented button {
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 10px;
  font-weight: 600;
  color: var(--muted);
}

.segmented button.on {
  background: var(--surface-3);
  color: var(--ink);
}

/* O ponto do filtro fica no canto do botão. A linha é o .top (align-items: center). */
.hist-filter-btn {
  position: relative;
}

.hist-filter-btn.is-on {
  color: var(--accent);
}

.hist-filter-btn.is-on::after {
  content: "";
  position: absolute;
  top: 7px;
  right: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--bg);
}

/* Duas colunas quando o rótulo mais longo ("Pendentes", ~5.3em) cabe; senão uma. */
.hist-chips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, calc(65px + 5.6em)), 1fr));
  gap: 10px;
  margin-top: 4px;
}

.hist-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 52px;
  padding: 5px 10px 5px 5px;
  white-space: nowrap;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 600;
  text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.hist-chip .row-ico {
  transition: filter 0.15s ease, opacity 0.15s ease;
}

.hist-chip .row-ico-off {
  background: var(--surface-3);
}

.hist-chip.is-off {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--muted);
}

.hist-chip.is-off .row-ico {
  filter: grayscale(1);
  opacity: 0.4;
}

.history {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.day {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 6px 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.day-total {
  white-space: nowrap;
}

.rows {
  list-style: none;
  margin: 0;
  padding: 4px 0;
}

.rows li + li {
  border-top: 1px solid var(--line);
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  border: 0;
  background: transparent;
  text-align: left;
}

.row-ico {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--muted);
}

.row-ico .ico {
  width: 20px;
  height: 20px;
}

.row-ico-ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.row-ico-wait {
  background: var(--warn-soft);
  color: var(--warn);
}

.row-ico-bad {
  background: var(--bad-soft);
  color: var(--bad);
}

.row-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.row-title {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-sub {
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* A hora sai da legenda e fica sob o valor, na mesma linha do status.
   O status fica com a largura toda e não perde o fim para a hora. */
.row-side {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.row-time {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.45;
  white-space: nowrap;
}

.row-amount {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.row-amount.plus {
  color: var(--ok);
}

.row-skel {
  pointer-events: none;
}

.skel {
  display: block;
  background: var(--surface-2);
  border-radius: 10px;
  animation: pulse 1.4s ease-in-out infinite;
}

.skel-ico {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.skel-line {
  flex: 1;
  height: 14px;
}

.empty {
  text-align: center;
  padding: 28px 18px;
}

.empty p {
  margin: 0 0 4px;
}

/* ---------- saque ---------- */

.note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--accent-soft);
  border-color: var(--accent-line);
}

.note p {
  flex: 1;
  margin: 0;
  color: var(--ink-2);
  font-size: 0.92rem;
}

.note .ico {
  color: var(--accent-2);
  margin-top: 1px;
}

.note-close {
  flex: none;
  width: 28px;
  height: 28px;
  margin: -4px -6px 0 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
}

.note-close .ico {
  width: 16px;
  height: 16px;
  margin-top: 0;
  color: var(--muted);
}

.review .amount {
  text-align: left;
  margin-bottom: 10px;
}

.facts {
  margin: 0;
  display: flex;
  flex-direction: column;
}

.facts div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}

.facts div:first-child {
  border-top: 0;
}

.facts dt {
  color: var(--muted);
  font-size: 0.92rem;
}

.facts dd {
  margin: 0;
  text-align: right;
  font-weight: 500;
  word-break: break-word;
}

.code-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.code-card p {
  margin: 0;
}

.code-input {
  text-align: center;
  font-family: var(--mono);
  font-size: 1.9rem !important;
  letter-spacing: 0.45em;
  padding-left: calc(16px + 0.45em) !important;
}

.funding {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.funding p {
  margin: 0;
}

.funding-foot {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: auto;
}

/* Confirme o saque: "ou" entre as duas formas. */
.review-or {
  margin: 0;
}


.funding h2 {
  margin: 0;
  font-size: 1.25rem;
}

.steps {
  margin: 0;
  padding-left: 22px;
  color: var(--ink-2);
}

.steps li + li {
  margin-top: 6px;
}

.more summary {
  cursor: pointer;
  color: var(--accent-2);
  font-weight: 500;
  font-size: 0.92rem;
}

.more[open] {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.more p {
  margin: 0;
}

.warn {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--warn-soft);
  color: var(--warn);
}

.warn .ico {
  width: 18px;
  height: 18px;
  margin-top: 1px;
}

/* ---------- conta ---------- */

.profile-name {
  margin: 0;
  font-weight: 600;
  font-size: 1.05rem;
  word-break: break-all;
}

.account-id {
  padding-bottom: 0;
}

/* Sino e tema, do mesmo tamanho, à direita, centrados com o e-mail. */
.account-tools {
  display: flex;
  align-items: center;
  flex: none;
}

.account-tools > .info-btn-lg {
  margin-left: 0;
}

.addr {
  margin: 0;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.addr-copy {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.card > .btn + .btn,
.card > .btn,
.confirm .btn + .btn {
  margin-top: 10px;
}

.card > p.muted {
  margin: 0 0 4px;
}

.secret,
.confirm {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.secret p,
.confirm p {
  margin: 0;
}

.secret .mono {
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 0.9rem;
}

.card .link.small {
  display: inline-block;
  margin-top: 12px;
}

/* ---------- menu de baixo ---------- */

.tabs {
  position: fixed;
  left: 0;
  right: 0;
  /* --tabs-lift sobe o menu quando a área visível é mais baixa que a janela
     (app instalado, barra do navegador). Assim ele continua no pé da tela. */
  bottom: var(--tabs-lift, 0px);
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: calc(var(--tabs-h) + var(--safe-b));
  padding: 6px 8px var(--safe-b);
  background: var(--tabs-bg);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 14px;
}

.tab.on {
  color: var(--ink);
}

.tab.on .ico {
  color: var(--accent-2);
}

/* ---------- aviso ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabs-h) + 18px + var(--safe-b));
  transform: translate(-50%, 20px);
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--toast-bg);
  color: var(--toast-ink);
  font-weight: 500;
  font-size: 0.95rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 20;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Teclado aberto (classe "kb" no <html>, posta pelo app.js): sem menu fixo
   e login compacto, para o campo e o botão caberem acima do teclado. */
.kb:not(.sheet-lock) .tabs {
  display: none;
}

.kb:not(.sheet-lock) .screen {
  padding-bottom: calc(24px + var(--safe-b));
  overflow-y: auto;
  overscroll-behavior: contain;
}

.kb .toast {
  bottom: calc(18px + var(--safe-b));
}

.kb .auth {
  padding-top: calc(16px + var(--safe-t));
  gap: 12px;
}

.kb .auth > .auth-title,
.kb .auth > .auth-sub,
.kb .auth > .auth-help:not(.auth-keep) {
  display: none;
}

@media (min-width: 720px) {
  .tabs {
    left: 50%;
    right: auto;
    width: 520px;
    transform: translateX(-50%);
    bottom: 16px;
    height: var(--tabs-h);
    padding: 6px 8px;
    border: 1px solid var(--line);
    border-radius: 22px;
  }

  .screen {
    padding-top: 32px;
  }

  .screen-account {
    margin-bottom: 0;
    padding-bottom: calc(var(--tabs-h) + 26px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .wait-dots {
    width: 3ch;
  }
}

/* Reticências de espera: os pontos nascem um a um e somem. O vão é fixo
   para o texto não pular. "Quase lá" usa o ciclo 25% mais curto. */
.wait-slot {
  display: inline-block;
  width: 3ch;
  text-align: left;
  white-space: nowrap;
}

.wait-dots {
  display: inline-block;
  overflow: hidden;
  width: 0;
  vertical-align: bottom;
  animation: wait-ellipsis 1.2s steps(1, end) infinite;
}

.wait-dots::before {
  content: "...";
}

.wait-dots.is-fast {
  animation-duration: calc(1.2s * 0.75);
}

@keyframes wait-ellipsis {
  0% { width: 0; }
  25% { width: 1ch; }
  50% { width: 2ch; }
  75% { width: 3ch; }
  100% { width: 0; }
}

.card > .opts + p.muted {
  margin: 12px 0 0;
}

/* Chave da API antes da aprovação: área apagada, botão de pedido visível. */
.card-locked > .label,
.card-locked > .api-head > .label,
.card-locked > p.muted {
  opacity: 0.55;
}

.api-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 6px;
}

.api-head > .label {
  margin: 0;
}

/* Conta: o texto de "Usar como app" fica na linha do título, à direita. */
.install-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.install-head > .label {
  margin: 0;
  flex: none;
}

.install-head > .muted {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  text-align: right;
}

/* Logo DePay no lugar do "D" provisório. */
img.brand-mark {
  background: none;
  display: block;
}

/* Cobrar: "Gerar:" + ⓘ acima do Pix / Link de pagamento. */
.pay-gen {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 0 0 -4px;
}

.pay-gen-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.info-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  width: 28px;
  height: 28px;
  padding: 4px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.info-btn .ico {
  width: 18px;
  height: 18px;
}

.info-btn-lg {
  width: 40px;
  height: 40px;
  margin-left: auto;
}

.info-btn-lg .ico {
  width: 22px;
  height: 22px;
}

/* Pop-up (folha de baixo). */
.sheet-wrap {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: sheet-fade 0.18s ease-out;
}

.sheet {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--surface);
  color: var(--ink);
  border-radius: 24px 24px 0 0;
  padding: 22px 20px calc(22px + var(--safe-b));
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.18);
  animation: sheet-up 0.22s ease-out;
}

.sheet p {
  margin: 0 0 12px;
  line-height: 1.45;
}

/* Modal de instalar: o mesmo bloco da Conta, sem o fechar.
   O passo a passo usa o texto auxiliar, com a folga do sheet. */
.sheet-install.is-shown,
.sheet-install.is-shown .sheet {
  animation: none;
}

html[data-installed] .sheet-install {
  display: none !important;
}

.sheet-install .btn {
  margin-top: 10px;
}

.sheet-install p.muted {
  margin-top: 12px;
  text-align: center;
}

/* Título e fechar (ou só o fechar) na mesma linha, centros iguais. */
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
}

.sheet .sheet-head .sheet-title {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}

.sheet-close {
  flex: none;
  margin-left: auto;
  background: var(--surface-2);
}

.tut-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  margin: 4px -20px 0;
}

.tut-track::-webkit-scrollbar {
  display: none;
}

.tut-slide {
  flex: 0 0 100%;
  margin: 0;
  scroll-snap-align: center;
  display: flex;
  justify-content: center;
}

.tut-slide img {
  width: auto;
  max-width: calc(100% - 40px);
  max-height: 56vh;
  border-radius: 16px;
  border: 1px solid var(--line);
}

.tut-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 12px 0 14px;
}

.tut-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line-strong);
}

.tut-dots span.on {
  background: var(--accent);
  width: 18px;
  border-radius: 3px;
}

@keyframes sheet-up {
  from { transform: translateY(24px); opacity: 0.6; }
  to { transform: none; opacity: 1; }
}

@keyframes sheet-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Demo: simula o pedido de biometria do celular. */
.demo-bio {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.45);
}

.demo-bio-card {
  background: var(--surface);
  color: var(--ink);
  border-radius: 22px;
  padding: 22px 24px;
  max-width: 280px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

.demo-bio-card .ico {
  width: 44px;
  height: 44px;
  color: var(--accent);
}

.demo-bio-card p {
  margin: 8px 0 0;
}

/* Cabeçalho do login: "Maquininha" + logo DePay (versão do tema). */
.brand-word {
  height: 22px;
  width: auto;
  transform: translateY(3px);
}

/* O logo é o mesmo elemento do HTML de abertura, só muda de lugar.
   display:contents deixa os <img> na linha do cabeçalho, como antes. */
.brand-slot {
  display: contents;
}

.wordmark-hold {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

/* O translateY é só do login, ao lado de "Maquininha". */
.top .brand-word {
  transform: none;
}

/* No Cobrar o logo fica no centro da largura e no meio do vão até o card.
   O top vem do JS (--logo-dy). O tamanho continua 1,4× (22px). */
.screen-home > .top {
  justify-content: center;
}

.screen-home > .top .brand-word {
  position: relative;
  top: var(--logo-dy, 0px);
  height: calc(22px * 1.4);
}

.brand:has(.brand-word) {
  gap: 7px;
}

:root[data-theme="dark"] .brand-word-light,
:root[data-theme="light"] .brand-word-dark {
  display: none;
}

/* Pop-up do CPF aberto: o app fica com a altura de antes do teclado. */
.sheet-lock .app {
  height: var(--lock-h);
  max-height: var(--lock-h);
}

html.sheet-lock,
.sheet-lock body {
  overflow: hidden;
}

/* Saque: o campo do dono só aparece quando a chave não é CPF/CNPJ. */
.owner-field.is-off {
  display: none;
}

/* Cobrar e Sacar: o botão principal fica na base, 20px acima do menu fixo.
   O cabeçalho do Cobrar usa o mesmo .top do Sacar (padding e folga de 14px
   da tela).    O teclado e o valor continuam no card, o seletor e a descrição
   formam um grupo só. Em tela alta esse grupo desce um pouco em direção
   ao Gerar e a sobra fica em cima, perto do valor. Nada encolhe: em tela
   baixa a tela rola. No Sacar o valor fica no meio do espaço que sobra. */
.screen-home,
.screen-withdraw,
.screen-funding {
  overflow-y: auto;
  /* O menu é fixo e cobre o pé da janela: a tela termina nele, e o botão
     fica 20px acima. Assim o Gerar não fica por baixo do menu. */
  margin-bottom: calc(var(--tabs-h) + var(--safe-b));
  padding-bottom: var(--btn-gap-nav, 20px);
  scroll-padding-bottom: var(--btn-gap-nav, 20px);
}

.screen-home > *,
.screen-withdraw > *,
.screen-funding > * {
  flex-shrink: 0;
}

/* Funding: o QR saiu do corpo (abre pelo botão do cabeçalho). Nada rola.
   O Copiar endereço fica 20px acima do menu. Nada encolhe. */
.screen-funding {
  overflow: hidden;
}

.screen-funding > .funding-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.screen-funding > .funding-foot {
  flex: none;
  margin-top: 0;
}

/* O miolo do Cobrar cresce para as folgas; a folga até ele é a da tela (14px),
   a mesma do cabeçalho do Sacar. */
.screen-home > .charge-body {
  flex: 1 0 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.withdraw-form {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

.charge-body > .charge-pad {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
}

/* Sobra da tela alta: uma parte sobe para perto do valor, o teclado e o
   grupo descem juntos. A folga do grupo até o Gerar cresce um pouco menos
   que antes (1,9 contra 1 da folga do teclado). Em tela baixa a sobra é
   zero: as duas folgas ficam no mínimo de 12px e a tela rola, como antes. */
.charge-body > .charge-air {
  flex: 1 1 0;
  min-height: 0;
}

.charge-body > .charge-gap-a {
  flex: 1 1 0;
  min-height: 12px;
}

.charge-body > .charge-gap-b {
  flex: 1.9 1 0;
  min-height: 12px;
}

.withdraw-form {
  gap: 14px;
}

/* Teclado + valor: um grupo só. O valor fica 18px acima das teclas.
   O ⓘ fica sobreposto no canto, fora do fluxo: o card é o de antes. */
.charge-top {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px 16px 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* O lápis do Confirme o saque fica no canto do cartão, como o ⓘ do Cobrar:
   por cima, sem mexer no tamanho do cartão. */
.review {
  position: relative;
  /* Folga até o Confirmar com biometria: 14px do gap da tela + 21px = 35px. */
  margin-bottom: 21px;
}

.charge-top > .info-btn,
.review > .info-btn {
  position: absolute;
  top: 4px;
  right: 6px;
  z-index: 1;
  margin: 0;
}

.charge-head {
  display: flex;
  flex-direction: column;
}

/* Mínimo de 12px: em tela baixa a folga não zera, a tela rola, e o Gerar
   não começa por baixo do menu. */
.charge-gap {
  flex: 1 1 0;
  min-height: 12px;
}

.charge-form {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 16px;
}

.charge-foot {
  flex: 0 0 auto;
}

/* O erro tem linha própria, logo acima do botão: nunca por cima de outro
   campo. A sobra entre os grupos absorve a linha. */
.charge-foot > .form-error {
  margin: 0 0 10px;
  text-align: center;
}

.withdraw-hero {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.withdraw-hero > p {
  margin: 0;
}

.amount-field {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.amount-field > .label {
  margin: 0;
}

.amount-field > .form-error,
.withdraw-key > .form-error {
  text-align: center;
}

.withdraw-key {
  padding: 16px;
}

/* Erro logo acima do botão, como no Cobrar. */
.withdraw-form > .form-error {
  margin-bottom: -4px;
  text-align: center;
}

.kb:not(.sheet-lock) .screen-home,
.kb:not(.sheet-lock) .screen-withdraw,
.kb:not(.sheet-lock) .screen-funding,
.kb:not(.sheet-lock) .screen-account {
  margin-bottom: 0;
  padding-bottom: 10px;
}

@media (min-width: 720px) {
  .screen-home,
  .screen-withdraw,
  .screen-funding {
    margin-bottom: 16px;
    padding-bottom: calc(var(--tabs-h) + var(--btn-gap-nav, 20px));
  }
}

/* ---------- cadastro no app (sem Telegram) ---------- */

/* Sem sessão: boas-vindas, e-mail e código. Cabeçalho em cima, miolo que
   cresce, botão principal na base. Nada rola. */
.app-auth > .ob-auth {
  flex: 1 1 auto;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
  padding: calc(16px + var(--safe-t)) 20px calc(28px + var(--safe-b));
  gap: 0;
}

.ob-form {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.ob-head {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  flex: none;
}

.ob-head .bar-title {
  margin: 0;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 600;
}

/* Com sessão: voltar à esquerda, Sair discreto à direita, etapas embaixo. */
.screen-onboarding {
  padding-left: 20px;
  padding-right: 20px;
}

.ob-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  flex: none;
}

.ob-exit {
  font-size: 0.95rem;
  color: var(--muted);
}

.ob-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 20px;
}

.ob-center {
  justify-content: center;
  align-items: center;
  text-align: center;
}

.ob-foot {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 16px;
}

.ob-title {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.ob-text {
  margin: 0;
  color: var(--ink-2);
}

/* Título e ⓘ na mesma linha, centrados na vertical. */
.ob-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ob-title-row .info-btn-lg {
  margin-left: 0;
}

.ob-steps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  flex: none;
}

.ob-step {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.ob-step > i {
  display: block;
  height: 4px;
  border-radius: 2px;
  background: var(--surface-3);
}

.ob-step > span {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.ob-step .ico {
  width: 16px;
  height: 16px;
  stroke-width: 2.4;
}

.ob-step.is-on > i {
  background: var(--accent);
}

.ob-step.is-on > span {
  color: var(--ink);
}

.ob-step.is-done > i {
  background: var(--ok);
}

.ob-step.is-done > span {
  color: var(--ok);
}

.ob-hero {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.ob-hero .brand-word {
  height: 52px;
  transform: none;
}

.ob-hero p {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink-2);
}

.link-big {
  display: block;
  width: 100%;
  min-height: 48px;
  font-size: 1rem;
  text-align: center;
}

.sent-to {
  margin: 0;
  color: var(--ink-2);
}

.sent-to .link {
  padding: 0;
  margin-left: 4px;
}

/* Tutorial da carteira: os textos do bot e a faixa de fotos do "Como sacar",
   que fica com a altura que sobra (a foto encolhe, a tela não rola). */
.ob-tut {
  gap: 10px;
  padding-top: 16px;
}

.ob-tut .ob-text {
  flex: none;
}

.ob-center .ob-text {
  max-width: 34ch;
}

.ob-track {
  flex: 1 1 0;
  min-height: 0;
  margin: 2px -20px 0;
  overflow-y: hidden;
}

.ob-slide {
  height: 100%;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  min-height: 0;
}

.ob-slide img {
  display: block;
  width: auto;
  height: 100%;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.ob-tut .tut-dots {
  flex: none;
  margin: 0;
}

.field textarea {
  width: 100%;
  min-height: 112px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: 1.05rem;
  line-height: 1.45;
  color: var(--ink);
  resize: none;
  word-break: break-all;
}

.field textarea::placeholder {
  color: var(--placeholder);
}

.field textarea.is-bad {
  border-color: var(--bad);
}

.ob-body > .form-error:empty {
  display: none;
}

/* Pagamento inicial: as peças da tela do QR da cobrança. */
.ob-pay {
  gap: 12px;
  padding-top: 18px;
}

.screen-onboarding .result {
  flex: 1 1 auto;
  justify-content: center;
  padding: 0 8px;
}

/* Retomar: o que ainda falta, acima da etapa. */
.screen-onboarding .note {
  align-self: stretch;
  align-items: center;
  padding: 14px 16px;
  text-align: left;
  flex: none;
}

.screen-onboarding .note .ico {
  margin-top: 0;
}

.screen-onboarding .note p {
  font-size: 1rem;
  color: var(--ink);
  font-weight: 600;
}

/* Celular baixo: o Cobrar cabe sem rolar. Sem o logo (o ⓘ continua no
   canto do cartão do teclado) e "Link de pagamento" numa linha só, com
   menos folga dos lados no seletor. A fonte não muda. */
@media (max-height: 680px) {
  .screen-home > .top {
    display: none;
  }

  .pay-slide .opt {
    padding-left: 8px;
    padding-right: 8px;
    white-space: nowrap;
  }

  /* Folgas fora do cartão do teclado, no mínimo 8px. O cartão não muda. */
  .screen-home {
    padding-top: calc(8px + var(--safe-t));
    padding-bottom: calc(var(--btn-gap-nav, 20px) - 6px);
  }

  .charge-body > .charge-gap-a,
  .charge-body > .charge-gap-b {
    min-height: 8px;
  }

  .charge-form {
    gap: 8px;
    padding-top: 8px;
    padding-bottom: 8px;
  }
}
