.celular { height: 100%; }

.app {
  position: relative; display: flex; flex-direction: column; height: 100%;
  border-radius: 24px; overflow: hidden; background: var(--areia); color: var(--tinta);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 30px 80px -30px rgba(0, 0, 0, .8);
}

.app-topo {
  display: flex; align-items: center; gap: 10px; flex: none;
  padding: 12px 14px; background: var(--off); border-bottom: 1px solid var(--linha);
}

.app-voltar { color: var(--tinta-3); width: 22px; height: 22px; margin-left: -4px; }

.avatar-lia {
  position: relative; display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%;
  background: var(--terracota); color: #fff; font-weight: 800; font-size: 18px; letter-spacing: -0.02em;
}

.avatar-lia::after {
  content: ''; position: absolute; right: 0; bottom: 0; width: 11px; height: 11px; border-radius: 50%;
  background: #3aa66f; box-shadow: 0 0 0 2px var(--off);
}

.app-quem { display: grid; line-height: 1.25; min-width: 0; }
.app-quem strong { font-size: 15.5px; font-weight: 800; letter-spacing: -0.01em; }
.app-quem span { font-size: 12.5px; color: var(--verde); font-weight: 600; }
.app-quem span.digitando { color: var(--terracota-forte); }

.mensagens {
  position: relative; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 6px; padding: 14px 12px 10px;
  scrollbar-width: thin; scrollbar-color: var(--areia-2) transparent;
}

.perfil-duna {
  align-self: center; display: grid; justify-items: center; gap: 6px; text-align: center;
  padding: 14px 18px 12px; margin: 4px 0 6px;
}

.perfil-logo { width: 104px; height: auto; }
.perfil-duna p { font-size: 12px; color: var(--tinta-3); font-weight: 500; }

.selo-aviso {
  align-self: center; text-align: center; font-size: 11.5px; font-weight: 600; color: var(--tinta-3);
  background: rgba(255, 255, 255, .75); border-radius: 8px; padding: 5px 10px;
  max-width: 88%; margin: 0 0 10px; line-height: 1.4;
}

.msg {
  position: relative; max-width: 84%; padding: 9px 12px 7px; border-radius: 18px;
  font-size: 15px; line-height: 1.42; overflow-wrap: anywhere;
  box-shadow: 0 1px 1px rgba(20, 24, 31, .05);
}

.msg-lia { align-self: flex-start; background: #fff; border-top-left-radius: 6px; }
.msg-voce { align-self: flex-end; background: var(--terracota-forte); color: #fff; border-top-right-radius: 6px; }
.msg + .msg-lia.continua, .msg-lia.continua { border-top-left-radius: 18px; }
.msg-voce + .msg-voce { border-top-right-radius: 18px; }
.msg-lia + .msg-voce, .msg-voce + .msg-lia, .cartoes + .msg, .msg + .cartoes { margin-top: 6px; }

.msg-hora {
  display: inline-flex; align-items: center; gap: 3px; float: right;
  margin: 6px 0 -2px 10px; font-size: 11px; line-height: 1; color: var(--tinta-3);
}

.msg-voce .msg-hora { color: rgba(255, 255, 255, .78); }
.msg-hora .ico { width: 13px; height: 13px; stroke-width: 2.2; }

.entra { animation: entrar .32s var(--suave) both; }

@keyframes entrar {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to { opacity: 1; transform: none; }
}

.digitando-bolha {
  align-self: flex-start; display: inline-flex; gap: 4px; padding: 13px 14px;
  background: #fff; border-radius: 18px; border-top-left-radius: 6px;
}

.digitando-bolha i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--tinta-3); opacity: .35;
  animation: ponto 1.1s infinite ease-in-out;
}

.digitando-bolha i:nth-child(2) { animation-delay: .15s; }
.digitando-bolha i:nth-child(3) { animation-delay: .3s; }

@keyframes ponto {
  0%, 60%, 100% { opacity: .3; transform: none; }
  30% { opacity: .9; transform: translateY(-3px); }
}

.cartoes {
  display: flex; gap: 10px; margin: 0 -12px; padding: 4px 12px 8px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 12px;
  scrollbar-width: none; overscroll-behavior-x: contain; flex: none;
}

.cartoes::-webkit-scrollbar { display: none; }

.cartao {
  flex: none; width: 236px; scroll-snap-align: start; border-radius: 16px; overflow: hidden;
  background: #fff; box-shadow: 0 1px 2px rgba(20, 24, 31, .06), 0 8px 22px -12px rgba(20, 24, 31, .25);
  display: flex; flex-direction: column;
}

.cartao-foto { position: relative; aspect-ratio: 4 / 3; background: var(--areia-2); }
.cartao-foto img { width: 100%; height: 100%; object-fit: cover; }

.cartao-selo {
  position: absolute; top: 10px; left: 10px; padding: 4px 9px; border-radius: 999px;
  background: rgba(255, 255, 255, .94); font-size: 11.5px; font-weight: 700; color: var(--tinta);
}

.cartao-corpo { display: grid; gap: 4px; padding: 11px 13px 13px; flex: 1; }
.cartao-preco { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.cartao-preco small { font-size: 12.5px; font-weight: 600; color: var(--tinta-3); letter-spacing: 0; }
.cartao-titulo { font-size: 14px; font-weight: 600; line-height: 1.3; color: var(--tinta); }

.cartao-dados {
  display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 2px;
  font-size: 12.5px; color: var(--tinta-2); line-height: 1.3;
}

.cartao-dados span { display: inline-flex; align-items: center; gap: 4px; }
.cartao-dados .ico { width: 14px; height: 14px; color: var(--tinta-3); }

.cartao-botao {
  margin-top: 8px; min-height: 44px; border-radius: 12px; border: 1px solid rgba(185, 74, 34, .3);
  background: var(--terracota-suave); color: var(--terracota-forte); font-weight: 700; font-size: 14px; cursor: pointer;
  transition: background-color .2s var(--suave), color .2s var(--suave);
}

.cartao-botao:hover, .cartao-botao.tocado { background: var(--terracota-forte); color: #fff; }

.msg-detalhe { padding: 4px; width: 84%; }
.msg-detalhe img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 14px; }
.msg-detalhe .detalhe-texto { padding: 9px 8px 5px; display: grid; gap: 3px; }
.msg-detalhe .cartao-preco { font-size: 17px; }

.sugestoes {
  display: flex; gap: 8px; padding: 2px 12px 10px; flex: none;
  overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
}

.sugestoes::-webkit-scrollbar { display: none; }
.sugestoes::after { content: ''; flex: none; width: 12px; }

.sugestoes:empty { display: none; }

.sugestao {
  min-height: 44px; padding: 0 15px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(185, 74, 34, .35); background: #fff; color: var(--terracota-forte);
  flex: none; white-space: nowrap; font-size: 14px; font-weight: 700; line-height: 1.2;
  transition: background-color .2s var(--suave), color .2s var(--suave), transform .2s var(--suave);
}

.sugestao:hover, .sugestao.tocado { background: var(--terracota-forte); color: #fff; }
.sugestao:active { transform: scale(.97); }
.sugestoes.entra .sugestao { animation: entrar .3s var(--suave) both; }

.compor {
  display: flex; gap: 8px; align-items: center; flex: none;
  padding: 8px 10px calc(10px + env(safe-area-inset-bottom)); background: var(--off); border-top: 1px solid var(--linha);
}

.compor input {
  flex: 1; min-width: 0; min-height: 46px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--linha); background: #fff; font-size: 16px; color: var(--tinta); outline: none;
}

.compor input:focus { border-color: var(--terracota); box-shadow: 0 0 0 3px rgba(217, 88, 43, .15); }
.compor input::placeholder { color: var(--tinta-3); }

.enviar {
  display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 50%; border: 0;
  background: var(--terracota); color: #fff; cursor: pointer; transition: background-color .2s var(--suave);
}

.enviar:hover { background: var(--terracota-forte); }
.enviar .ico { width: 20px; height: 20px; transform: translate(-1px, 1px); }

.novidade[hidden] { display: none; }

.novidade {
  position: absolute; z-index: 3; top: 74px; left: 0; right: 0; display: flex; justify-content: center;
  pointer-events: none;
}

.novidade button {
  pointer-events: auto; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 6px 0 12px;
  border: 0; border-radius: 999px; background: var(--tinta); color: #fff; font-size: 13px; font-weight: 600; cursor: pointer;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .5); animation: entrar .35s var(--suave) both;
}

.novidade button .ico { width: 16px; height: 16px; color: var(--terracota-clara); }
.novidade b { padding: 6px 10px; border-radius: 999px; background: rgba(255, 255, 255, .14); font-size: 12px; }

@media (min-width: 1024px) {
  .celular {
    padding: 10px; border-radius: 52px; background: #050506;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 40px 90px -30px rgba(0, 0, 0, .9);
  }
  .app { border-radius: 42px; box-shadow: none; }
  .app-topo { padding: 20px 18px 12px; }
  .novidade { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .digitando-bolha i { animation: none; opacity: .5; }
}
