/* =========================================================
   PÁGINAS — estilos específicos de cada página
   ========================================================= */

/* ===== 3. Contador ===== */
.contador {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 16px 0 18px;
}
.contador-item {
  background: rgba(255, 253, 248, 0.9);
  border-radius: var(--raio);
  padding: 16px 6px 12px;
  box-shadow: var(--sombra);
}
.contador-numero {
  display: block;
  font-size: clamp(1.7rem, 8vw, 2.3rem);
  font-weight: 600;
  color: var(--vinho);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.contador-rotulo { font-size: 0.85rem; color: var(--texto-suave); }

/* ===== 4. Linha do tempo ===== */
.linha-tempo {
  position: relative;
  margin-top: 28px;
  padding-left: 28px;
  text-align: left;
}
.linha-tempo::before {
  content: "";
  position: absolute; left: 9px; top: 6px; bottom: 6px;
  width: 2px;
  background: linear-gradient(var(--rosa), var(--vinho));
  border-radius: 2px;
}
.momento {
  position: relative;
  margin-bottom: 40px;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.momento.visivel { opacity: 1; transform: none; }
.momento::before {
  content: "❤";
  position: absolute; left: -29px; top: 0;
  width: 22px; height: 22px;
  font-size: 0.75rem;
  color: #fff;
  background: var(--vinho);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 4px var(--creme);
}
.momento-data {
  font-size: 0.85rem;
  color: var(--rosa);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.momento h3 { margin: 2px 0 12px; font-size: 1.25rem; color: var(--vinho); }
.momento p { margin: 12px 0 0; }

.foto-moldura {
  background: #fff;
  padding: 10px 10px 12px;
  border-radius: 6px;
  box-shadow: var(--sombra);
}
.momento:nth-child(odd) .foto-moldura { transform: rotate(-1.5deg); }
.momento:nth-child(even) .foto-moldura { transform: rotate(1.5deg); }
.foto-moldura img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 3px;
}
.foto-vazia {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--rosa-claro), #fbe9ed);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--texto-suave);
  font-size: 0.9rem;
  font-style: italic;
  gap: 4px;
}
.foto-vazia span { font-size: 2rem; }

/* ===== 5. Pote ===== */
.pote {
  position: relative;
  width: 170px; height: 210px;
  margin: 8px auto 0;
  display: block;
  background: none; border: none; padding: 0;
  cursor: pointer;
  transition: transform 0.2s;
}
.pote:active { transform: scale(0.95); }
.pote.balancar { animation: balancar 0.5s ease; }
@keyframes balancar {
  25% { transform: rotate(-8deg); }
  75% { transform: rotate(8deg); }
}
.pote-tampa {
  position: absolute; left: 25px; right: 25px; top: 0; height: 26px;
  background: linear-gradient(180deg, #c94a6b, var(--vinho));
  border-radius: 8px 8px 4px 4px;
  z-index: 2;
}
.pote-vidro {
  position: absolute; left: 0; right: 0; top: 20px; bottom: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0.75), rgba(255,255,255,0.35) 40%, rgba(255,255,255,0.65));
  border: 3px solid rgba(255,255,255,0.95);
  border-radius: 30px 30px 40px 40px;
  box-shadow: var(--sombra), inset 0 0 20px rgba(232,135,156,0.25);
}
/* Os papeizinhos são criados pelo script, um para cada motivo */
.papel {
  position: absolute;
  width: 44px; height: 24px;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  transform: rotate(var(--giro, 0deg));
}
/* Papel dobrado: uma risquinha no meio */
.papel::after {
  content: "";
  position: absolute; left: 50%; top: 3px; bottom: 3px;
  border-left: 1px dashed rgba(122, 31, 61, 0.2);
}
.papel.saindo { animation: papelSai 0.7s ease-in forwards; z-index: 3; }
@keyframes papelSai {
  30%  { transform: translateY(-20px) rotate(var(--giro)) scale(1.1); opacity: 1; }
  100% { transform: translateY(-200px) rotate(calc(var(--giro) + 160deg)) scale(0.6); opacity: 0; }
}
.pote:disabled { cursor: default; }
.pote-rotulo {
  position: absolute; left: 50%; top: 38px;
  transform: translateX(-50%);
  background: var(--papel);
  padding: 2px 16px;
  border-radius: 6px;
  font-size: 1.6rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  z-index: 1;
}
.bilhete {
  position: relative;
  margin: 28px auto 0;
  max-width: 380px;
  background: #fff9e6;
  padding: 26px 24px 30px;
  border-radius: 4px;
  box-shadow: var(--sombra);
  transform: rotate(-1deg);
  animation: bilheteSai 0.6s cubic-bezier(.2,.8,.3,1.3);
}
.bilhete::before {
  content: "";
  position: absolute; left: 50%; top: -10px;
  width: 70px; height: 20px; margin-left: -35px;
  background: rgba(232, 135, 156, 0.55);
  transform: rotate(-3deg);
}
@keyframes bilheteSai {
  from { opacity: 0; transform: translateY(-50px) scale(0.6) rotate(-10deg); }
  to   { opacity: 1; transform: rotate(-1deg); }
}
.bilhete p { margin: 0; font-size: 1.1rem; font-style: italic; }
.bilhete-numero {
  position: absolute; right: 12px; bottom: 6px;
  font-size: 0.75rem; color: var(--texto-suave);
}

/* ===== 6. Quiz ===== */
.quiz {
  background: rgba(255, 253, 248, 0.92);
  border-radius: 24px;
  padding: 26px 20px;
  box-shadow: var(--sombra);
}
.quiz-progresso { font-size: 0.85rem; color: var(--texto-suave); margin-bottom: 8px; }
.quiz-barra { height: 6px; background: var(--rosa-claro); border-radius: 3px; overflow: hidden; margin-bottom: 20px; }
.quiz-barra div { height: 100%; background: linear-gradient(90deg, var(--rosa), var(--vinho)); transition: width 0.4s; }
.quiz-pergunta { font-size: 1.2rem; font-weight: 600; color: var(--vinho); margin: 0 0 18px; }
.quiz-opcoes { display: flex; flex-direction: column; gap: 10px; }
.quiz-opcao {
  font-family: inherit; font-size: 1rem;
  padding: 14px 16px;
  border: 2px solid var(--rosa-claro);
  border-radius: 14px;
  background: #fff;
  color: var(--texto);
  cursor: pointer;
  transition: all 0.2s;
}
.quiz-opcao:disabled { cursor: default; }
.quiz-opcao.certa { background: #e9f7ee; border-color: #6cbf8a; color: #2d6b43; }
.quiz-opcao.errada { background: #fdecef; border-color: var(--rosa); color: var(--vinho); }
.quiz-feedback { min-height: 1.6em; margin: 16px 0 0; font-style: italic; color: var(--vinho); }
.quiz .botao { margin-top: 14px; }
.quiz-fim h3 { font-size: 2.4rem; margin: 0 0 6px; }
.quiz-fim p { margin: 0 0 6px; }


/* ===== Datas ===== */
.proxima { display: flex; align-items: baseline; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--rosa-claro); }
.proxima:last-child { border-bottom: none; }
.proxima-emoji { font-size: 1.3rem; }
.proxima-texto { flex: 1; font-weight: 600; }
.proxima-quando { font-size: 0.8rem; color: var(--texto-suave); text-align: right; }

.cal-topo { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-topo strong { color: var(--vinho); text-transform: capitalize; }
.cal-topo .mini { font-size: 1.2rem; padding: 2px 14px; }
.cal-grade { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-semana { font-size: 0.75rem; color: var(--texto-suave); font-weight: 600; }
.cal-dia {
  font-family: inherit;
  aspect-ratio: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: none; border-radius: 10px;
  background: transparent; color: var(--texto);
  font-size: 0.9rem; line-height: 1.1;
  cursor: pointer;
  padding: 0;
}
.cal-dia small { font-size: 0.7rem; }
.cal-dia.tem-data { background: var(--rosa-claro); }
.cal-dia.hoje { box-shadow: inset 0 0 0 2px var(--rosa); font-weight: 600; }
.cal-dia.selecionado { background: var(--vinho); color: #fff; }

/* ===== Vales ===== */
.vale {
  display: flex;
  margin-top: 14px;
  background: #fff9e6;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(122, 31, 61, 0.12);
}
.vale-emoji {
  flex: none;
  width: 70px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  background: linear-gradient(160deg, var(--rosa), var(--vinho));
  border-right: 3px dashed #fff9e6;
}
.vale-corpo { flex: 1; padding: 12px 14px; }
.vale-corpo h3 { margin: 0; font-size: 1.1rem; color: var(--vinho); }
.vale-de { margin: 0; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--texto-suave); }
.vale-descricao { margin: 4px 0 0; font-size: 0.9rem; white-space: pre-line; }
.vale-estado { margin: 8px 0 0; font-size: 0.85rem; font-style: italic; color: var(--texto-suave); }
.vale-alerta { color: #d6334f; font-weight: 600; font-style: normal; }
.vale .botao { margin-top: 10px; padding: 10px 20px; font-size: 0.9rem; }
.vale-cumprido { opacity: 0.6; }
.vale-pedido { box-shadow: 0 0 0 2px var(--rosa), 0 3px 10px rgba(122, 31, 61, 0.12); }

/* Botão de novo momento, continuando a linha do tempo */
#painel-historia { margin: 0; padding: 0 0 0 28px; border: none; background: none; }
.momento-novo {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  color: var(--vinho);
  background: rgba(255, 253, 248, 0.7);
  border: 2px dashed var(--rosa);
  border-radius: 16px;
  padding: 16px;
  cursor: pointer;
}
.momento .item-acoes { margin-top: 12px; }

.secao-acoes { padding-top: 0 !important; }

/* ===== Painel do administrador ===== */
#admin > .mini { margin-bottom: 16px; }
.tabela-menu { display: grid; align-items: center; gap: 10px 6px; }
.tabela-menu strong { font-size: 0.85rem; color: var(--vinho); text-align: center; }
.celula-interruptor { display: flex; justify-content: center; }

.conta { margin-bottom: 10px; }
.conta-nome { font-weight: 600; color: var(--vinho); }

.perfil-cartao { text-align: center; }
.perfil-avatar {
  width: 76px; height: 76px;
  margin: 0 auto 10px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--rosa), var(--vinho));
  color: #fff;
  font-size: 2rem;
  font-weight: 600;
  box-shadow: var(--sombra);
}
.perfil-nome { margin: 0; font-size: 1.3rem; font-weight: 600; color: var(--vinho); }
.perfil-cartao .painel-dica { margin: 2px 0 0; }
.botao-adicionar.botao-sair { color: #a3263f; margin-top: 22px; }

/* ===== Novidades ===== */
.secao-novidades { padding-bottom: 0; }
.novidades { border: 2px solid var(--rosa); }
.novidade {
  display: flex; align-items: flex-start; gap: 10px;
  width: 100%;
  text-align: left;
  font-family: inherit; font-size: 0.95rem;
  color: var(--texto);
  background: none;
  border: none;
  border-bottom: 1px solid var(--rosa-claro);
  padding: 10px 2px;
  cursor: pointer;
}
.novidade-emoji { font-size: 1.2rem; }

/* ===== Tô com saudade ===== */
.secao-saudade { padding-top: 8px; padding-bottom: 8px; }
.botao-saudade {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: inherit; font-size: 1.1rem; font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #e8879c, #c23a5d);
  border: none;
  border-radius: 999px;
  padding: 14px 28px;
  box-shadow: var(--sombra);
  cursor: pointer;
}
.botao-saudade:disabled { opacity: 0.8; }
.saudade-coracao { font-size: 1.5rem; }
.botao-saudade.pulsar .saudade-coracao { animation: batida 0.9s ease 2; display: inline-block; }
.secao-saudade .painel-dica { margin-top: 10px; text-align: center; }

/* ===== Abra quando… ===== */
.envelopes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 8px; }
.envelope-carta {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-family: inherit;
  color: #fff;
  background: linear-gradient(160deg, #c94a6b, var(--vinho));
  border: none;
  border-radius: 14px;
  padding: 18px 10px;
  box-shadow: var(--sombra);
  cursor: pointer;
}
.envelope-carta:active { transform: scale(0.97); }
.envelope-carta-icone { font-size: 2rem; }
.envelope-carta-abra { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.85; }
.envelope-carta-quando { font-family: "Great Vibes", cursive; font-size: 1.5rem; line-height: 1.2; }
.envelope-carta.aberta { background: var(--papel); color: var(--vinho); border: 2px solid var(--rosa-claro); box-shadow: none; }

.desejo-recebido { opacity: 0.6; }

/* ===== Avisos (notificações) ===== */
.secao-convite { padding-bottom: 0; }
.convite { border: 2px solid var(--rosa); text-align: left; }
.convite-fechar { display: block; margin: 10px auto 0; }
.passos-instalar { margin: 8px 0 0; padding-left: 22px; font-size: 0.92rem; }
.passos-instalar li { margin-bottom: 6px; }
.bloco-avisos .avisos-o-que { margin-top: 16px; }
.linha-aviso {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--rosa-claro);
  font-size: 0.92rem;
  cursor: pointer;
}
.linha-aviso:last-child { border-bottom: none; }
.linha-aviso .interruptor { flex: none; }

/* ===== Pote: ver todos / colocar de volta ===== */
.pote-acoes { margin-top: 18px; }
.pote-acoes .botao-adicionar { margin-bottom: 12px; }
.papel.voltando { animation: papelVolta 0.6s ease-out both; }
@keyframes papelVolta {
  from { transform: translateY(-160px) rotate(calc(var(--giro) - 90deg)) scale(0.7); opacity: 0; }
  to   { transform: rotate(var(--giro)); opacity: 1; }
}
.lista-bilhetes {
  text-align: left;
  background: rgba(255, 253, 248, 0.92);
  border-radius: 20px;
  padding: 14px 16px;
  box-shadow: var(--sombra);
}
.lista-bilhetes summary { cursor: pointer; font-weight: 600; color: var(--vinho); }
.lista-bilhetes-grade { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 14px; }
.bilhete-mini {
  background: #fff9e6;
  padding: 12px 14px;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(122, 31, 61, 0.12);
  transform: rotate(var(--giro, 0deg));
}
.bilhete-mini p { margin: 0; font-style: italic; white-space: pre-line; }
