.faixa-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 18px 16px 10px;
  background: #fff;
}

.logo-banner {
  display: block;
  width: min(340px, 88vw);
  height: auto;
}

.topo {
  border-radius: 0 0 16px 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  position: relative;
  z-index: 2;
}

.topo .link-mercado {
  background: #ffffff;
  color: #14663a;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.topo .link-mercado:hover,
.topo .link-mercado:focus-visible {
  color: #0b3d22;
  background: #ffffff;
  outline: none;
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px rgba(140, 255, 180, 0.95),
    0 0 16px rgba(57, 255, 140, 0.9),
    0 0 32px rgba(20, 220, 100, 0.5);
}

button,
.link-mercado,
.google,
.vaga,
.oferta,
dialog,
.cartao,
.placar {
  transition: all 0.3s ease;
}

button:active,
.link-mercado:active,
.google:active,
.vaga:active,
.oferta:active,
.item-app:active {
  transform: scale(0.97);
}

button:disabled:active,
.oferta:disabled:active {
  transform: none;
}

.cartao,
.placar,
dialog,
.oferta {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

dialog[open] {
  animation: surgir 0.3s ease;
}

dialog::backdrop {
  background: rgba(16, 32, 22, 0.42);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

@keyframes surgir {
  from { transform: translateY(18px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

@keyframes surgir-centro {
  from { transform: translate(-50%, calc(-50% + 18px)); opacity: 0; }
  to { transform: translate(-50%, -50%); opacity: 1; }
}

.barra-app,
.folha-perfil { display: none; }

.folha-perfil {
  position: fixed;
  z-index: 40;
  left: 12px;
  right: 12px;
  bottom: 16px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}

.folha-perfil { display: grid; gap: 10px; }
.folha-perfil[hidden] { display: none; }

.folha-titulo {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mudo);
}

.folha-nome { margin: 0; font-weight: 700; color: #2d3748; }

.folha-perfil .link-mercado {
  display: block;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  background: #eaf4ec;
  color: #2d3748;
  border-radius: 12px;
  padding: 12px 16px;
}

.fab-instalar {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1000;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--verde);
  color: #fff;
  box-shadow: 0 10px 24px rgba(14, 76, 43, 0.32);
  cursor: pointer;
}

.fab-instalar svg { width: 26px; height: 26px; }

.fab-instalar::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  animation: pulso 2.2s ease-out infinite;
}

.fab-instalar[hidden] { display: none; }

@keyframes pulso {
  0% { box-shadow: 0 0 0 0 rgba(20, 102, 58, 0.42); }
  70% { box-shadow: 0 0 0 16px rgba(20, 102, 58, 0); }
  100% { box-shadow: 0 0 0 0 rgba(20, 102, 58, 0); }
}

.guia-fundo,
.guia-janela { display: none; }

.guia-instalacao:not([hidden]) .guia-fundo,
.guia-instalacao:not([hidden]) .guia-janela { display: block; }

.guia-fundo {
  position: fixed;
  inset: 0;
  z-index: 1090;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.guia-janela {
  position: fixed;
  z-index: 1100;
  left: 50%;
  top: 50%;
  width: min(420px, calc(100% - 32px));
  padding: 22px 22px 18px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2);
  transform: translate(-50%, -50%);
  animation: surgir-centro 0.3s ease;
}

.guia-topo {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.guia-topo h2 { margin: 0; }

.guia-fechar {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(245, 247, 251, 0.9);
  color: var(--tinta);
  font-size: 1.4rem;
  line-height: 1;
}

.guia-janela p { margin: 0 0 14px; color: var(--mudo); }

.guia-janela .link-mercado { width: 100%; text-align: center; }

.guia-passos {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.guia-passos li {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: center;
}

.guia-icone {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(20, 102, 58, 0.1);
  color: var(--verde);
}

.guia-icone svg { width: 22px; height: 22px; }

.miudo a {
  color: var(--verde-escuro);
  font-weight: 700;
}

.dispensar {
  border: 0;
  background: transparent;
  color: var(--mudo);
  padding: 10px 8px;
}

@media (max-width: 800px) {
  html, body { overflow-x: hidden; }
  .atalhos { display: none; }

  .faixa-logo { padding: 12px 16px 6px; }

  .logo-banner {
    width: auto;
    max-width: min(280px, 78vw);
    max-height: 168px;
  }

  .topo {
    flex-direction: row;
    align-items: center;
    padding: 20px 22px 22px;
  }

  .topo h1 {
    line-height: 1.15;
    letter-spacing: -0.02em;
  }

  .topo .rodada {
    margin-top: 5px;
    line-height: 1.35;
  }

  main {
    width: min(1240px, calc(100% - 20px));
    margin-top: 16px;
  }

  body { padding-bottom: calc(184px + env(safe-area-inset-bottom)); }

  .barra-app {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    position: fixed;
    z-index: 30;
    left: 0;
    right: 0;
    bottom: 0;
    gap: 4px;
    padding: 10px 12px calc(12px + env(safe-area-inset-bottom));
    border-radius: 20px 20px 0 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
  }

  .item-app {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 58px;
    padding: 4px 2px 2px;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: #64748b;
    text-decoration: none;
    font: inherit;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
    transition: all 0.2s ease-in-out;
  }

  .item-app svg {
    width: 24px;
    height: 24px;
    flex: none;
    order: 1;
  }

  .item-app span { order: 3; }

  .item-app.ativo {
    color: var(--verde);
    background: transparent;
  }

  .item-app.ativo::after {
    content: "";
    order: 2;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--verde);
  }

  .folha-perfil { bottom: calc(108px + env(safe-area-inset-bottom)); }

  .fab-instalar {
    right: 16px;
    bottom: calc(100px + env(safe-area-inset-bottom));
  }

  .grade input,
  .grade select,
  .grade-time input,
  .conta input,
  .conta button,
  .conta .google,
  .folha-perfil .link-mercado,
  .guia-janela .link-mercado {
    min-height: 48px;
  }

  .rolagem {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }
}

@media (max-width: 440px) {
  h1 { font-size: 1.28rem; }
  h2 { font-size: 1.1rem; }
  .cartao { padding: 14px; border-radius: 18px; }
  .conta { width: min(480px, calc(100% - 20px)); }
}

body.entrada .logo-banner {
  width: min(340px, 86vw);
  max-width: none;
  max-height: none;
  height: auto;
}

body.entrada .faixa-logo {
  background: transparent;
  padding-bottom: 0;
}

body.entrada main.conta {
  margin-top: 8px;
}

body.entrada .cartao {
  border-radius: 28px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

body.sem-menu .barra-app,
body.sem-menu .folha-perfil {
  display: none;
}

body.sem-menu {
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
}

body.sem-menu .fab-instalar {
  right: 20px;
  bottom: 20px;
}
