/* Amigo Secreto da Família — mesma linguagem da Gentileza de Rua (creme, cartões redondos,
   pílulas, Comfortaa + Lato), com a paleta trocada para o Natal: pinheiro, vermelho e dourado. */
@font-face { font-family: "Comfortaa"; font-weight: 500; font-display: swap; src: url(fontes/comfortaa-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Comfortaa"; font-weight: 700; font-display: swap; src: url(fontes/comfortaa-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Lato"; font-weight: 400; font-display: swap; src: url(fontes/lato-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Lato"; font-weight: 700; font-display: swap; src: url(fontes/lato-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Lato"; font-weight: 900; font-display: swap; src: url(fontes/lato-latin-900-normal.woff2) format("woff2"); }

:root {
  color-scheme: light;
  --creme: #faf6ed;
  --creme-2: #f3ecdf;
  --papel: #fffdf8;

  --pinheiro: #1f4d3b;
  --pinheiro-escuro: #123426;
  --pinheiro-claro: #e3eee6;
  --pinheiro-medio: #c3d9c9;

  --vermelho: #c8343e;
  --vermelho-escuro: #8e1f28;
  --vermelho-claro: #fbe5e2;

  --dourado: #f2b631;
  --dourado-escuro: #8f6208;
  --dourado-claro: #fff1cf;

  --salvia: #7f9a83;
  --salvia-claro: #e6eee4;
  --rosa: #e8807a;
  --rosa-claro: #fde9e5;
  --ceu: #5b87a8;
  --ceu-claro: #e3edf4;

  --tinta: #2b2421;
  --tinta-suave: #6a5f58;
  --linha: #e9e0d2;

  --display: "Comfortaa", ui-rounded, system-ui, sans-serif;
  --texto: "Lato", system-ui, -apple-system, "Segoe UI", sans-serif;

  --sombra-cartao: 0 1px 2px rgb(18 52 38 / 0.06), 0 6px 20px -8px rgb(18 52 38 / 0.2);
  --sombra-flutuante: 0 10px 30px -10px rgb(18 52 38 / 0.4);
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-d: max(16px, env(safe-area-inset-right, 0px));
}

* { box-sizing: border-box; }
html { -webkit-tap-highlight-color: transparent; height: 100%; }
body {
  margin: 0;
  min-height: 100%;
  background: var(--creme);
  color: var(--tinta);
  font: 400 16px/1.5 var(--texto);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .display { font-family: var(--display); letter-spacing: -0.01em; text-wrap: balance; margin: 0; }
p { margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--dourado); outline-offset: 2px; }
[hidden] { display: none !important; }
.ic { width: 1.25em; height: 1.25em; flex-shrink: 0; }
.so-leitor { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- estrutura */
.tela {
  max-width: 34rem;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter-d);
  padding-block: 0.5rem 8rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.pilha { display: flex; flex-direction: column; gap: 0.75rem; }
.linha-flex { display: flex; align-items: center; gap: 0.75rem; }
.entre { justify-content: space-between; }
.cresce { flex: 1; min-width: 0; }

/* Varal de luzinhas no topo */
.varal { display: block; width: 100%; height: 30px; }
.varal .lampada { animation: piscar 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.varal .l2 { animation-delay: 0.6s; }
.varal .l3 { animation-delay: 1.2s; }
.varal .l4 { animation-delay: 1.8s; }
@keyframes piscar { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.topo {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: color-mix(in srgb, var(--creme) 92%, transparent);
  backdrop-filter: blur(6px);
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 25; background: var(--creme);
}
.topo-barra {
  max-width: 34rem; margin: 0 auto; display: flex; align-items: center; gap: 0.75rem;
  padding: 0.25rem var(--gutter-d) 0.6rem var(--gutter);
}
.troca-perfil {
  display: flex; align-items: center; gap: 0.6rem; min-width: 0; padding: 0.3rem 0.8rem 0.3rem 0.3rem;
  border-radius: 999px; background: var(--papel); box-shadow: var(--sombra-cartao); font-weight: 700;
}
.troca-perfil span.nome { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.marca { margin-left: auto; display: flex; align-items: center; gap: 0.4rem; font-family: var(--display); font-weight: 700; color: var(--pinheiro); font-size: 0.95rem; }
.marca .ic { color: var(--vermelho); }

/* ---------- cartões, botões, selos */
.cartao { background: var(--papel); border-radius: 1.5rem; box-shadow: var(--sombra-cartao); padding: 1.1rem; }
.cartao h2 { font-size: 1.2rem; color: var(--pinheiro); }
.cartao-titulo { display: flex; align-items: center; gap: 0.6rem; }
.cartao-titulo .ic { color: var(--vermelho); }
.suave-txt { color: var(--tinta-suave); font-size: 0.95rem; }
.pequeno { font-size: 0.85rem; }

.botao {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 3rem;
  padding: 0 1.4rem; border-radius: 999px; font-weight: 700; text-decoration: none; transition: transform 0.1s, filter 0.15s, background 0.15s;
  box-shadow: var(--sombra-cartao); text-align: center; line-height: 1.2;
}
.botao:active { transform: scale(0.98); }
.botao:disabled { opacity: 0.5; pointer-events: none; }
.botao.primario { background: var(--pinheiro); color: var(--creme); }
.botao.primario:hover { background: var(--pinheiro-escuro); }
.botao.destaque { background: var(--dourado); color: var(--tinta); }
.botao.destaque:hover { filter: brightness(0.96); }
.botao.vermelho { background: var(--vermelho); color: var(--papel); }
.botao.vermelho:hover { background: var(--vermelho-escuro); }
.botao.contorno { background: var(--papel); color: var(--pinheiro); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--pinheiro) 25%, transparent); }
.botao.suave { background: var(--pinheiro-claro); color: var(--pinheiro); box-shadow: none; }
.botao.perigo { background: var(--vermelho-claro); color: var(--vermelho-escuro); box-shadow: none; }
.botao.largo { width: 100%; }
.botao.mini { min-height: 2.25rem; padding: 0 0.9rem; font-size: 0.9rem; }
.botao-icone {
  display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 999px; background: var(--papel);
  color: var(--pinheiro); box-shadow: var(--sombra-cartao); flex-shrink: 0;
}
.link { color: var(--pinheiro); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

.selo { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.75rem; font-weight: 700; white-space: nowrap; }
.selo.verde { background: var(--pinheiro-claro); color: var(--pinheiro); }
.selo.vermelho { background: var(--vermelho-claro); color: var(--vermelho-escuro); }
.selo.dourado { background: var(--dourado-claro); color: var(--dourado-escuro); }
.selo.cinza { background: var(--creme-2); color: var(--tinta-suave); }
.contador { display: inline-grid; place-items: center; min-width: 1.3rem; height: 1.3rem; padding: 0 0.35rem; border-radius: 999px; background: var(--vermelho); color: #fff; font-size: 0.72rem; font-weight: 900; }

.aviso { display: flex; gap: 0.75rem; border-radius: 1.1rem; background: var(--pinheiro-claro); color: var(--pinheiro-escuro); padding: 0.9rem 1rem; font-size: 0.95rem; }
.aviso .ic { color: var(--pinheiro); margin-top: 0.1rem; }
.aviso.dourado { background: var(--dourado-claro); color: #5e4206; }
.aviso.dourado .ic { color: var(--dourado-escuro); }
.aviso.vermelho { background: var(--vermelho-claro); color: var(--vermelho-escuro); }
.aviso.vermelho .ic { color: var(--vermelho); }

/* ---------- avatares */
.avatar { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 999px; flex-shrink: 0; position: relative; }
.avatar .ic { width: 55%; height: 55%; }
.avatar.p { width: 1.9rem; height: 1.9rem; }
.avatar.g { width: 4rem; height: 4rem; }
.avatar.gg { width: 6.5rem; height: 6.5rem; box-shadow: 0 0 0 6px var(--papel), var(--sombra-flutuante); }
.c-vermelho { background: var(--vermelho); color: var(--papel); }
.c-pinheiro { background: var(--pinheiro); color: var(--creme); }
.c-dourado { background: var(--dourado); color: var(--tinta); }
.c-salvia { background: var(--salvia); color: var(--papel); }
.c-rosa { background: var(--rosa); color: var(--papel); }
.c-ceu { background: var(--ceu); color: var(--papel); }
.c-misterio { background: var(--tinta); color: var(--dourado); }
.gorro::after {
  /* pompom de gorrinho no avatar de criança */
  content: ""; position: absolute; top: -3px; right: -2px; width: 30%; height: 30%; border-radius: 999px;
  background: var(--papel); box-shadow: 0 0 0 2px var(--vermelho);
}
.roda-avatares { display: flex; flex-wrap: wrap; gap: 0.35rem; }

/* ---------- entrada (fora da conta) */
.entrada { position: relative; overflow: hidden; min-height: 100dvh; display: flex; flex-direction: column; }
.enfeites { position: absolute; inset: 0 0 auto; height: 15rem; pointer-events: none; }
.enfeite { position: absolute; top: 0; display: flex; flex-direction: column; align-items: center; transform-origin: top center; animation: balancar 5s ease-in-out infinite; }
.enfeite .fio { width: 2px; background: color-mix(in srgb, var(--pinheiro) 35%, transparent); }
.enfeite .tampinha { width: 30%; height: 7px; border-radius: 3px 3px 1px 1px; background: var(--dourado); margin-bottom: -2px; position: relative; z-index: 1; }
.enfeite .bola { border-radius: 999px; box-shadow: inset -6px -8px 0 rgb(0 0 0 / 0.12); position: relative; }
.enfeite .bola::after { content: ""; position: absolute; top: 18%; left: 22%; width: 22%; height: 22%; border-radius: 999px; background: rgb(255 255 255 / 0.55); }
@keyframes balancar { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }

.entrada-corpo {
  position: relative; flex: 1; width: 100%; max-width: 34rem; margin: 0 auto;
  padding: 6.5rem var(--gutter-d) 2rem var(--gutter); display: flex; flex-direction: column; gap: 1.2rem;
}
.etiqueta {
  display: inline-flex; align-items: center; gap: 0.5rem; width: fit-content; padding: 0.35rem 0.8rem; border-radius: 999px;
  background: var(--papel); box-shadow: var(--sombra-cartao); color: var(--pinheiro); font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.etiqueta .ponto { width: 0.5rem; height: 0.5rem; border-radius: 999px; background: var(--vermelho); }
.titulo-grande { font-size: clamp(2.3rem, 9vw, 3.1rem); line-height: 1.05; color: var(--pinheiro); font-weight: 700; }
.titulo-grande em { font-style: normal; color: var(--vermelho); }
.lead { font-size: 1.1rem; line-height: 1.6; }

.portas { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.porta {
  display: flex; align-items: center; gap: 1rem; width: 100%; padding: 1rem; border-radius: 1.5rem; background: var(--papel);
  box-shadow: var(--sombra-cartao); text-align: left; text-decoration: none; transition: box-shadow 0.2s, transform 0.1s;
}
.porta:hover { box-shadow: var(--sombra-flutuante); }
.porta:active { transform: scale(0.99); }
.porta .quadro { display: grid; place-items: center; width: 3.5rem; height: 3.5rem; border-radius: 1rem; flex-shrink: 0; }
.porta .quadro .ic { width: 1.75rem; height: 1.75rem; }
.porta strong { display: block; font-family: var(--display); font-size: 1.1rem; color: var(--pinheiro); }
.porta small { display: block; color: var(--tinta-suave); font-size: 0.9rem; line-height: 1.35; }
.porta > .ic { color: var(--pinheiro); }

.faixa {
  position: relative; margin-top: 3rem; background: var(--pinheiro); color: var(--creme);
  padding: 2.25rem var(--gutter-d) calc(2.5rem + env(safe-area-inset-bottom, 0px)) var(--gutter);
}
.faixa .onda { position: absolute; left: 0; top: -2rem; width: 100%; height: 2.1rem; }
.faixa-corpo { max-width: 34rem; margin: 0 auto; display: flex; flex-direction: column; gap: 0.9rem; position: relative; }
.faixa h2 { font-size: 1.25rem; }
.faixa .assinatura { font-family: var(--display); font-weight: 700; font-size: 1.1rem; color: var(--dourado); }

/* Neve em CSS para as áreas verdes */
.neve { position: relative; isolation: isolate; overflow: hidden; }
.neve::before, .neve::after {
  content: ""; position: absolute; inset: -100% 0 0; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(circle, rgb(255 255 255 / 0.75) 1.5px, transparent 2px),
    radial-gradient(circle, rgb(255 255 255 / 0.5) 1px, transparent 1.5px);
  background-size: 90px 90px, 55px 55px;
  background-position: 10px 0, 30px 20px;
  animation: nevar 14s linear infinite;
}
.neve::after { background-size: 130px 130px, 70px 70px; background-position: 60px 40px, 5px 10px; animation-duration: 22s; opacity: 0.7; }
@keyframes nevar { to { transform: translateY(50%); } }

/* ---------- contagem regressiva */
.contagem { background: var(--pinheiro); color: var(--creme); border-radius: 1.5rem; padding: 1.2rem; box-shadow: var(--sombra-flutuante); }
.contagem .rotulo { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; color: var(--dourado); }
.contagem .numeros { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; margin-top: 0.6rem; }
.contagem .num { background: rgb(255 255 255 / 0.1); border-radius: 1rem; padding: 0.6rem 0.2rem; text-align: center; }
.contagem .num b { display: block; font-family: var(--display); font-size: 1.8rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.contagem .num span { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.85; }
.contagem .info { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; margin-top: 0.9rem; font-size: 0.92rem; }
.contagem .info span { display: inline-flex; align-items: center; gap: 0.35rem; }
.contagem .info .ic { color: var(--dourado); width: 1.05em; height: 1.05em; }
.contagem.festa { text-align: center; }
.contagem.festa b { font-family: var(--display); font-size: 1.6rem; display: block; margin-top: 0.3rem; }

/* ---------- navegação inferior */
.nav {
  position: fixed; inset: auto 0 0; z-index: 30; background: color-mix(in srgb, var(--papel) 96%, transparent);
  border-top: 1px solid var(--linha); padding: 0.35rem var(--gutter-d) max(0.6rem, env(safe-area-inset-bottom, 0px)) var(--gutter);
  backdrop-filter: saturate(1.5) blur(6px);
}
.nav ul { list-style: none; margin: 0 auto; padding: 0; max-width: 32rem; display: grid; grid-template-columns: repeat(5, 1fr); }
.nav a { display: flex; flex-direction: column; align-items: center; gap: 0.15rem; padding: 0.2rem 0; font-size: 0.7rem; font-weight: 700; color: var(--tinta-suave); text-decoration: none; position: relative; }
.nav a .bolha { display: grid; place-items: center; width: 3rem; height: 2rem; border-radius: 999px; transition: background 0.15s; }
.nav a[aria-current="page"] { color: var(--pinheiro); }
.nav a[aria-current="page"] .bolha { background: var(--pinheiro-claro); }
.nav a .central {
  display: grid; place-items: center; width: 3.4rem; height: 3.4rem; margin-top: -1.4rem; border-radius: 999px;
  background: var(--vermelho); color: var(--papel); box-shadow: var(--sombra-flutuante), 0 0 0 4px var(--papel);
}
.nav a .central .ic { width: 1.6rem; height: 1.6rem; }
.nav a[aria-current="page"] .central { background: var(--vermelho-escuro); }
.nav .contador { position: absolute; top: -0.1rem; right: calc(50% - 1.7rem); }

/* ---------- cabeçalho interno */
.cabeca { display: flex; align-items: center; gap: 0.75rem; padding-top: 0.25rem; }
.cabeca h1 { font-size: 1.5rem; color: var(--pinheiro); }
.ola { font-size: 1.9rem; color: var(--pinheiro); line-height: 1.1; }
.ola em { font-style: normal; color: var(--vermelho); }

/* ---------- formulários */
.campo { display: flex; flex-direction: column; gap: 0.35rem; }
.campo label, .campo .rotulo { font-weight: 700; font-size: 0.92rem; }
.campo .dica { font-size: 0.82rem; color: var(--tinta-suave); }
.entrada-texto, textarea.entrada-texto, select.entrada-texto {
  width: 100%; min-height: 3rem; border-radius: 1rem; border: 2px solid var(--linha); background: var(--papel);
  padding: 0.65rem 0.9rem; outline: none; transition: border-color 0.15s;
}
textarea.entrada-texto { resize: vertical; min-height: 5.5rem; line-height: 1.45; }
.entrada-texto:focus { border-color: var(--pinheiro); }
.entrada-texto.codigo { text-transform: uppercase; letter-spacing: 0.35em; font-family: var(--display); font-weight: 700; font-size: 1.5rem; text-align: center; }
.erro { color: var(--vermelho-escuro); font-weight: 700; font-size: 0.92rem; min-height: 1.3em; }
.sugestoes { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.sugestao { padding: 0.35rem 0.8rem; border-radius: 999px; background: var(--creme-2); font-size: 0.88rem; font-weight: 700; color: var(--tinta-suave); }
.sugestao:hover { background: var(--pinheiro-claro); color: var(--pinheiro); }

.grade-avatares { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.5rem; }
.grade-avatares button { aspect-ratio: 1; border-radius: 999px; display: grid; place-items: center; background: var(--creme-2); color: var(--pinheiro); max-width: 100%; }
.grade-avatares button .ic { width: 55%; height: 55%; }
.grade-avatares button[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--papel), 0 0 0 5px var(--pinheiro); }
.cores { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.cores button { width: 2.25rem; height: 2.25rem; border-radius: 999px; }
.cores button[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--papel), 0 0 0 5px var(--tinta); }

.opcoes { display: grid; gap: 0.6rem; }
.opcao { display: flex; align-items: center; gap: 0.8rem; padding: 0.8rem; border-radius: 1.1rem; background: var(--papel); box-shadow: inset 0 0 0 2px var(--linha); text-align: left; }
.opcao[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--pinheiro); background: var(--pinheiro-claro); }
.opcao .quadro { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 0.8rem; background: var(--creme-2); color: var(--pinheiro); flex-shrink: 0; }
.opcao strong { display: block; }
.opcao.grande { padding: 1rem; border-radius: 1.4rem; gap: 1rem; background: var(--papel); box-shadow: var(--sombra-cartao); }
.opcao.grande:hover { box-shadow: var(--sombra-flutuante); }
.opcao.grande .quadro { width: 3.4rem; height: 3.4rem; border-radius: 1rem; }
.opcao.grande .quadro .ic { width: 1.7rem; height: 1.7rem; }
.opcao.grande strong { font-family: var(--display); font-size: 1.1rem; color: var(--pinheiro); }
.opcao.grande small { display: block; line-height: 1.35; }
.opcao.grande > .ic { color: var(--pinheiro); }
.opcao .quadro.c-dourado { background: var(--dourado); color: var(--tinta); }
.opcao .quadro.c-vermelho { background: var(--vermelho); color: var(--papel); }
.opcao small { color: var(--tinta-suave); }

/* teclado do código */
.pin-pontos { display: flex; justify-content: center; gap: 1rem; margin: 0.5rem 0; }
.pin-pontos span { width: 1.1rem; height: 1.1rem; border-radius: 999px; box-shadow: inset 0 0 0 2px var(--pinheiro-medio); transition: background 0.15s, transform 0.15s; }
.pin-pontos span.cheio { background: var(--vermelho); box-shadow: none; transform: scale(1.1); }
.pin-pontos.tremer { animation: tremer 0.4s; }
@keyframes tremer { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.teclado { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; max-width: 18rem; margin: 0 auto; width: 100%; }
.teclado button {
  height: 4rem; border-radius: 1.2rem; background: var(--papel); box-shadow: var(--sombra-cartao); font-family: var(--display);
  font-size: 1.6rem; font-weight: 700; color: var(--pinheiro); display: grid; place-items: center; transition: transform 0.08s;
}
.teclado button:active { transform: scale(0.94); background: var(--pinheiro-claro); }
.teclado button.vazio { visibility: hidden; }
.teclado button.apagar { background: transparent; box-shadow: none; }

.centro { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 0.6rem; }

/* lista de pessoas */
.grupo-casa h3 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--tinta-suave); font-family: var(--texto); font-weight: 900; margin: 0.4rem 0.3rem 0.5rem; display: flex; align-items: center; gap: 0.4rem; }
.lista { list-style: none; margin: 0; padding: 0; background: var(--papel); border-radius: 1.3rem; box-shadow: var(--sombra-cartao); overflow: hidden; }
.lista > li + li { border-top: 1px solid var(--linha); }
.item { display: flex; align-items: center; gap: 0.8rem; width: 100%; padding: 0.75rem 0.9rem; text-align: left; text-decoration: none; }
button.item:hover, a.item:hover { background: var(--creme); }
.item .nome { font-weight: 700; display: block; }
.item .sub { display: block; }
.item .sub { font-size: 0.82rem; color: var(--tinta-suave); }
.item > .ic { color: var(--tinta-suave); }

/* ---------- presente (sorteio) */
.palco-presente { display: flex; flex-direction: column; align-items: center; gap: 1rem; padding: 1.5rem 0 0.5rem; text-align: center; }
.presente { position: relative; width: 11rem; height: 11rem; cursor: pointer; animation: chacoalhar 3.2s ease-in-out infinite; }
.presente:focus-visible { outline-offset: 10px; border-radius: 1rem; }
.presente .caixa { position: absolute; left: 8%; right: 8%; bottom: 0; height: 62%; background: var(--vermelho); border-radius: 0.7rem; box-shadow: inset -10px -10px 0 rgb(0 0 0 / 0.1); }
.presente .caixa::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 16%; transform: translateX(-50%); background: var(--dourado); }
.presente .tampa {
  position: absolute; left: 0; right: 0; top: 22%; height: 20%; background: #d9444d; border-radius: 0.6rem;
  box-shadow: 0 6px 0 rgb(0 0 0 / 0.08); transition: transform 0.7s cubic-bezier(0.3, 1.4, 0.6, 1), opacity 0.6s 0.3s; z-index: 2;
}
.presente .tampa::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 16%; transform: translateX(-50%); background: var(--dourado); }
.presente .laco { position: absolute; left: 50%; top: 2%; width: 44%; height: 24%; transform: translateX(-50%); z-index: 3; transition: transform 0.7s cubic-bezier(0.3, 1.4, 0.6, 1), opacity 0.6s 0.3s; }
.presente .laco::before, .presente .laco::after {
  content: ""; position: absolute; top: 10%; width: 50%; height: 85%; border: 0.55rem solid var(--dourado); border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
}
.presente .laco::before { left: 0; transform: rotate(-22deg); }
.presente .laco::after { right: 0; transform: rotate(22deg); }
.presente .estrela-luz { position: absolute; inset: -30%; border-radius: 999px; background: radial-gradient(circle, rgb(242 182 49 / 0.55), transparent 62%); opacity: 0; transition: opacity 0.5s; z-index: 0; }
.presente.aberto { animation: none; }
.presente.aberto .tampa { transform: translate(30%, -160%) rotate(28deg); opacity: 0; }
.presente.aberto .laco { transform: translate(-90%, -260%) rotate(-40deg); opacity: 0; }
.presente.aberto .estrela-luz { opacity: 1; }
@keyframes chacoalhar {
  0%, 70%, 100% { transform: rotate(0); }
  74% { transform: rotate(-6deg); } 78% { transform: rotate(6deg); } 82% { transform: rotate(-4deg); } 86% { transform: rotate(3deg); }
}
.revelado { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; animation: subir 0.7s cubic-bezier(0.3, 1.3, 0.6, 1) both; }
@keyframes subir { from { transform: translateY(30px) scale(0.85); opacity: 0; } }
.revelado .nome-grande { font-family: var(--display); font-size: 2.2rem; color: var(--pinheiro); font-weight: 700; line-height: 1.1; }

/* confete */
.confete { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.confete i {
  position: absolute; width: 0.55rem; height: 0.8rem; border-radius: 2px; top: var(--y); left: var(--x);
  animation: confete 2.2s cubic-bezier(0.15, 0.6, 0.4, 1) forwards;
}
@keyframes confete {
  to { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); opacity: 0; }
}

/* abas */
.abas { display: grid; grid-template-columns: 1fr 1fr; gap: 0.3rem; padding: 0.3rem; border-radius: 999px; background: var(--creme-2); }
.abas button { min-height: 2.6rem; border-radius: 999px; font-weight: 700; color: var(--tinta-suave); display: flex; align-items: center; justify-content: center; gap: 0.4rem; }
.abas button[aria-selected="true"] { background: var(--papel); color: var(--pinheiro); box-shadow: var(--sombra-cartao); }

/* desejos */
.desejos { display: grid; gap: 0.6rem; }
.desejo { border-radius: 1rem; background: var(--creme); padding: 0.7rem 0.9rem; }
.desejo dt { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 900; color: var(--tinta-suave); display: flex; gap: 0.35rem; align-items: center; }
.desejo dd { margin: 0.15rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.medidas { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0.6rem; align-items: end; }
.medidas > * { min-width: 0; }
.entrada-texto { min-width: 0; }

/* conversa */
.conversa { display: flex; flex-direction: column; gap: 0.5rem; max-height: 55vh; min-height: 8rem; overflow-y: auto; padding: 0.4rem 0.1rem; overscroll-behavior: contain; }
.msg { max-width: 82%; padding: 0.55rem 0.85rem; border-radius: 1.1rem; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.4; animation: msg 0.25s ease-out; }
.msg time { display: block; font-size: 0.68rem; opacity: 0.7; margin-top: 0.15rem; }
.msg.minha { align-self: flex-end; background: var(--pinheiro); color: var(--creme); border-bottom-right-radius: 0.3rem; }
.msg.outra { align-self: flex-start; background: var(--creme-2); border-bottom-left-radius: 0.3rem; }
.msg.outra.secreta { background: var(--vermelho-claro); color: var(--vermelho-escuro); }
@keyframes msg { from { transform: translateY(6px); opacity: 0; } }
.conversa-vazia { margin: auto; text-align: center; color: var(--tinta-suave); font-size: 0.92rem; padding: 1rem; display: flex; flex-direction: column; align-items: center; gap: 0.4rem; }
.conversa-vazia .ic { width: 2rem; height: 2rem; color: var(--pinheiro-medio); }
.escrever { display: flex; gap: 0.5rem; align-items: flex-end; }
.escrever textarea { min-height: 3rem; max-height: 8rem; resize: none; }
.escrever .botao-icone { background: var(--vermelho); color: #fff; width: 3rem; height: 3rem; }
.chips { display: flex; gap: 0.4rem; overflow-x: auto; padding-bottom: 0.2rem; scrollbar-width: none; }
.chips button { white-space: nowrap; padding: 0.4rem 0.8rem; border-radius: 999px; background: var(--dourado-claro); color: var(--dourado-escuro); font-size: 0.85rem; font-weight: 700; }

.misterio { display: flex; align-items: center; gap: 0.9rem; }
.misterio .avatar { animation: pulsar 2.2s ease-in-out infinite; }
@keyframes pulsar { 50% { transform: scale(1.06); } }

/* ---------- mural */
.bilhetes { display: grid; gap: 1rem; }
.bilhete { position: relative; border-radius: 0.4rem 1.4rem 1.4rem 1.4rem; padding: 1.4rem 1rem 0.8rem; box-shadow: var(--sombra-cartao); background: var(--papel); }
.bilhete:nth-child(odd) { transform: rotate(-0.6deg); }
.bilhete:nth-child(even) { transform: rotate(0.5deg); }
.bilhete::before { /* fita adesiva */
  content: ""; position: absolute; top: -0.55rem; left: 50%; width: 4.5rem; height: 1.1rem; transform: translateX(-50%) rotate(-3deg);
  background: rgb(242 182 49 / 0.55); border-radius: 2px;
}
.bilhete.b-vermelho { background: var(--vermelho-claro); }
.bilhete.b-pinheiro { background: var(--pinheiro-claro); }
.bilhete.b-dourado { background: var(--dourado-claro); }
.bilhete .texto { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 1.05rem; line-height: 1.5; margin: 0.6rem 0; }
.reacoes { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.reacoes button { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.2rem 0.55rem; border-radius: 999px; background: rgb(255 255 255 / 0.7); box-shadow: inset 0 0 0 1px var(--linha); font-size: 0.9rem; }
.reacoes button[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--vermelho); background: var(--papel); }
.reacoes button b { font-size: 0.78rem; color: var(--tinta-suave); }
.cores-bilhete button { width: 2rem; height: 2rem; border-radius: 0.6rem; box-shadow: inset 0 0 0 2px var(--linha); }
.cores-bilhete button[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--pinheiro), 0 0 0 2px var(--papel), 0 0 0 4px var(--pinheiro); }

/* checklist */
.tarefas { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.tarefa { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; padding: 0.35rem 0; }
.tarefa .marca-t { display: grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 999px; box-shadow: inset 0 0 0 2px var(--pinheiro-medio); color: transparent; flex-shrink: 0; }
.tarefa.feita .marca-t { background: var(--pinheiro); color: var(--creme); box-shadow: none; }
.tarefa.feita span.t { text-decoration: line-through; color: var(--tinta-suave); }
.tarefa .ic.seta { margin-left: auto; color: var(--tinta-suave); }

/* folha (modal de baixo) */
.fundo-folha { position: fixed; inset: 0; z-index: 50; background: rgb(18 30 24 / 0.45); display: flex; align-items: flex-end; justify-content: center; animation: aparecer 0.2s; }
.folha {
  width: 100%; max-width: 34rem; max-height: 90dvh; overflow-y: auto; background: var(--creme); border-radius: 1.6rem 1.6rem 0 0;
  padding: 0.75rem var(--gutter-d) max(1.25rem, env(safe-area-inset-bottom, 0px)) var(--gutter); animation: subirFolha 0.28s cubic-bezier(0.2, 1, 0.4, 1);
  display: flex; flex-direction: column; gap: 1rem;
}
.folha .alca { width: 2.6rem; height: 0.3rem; border-radius: 999px; background: var(--linha); margin: 0 auto; }
.folha h2 { font-size: 1.3rem; color: var(--pinheiro); }
@keyframes aparecer { from { opacity: 0; } }
@keyframes subirFolha { from { transform: translateY(40%); } }
@media (min-width: 640px) {
  .fundo-folha { align-items: center; }
  .folha { border-radius: 1.6rem; padding-bottom: 1.25rem; }
}

/* aviso flutuante */
.toast {
  position: fixed; left: 50%; bottom: calc(6.5rem + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 70;
  background: var(--tinta); color: var(--creme); padding: 0.7rem 1.1rem; border-radius: 999px; font-weight: 700; box-shadow: var(--sombra-flutuante);
  max-width: calc(100% - 32px); animation: subir 0.3s both; display: flex; align-items: center; gap: 0.5rem;
}
.toast .ic { color: var(--dourado); }

/* vazio */
.vazio { text-align: center; padding: 1.5rem 1rem; display: flex; flex-direction: column; align-items: center; gap: 0.6rem; color: var(--tinta-suave); }
.vazio .circulo { display: grid; place-items: center; width: 5rem; height: 5rem; border-radius: 999px; background: var(--pinheiro-claro); color: var(--pinheiro); }
.vazio .circulo .ic { width: 2.4rem; height: 2.4rem; }
.vazio strong { color: var(--pinheiro); font-family: var(--display); font-size: 1.15rem; }

.codigo-casa { font-family: var(--display); font-weight: 700; font-size: 1.9rem; letter-spacing: 0.25em; color: var(--vermelho); text-align: center; background: var(--papel); border: 2px dashed var(--vermelho); border-radius: 1rem; padding: 0.5rem; }

/* ---------- telão da revelação */
.telao { min-height: 100dvh; background: var(--pinheiro-escuro); color: var(--creme); display: flex; flex-direction: column; }
.telao .varal { height: 40px; }
.telao-corpo { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.5rem; padding: 1.5rem var(--gutter-d) 2rem var(--gutter); text-align: center; position: relative; z-index: 1; }
.telao h1 { font-size: clamp(2rem, 6vw, 4rem); color: var(--dourado); line-height: 1.05; }
.telao .sub { font-size: clamp(1rem, 2.2vw, 1.5rem); opacity: 0.9; }
.telao .par { display: flex; align-items: center; justify-content: center; gap: clamp(1rem, 4vw, 3.5rem); flex-wrap: wrap; }
.telao .lado { display: flex; flex-direction: column; align-items: center; gap: 0.8rem; min-width: 0; }
.telao .lado .avatar { width: clamp(6rem, 14vw, 11rem); height: clamp(6rem, 14vw, 11rem); box-shadow: 0 0 0 6px rgb(255 255 255 / 0.15); }
.telao .lado b { font-family: var(--display); font-size: clamp(1.6rem, 4.5vw, 3.4rem); line-height: 1.05; }
.telao .tirou { font-family: var(--display); font-size: clamp(1.1rem, 2.4vw, 1.8rem); color: var(--dourado); display: flex; flex-direction: column; align-items: center; gap: 0.3rem; }
.telao .tirou .ic { width: 2.5rem; height: 2.5rem; }
.telao .entra-esq { animation: entraEsq 0.8s cubic-bezier(0.3, 1.3, 0.6, 1) both; }
.telao .entra-dir { animation: entraDir 0.9s 0.9s cubic-bezier(0.3, 1.3, 0.6, 1) both; }
.telao .entra-meio { animation: subir 0.6s 0.5s both; }
@keyframes entraEsq { from { transform: translateX(-60px) scale(0.8); opacity: 0; } }
@keyframes entraDir { from { transform: scale(0.3) rotate(-12deg); opacity: 0; } }
.telao .palpite { animation: subir 0.6s 1.8s both; font-size: clamp(1rem, 2vw, 1.35rem); background: rgb(255 255 255 / 0.1); padding: 0.6rem 1.2rem; border-radius: 999px; }
.telao .controles { display: flex; gap: 0.8rem; flex-wrap: wrap; justify-content: center; }
.telao .botao.contorno { background: transparent; color: var(--creme); box-shadow: inset 0 0 0 2px rgb(255 255 255 / 0.35); }
.telao .contagem-pares { font-size: 0.9rem; opacity: 0.75; font-variant-numeric: tabular-nums; }
.telao .acertos { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; max-width: 50rem; }
.telao .acertos span { display: inline-flex; align-items: center; gap: 0.5rem; background: rgb(255 255 255 / 0.1); padding: 0.35rem 0.9rem 0.35rem 0.35rem; border-radius: 999px; font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .neve::before, .neve::after { display: none; }
}

@media (min-width: 900px) {
  .tela { max-width: 40rem; }
  .entrada-corpo { max-width: 40rem; padding-top: 8rem; }
  .faixa-corpo { max-width: 40rem; }
}
