/* ============================================================
   CALENDÁRIO DO ADVENTO — estilos
   ============================================================ */
:root {
  --noite-1: #0d1b4c;
  --noite-2: #1b1150;
  --noite-3: #2a1d6e;
  --ouro: #ffc83d;
  --ouro-claro: #fff1b8;
  --vermelho: #e8434f;
  --verde: #23a26d;
  --azul: #3b82f6;
  --roxo: #8b5cf6;
  --laranja: #ff8a3d;
  --rosa: #ff6fa8;
  --creme: #fffaf0;
  --papel: #fff8e6;
  --texto: #2b2340;
  --texto-suave: #6b6385;
  --sombra: 0 10px 30px rgba(10, 8, 40, .35);
  --raio: 22px;
  --f-titulo: "Fredoka", "Nunito", system-ui, sans-serif;
  --f-corpo: "Nunito", system-ui, sans-serif;
  --f-carta: "Patrick Hand", "Comic Sans MS", cursive;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--f-corpo);
  color: #fff;
  background: radial-gradient(ellipse at 50% 0%, var(--noite-3) 0%, var(--noite-1) 55%, #070d2b 100%) fixed;
  background-color: var(--noite-1);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
button { font-family: inherit; cursor: pointer; }
.oculto { display: none !important; }

#neve, #confete { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#neve { z-index: 1; }
#confete { z-index: 60; }

.tela { display: none; position: relative; z-index: 2; min-height: 100vh; min-height: 100dvh; }
.tela.ativa { display: block; }

/* ---------- botões ---------- */
.btn-grande {
  font-family: var(--f-titulo); font-weight: 700; font-size: clamp(1.1rem, 2.6vw, 1.45rem);
  color: #5a3200; border: 0; border-radius: 999px; padding: .9em 1.8em;
  background: linear-gradient(180deg, #ffe17a, var(--ouro) 60%, #f0a500);
  box-shadow: 0 6px 0 #b77600, 0 12px 30px rgba(255, 200, 61, .45);
  transition: transform .12s, box-shadow .12s;
}
.btn-grande:hover { transform: translateY(-2px) scale(1.03); }
.btn-grande:active { transform: translateY(4px); box-shadow: 0 2px 0 #b77600, 0 6px 16px rgba(255, 200, 61, .4); }
.btn-pequeno {
  font-family: var(--f-titulo); font-weight: 600; font-size: 1rem; border: 0; border-radius: 999px;
  padding: .6em 1.2em; background: #fff; color: var(--noite-1); box-shadow: 0 4px 0 #c9c4e8;
}
.btn-pequeno:active { transform: translateY(3px); box-shadow: 0 1px 0 #c9c4e8; }
.btn-pequeno:disabled { opacity: .4; cursor: default; }
.btn-redondo {
  width: 46px; height: 46px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.12); font-size: 1.3rem; color: #fff; backdrop-filter: blur(6px);
}
.btn-redondo.ligado { background: var(--ouro); border-color: #fff; }
.link { background: none; border: 0; color: var(--azul); text-decoration: underline; font-weight: 700; padding: .3em; }

/* ============================================================
   ABERTURA
   ============================================================ */
#abertura { overflow: hidden; height: 100vh; height: 100dvh; background: linear-gradient(180deg, #08113a 0%, var(--noite-2) 45%, #3a2a7a 100%); }
.ceu-estrelas { position: absolute; inset: 0; }
.ceu-estrelas i {
  position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff;
  animation: piscar 2.4s infinite ease-in-out;
}
.lua {
  position: absolute; top: 7%; right: 9%; width: clamp(50px, 9vw, 110px); aspect-ratio: 1; border-radius: 50%;
  box-shadow: inset -14px 6px 0 0 #fff4c9, 0 0 40px rgba(255, 244, 201, .25);
  transform: rotate(-20deg); opacity: 0; animation: surgir 1.6s .3s forwards;
}
#estrela-guia {
  position: absolute; width: clamp(56px, 9vw, 96px); left: -12%; top: 4%; z-index: 3;
  filter: drop-shadow(0 0 18px #ffe37a) drop-shadow(0 0 40px #ffc83d);
  animation: voo-estrela 3.2s .4s cubic-bezier(.45,.05,.3,1) forwards;
}
#estrela-guia svg { width: 100%; display: block; animation: girar-lento 8s linear infinite; }
@keyframes voo-estrela {
  0% { left: -12%; top: 4%; transform: scale(.4); }
  45% { left: 30%; top: 2%; transform: scale(.7); }
  80% { left: 52%; top: 5%; transform: scale(1.15); }
  100% { left: calc(50% - clamp(28px, 4.5vw, 48px)); top: 2%; transform: scale(1); }
}
.rastro {
  position: absolute; z-index: 2; width: 6px; height: 6px; border-radius: 50%; pointer-events: none;
  background: #fff6c2; box-shadow: 0 0 10px #ffd84d; animation: rastro 1.1s forwards;
}
@keyframes rastro { to { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; } }
.feixe {
  position: absolute; left: 50%; top: 8%; width: 46vw; max-width: 520px; height: 78%; transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(255, 230, 140, .32), rgba(255, 230, 140, 0) 85%);
  clip-path: polygon(48% 0, 52% 0, 72% 100%, 28% 100%); opacity: 0; z-index: 1;
}
.chegou .feixe { animation: surgir 1.6s forwards; }

.abertura-conteudo {
  position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; padding: 16px; padding-top: 12vh; padding-bottom: 20vh;
}
.abertura-conteudo .escola-nome {
  font-family: var(--f-titulo); letter-spacing: .25em; text-transform: uppercase; font-size: .9rem;
  color: var(--ouro-claro); opacity: 0; margin: 0 0 .6em;
}
.chegou .abertura-conteudo .escola-nome { animation: subir .8s .2s forwards; }
.titulo-animado { margin: 0; line-height: .95; font-family: var(--f-titulo); font-weight: 700; }
.titulo-animado .linha { display: block; font-size: clamp(2.8rem, 10vw, 6.4rem); white-space: nowrap; }
.titulo-animado .linha.menor { font-size: clamp(2rem, 7vw, 4.4rem); }
.titulo-animado .letra {
  display: inline-block; opacity: 0; transform: translateY(-120px) rotate(-20deg) scale(.4);
  text-shadow: 0 4px 0 rgba(0,0,0,.25), 0 0 24px rgba(255,255,255,.25);
  -webkit-text-stroke: 2px rgba(255,255,255,.9); paint-order: stroke fill;
}
.chegou .titulo-animado .letra { animation: cair-letra .9s cubic-bezier(.3,1.6,.5,1) forwards, balanco-letra 3s ease-in-out infinite; animation-delay: var(--d), calc(var(--d) + 1s); }
@keyframes cair-letra { to { opacity: 1; transform: none; } }
@keyframes balanco-letra { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-6px) rotate(var(--r, 2deg)); } }
.subtitulo { font-size: clamp(1rem, 2.6vw, 1.35rem); margin: .9em 0 .2em; opacity: 0; max-width: 34ch; }
.contagem {
  font-family: var(--f-titulo); font-weight: 600; font-size: clamp(1rem, 2.4vw, 1.25rem); opacity: 0;
  background: rgba(255,255,255,.12); border: 2px dashed rgba(255,255,255,.35); padding: .4em 1em; border-radius: 999px; margin: .6em 0 1.4em;
}
#btn-comecar { opacity: 0; }
.chegou .subtitulo { animation: subir .8s 1.6s forwards; }
.chegou .contagem { animation: subir .8s 1.9s forwards; }
.chegou #btn-comecar { animation: subir .8s 2.2s forwards, pulsar-btn 1.6s 3s infinite; }
@keyframes pulsar-btn { 0%,100% { transform: scale(1); } 50% { transform: scale(1.07); } }

.belem { position: absolute; left: 0; bottom: 0; width: 100%; height: 34vh; min-height: 200px; z-index: 2; }
.belem .janelas rect { animation: janela 3s infinite alternate; }
.belem .janelas rect:nth-child(2n) { animation-delay: 1.2s; }
.belem .porta-luz { filter: drop-shadow(0 0 14px #ffcc4d); }
.chegou .belem .porta-luz { animation: janela 2s infinite alternate; }
@keyframes janela { from { opacity: .65; } to { opacity: 1; } }

.personagens span { position: absolute; z-index: 3; font-size: clamp(1.8rem, 4vw, 3rem); opacity: 0; }
.p-anjo { top: 20%; left: 12%; }
.chegou .p-anjo { animation: surgir 1s 1.4s forwards, flutuar 3.5s 1.4s ease-in-out infinite; }
.p-ovelha { bottom: 7vh; }
.p-ovelha.o1 { left: -10%; }
.p-ovelha.o2 { left: -18%; font-size: clamp(1.4rem, 3vw, 2.2rem); }
.chegou .p-ovelha.o1 { opacity: 1; animation: atravessar 14s 1s linear infinite; }
.chegou .p-ovelha.o2 { opacity: 1; animation: atravessar 14s 2.2s linear infinite; }
@keyframes atravessar {
  0% { left: -10%; transform: translateY(0) scaleX(-1); } 5% { transform: translateY(-14px) scaleX(-1); } 10% { transform: translateY(0) scaleX(-1); }
  15% { transform: translateY(-14px) scaleX(-1); } 20% { transform: translateY(0) scaleX(-1); } 100% { left: 110%; transform: translateY(0) scaleX(-1); }
}
.btn-pular {
  position: absolute; z-index: 5; right: 16px; bottom: 16px; border: 0; border-radius: 999px; padding: .5em 1em;
  background: rgba(255,255,255,.15); color: #fff; font-weight: 700; backdrop-filter: blur(4px);
}

.transicao {
  position: fixed; inset: 0; z-index: 80; pointer-events: none;
  background: radial-gradient(circle, #fff6c2 0%, var(--ouro) 40%, #ff9f1c 100%);
  clip-path: circle(0% at 50% 50%); animation: wipe 1.1s ease-in-out forwards;
}
@keyframes wipe { 0% { clip-path: circle(0% at var(--x,50%) var(--y,50%)); } 50% { clip-path: circle(150% at var(--x,50%) var(--y,50%)); opacity: 1; } 100% { clip-path: circle(150% at 50% 50%); opacity: 0; } }

/* ============================================================
   ENTRAR
   ============================================================ */
#entrar { display: none; align-items: center; justify-content: center; padding: 24px 16px; }
#entrar.ativa { display: flex; }
.cartao-entrar {
  width: 100%; max-width: 440px; background: var(--creme); color: var(--texto); border-radius: 28px;
  padding: 28px 22px; box-shadow: var(--sombra), 0 0 0 6px rgba(255,255,255,.12); animation: entrar-pop .6s cubic-bezier(.3,1.5,.5,1);
  position: relative;
}
.cartao-entrar::before {
  content: ""; position: absolute; inset: -6px; border-radius: 34px; z-index: -1;
  background: repeating-linear-gradient(45deg, var(--vermelho) 0 14px, #fff 14px 28px);
}
@keyframes entrar-pop { from { transform: scale(.7) rotate(-4deg); opacity: 0; } }
.entrar-topo { text-align: center; }
.entrar-icone { font-size: 3rem; display: inline-block; animation: balancar 2.4s ease-in-out infinite; }
.entrar-topo h2 { font-family: var(--f-titulo); margin: .2em 0 .1em; color: var(--vermelho); font-size: 1.8rem; }
.entrar-topo p { margin: 0 0 1em; color: var(--texto-suave); }
.abas { display: flex; background: #efe7d4; border-radius: 999px; padding: 4px; margin-bottom: 1em; }
.aba { flex: 1; border: 0; background: none; border-radius: 999px; padding: .6em; font-family: var(--f-titulo); font-weight: 600; font-size: 1rem; color: var(--texto-suave); }
.aba.ativa { background: #fff; color: var(--vermelho); box-shadow: 0 2px 8px rgba(0,0,0,.1); }
.form { display: flex; flex-direction: column; gap: .8em; }
.form label { display: flex; flex-direction: column; gap: .3em; font-weight: 800; font-size: .92rem; }
.form small { font-weight: 500; color: var(--texto-suave); }
.form input {
  font: inherit; font-weight: 600; padding: .75em .9em; border-radius: 14px; border: 2px solid #e2d8c0; background: #fff; color: var(--texto);
}
.form input:focus { outline: none; border-color: var(--ouro); box-shadow: 0 0 0 4px rgba(255,200,61,.3); }
.form .btn-grande { margin-top: .4em; }
.input-codigo { text-transform: uppercase; letter-spacing: .25em; font-family: var(--f-titulo) !important; text-align: center; }
.bloco-codigo { background: #fff3d1; border-radius: 16px; padding: .8em; }
.codigo-status { margin: .5em 0 0; font-weight: 800; min-height: 1.2em; }
.codigo-status.ok { color: var(--verde); }
.codigo-status.erro { color: var(--vermelho); }
.sem-codigo { display: flex; flex-direction: column; gap: .8em; }
.dica { margin: 0; font-size: .9rem; color: var(--texto-suave); }
.msg { min-height: 1.2em; margin: .8em 0 0; font-weight: 800; text-align: center; }
.msg.erro { color: var(--vermelho); }
.msg.ok { color: var(--verde); }
.dica-demo { background: #e8f3ff; color: #1d4e89; border-radius: 12px; padding: .7em; font-size: .85rem; margin: .8em 0 0; }

/* ============================================================
   CALENDÁRIO
   ============================================================ */
#calendario { padding: 0 16px 40px; max-width: 1100px; margin: 0 auto; }
.topo { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0 8px; }
.topo-esq { display: flex; align-items: center; gap: 10px; }
.topo-estrela { font-size: 2.4rem; animation: girar-lento 10s linear infinite; display: inline-block; filter: drop-shadow(0 0 10px #ffc83d); }
.topo h1 { font-family: var(--f-titulo); margin: 0; font-size: clamp(1.3rem, 3.6vw, 2.1rem); line-height: 1; }
.topo .escola-nome { margin: .2em 0 0; color: var(--ouro-claro); font-weight: 700; font-size: .9rem; }
.topo-dir { display: flex; gap: 8px; }
.faixa-previa { background: #ffe9a8; color: #6a4a00; border-radius: 12px; padding: .5em .9em; font-weight: 700; font-size: .85rem; margin: 6px 0; text-align: center; }
.saudacao { background: rgba(255,255,255,.1); border: 2px solid rgba(255,255,255,.18); border-radius: var(--raio); padding: 14px 16px; margin: 10px 0 20px; backdrop-filter: blur(6px); }
.saudacao p { margin: 0 0 10px; font-size: 1.08rem; font-weight: 700; }
.placar { display: flex; gap: 10px; flex-wrap: wrap; }
.placar-item { flex: 1; min-width: 130px; background: rgba(255,255,255,.12); border-radius: 16px; padding: .5em .8em; font-family: var(--f-titulo); font-size: 1.6rem; font-weight: 700; }
.placar-item span { color: var(--ouro); }
.placar-item small { display: block; font-family: var(--f-corpo); font-size: .78rem; font-weight: 700; opacity: .85; }
.barra { position: relative; height: 16px; background: rgba(0,0,0,.25); border-radius: 999px; margin-top: 14px; }
.barra-fill { height: 100%; width: 0; border-radius: 999px; background: repeating-linear-gradient(45deg, var(--vermelho) 0 10px, #ff6b75 10px 20px); transition: width 1s cubic-bezier(.3,1.3,.5,1); }
.barra-boneco { position: absolute; top: -20px; left: 0; font-size: 1.6rem; transform: translateX(-50%) scaleX(-1); transition: left 1s cubic-bezier(.3,1.3,.5,1); animation: pular 1.2s infinite; }

.grade { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
@media (max-width: 860px) { .grade { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 520px) { .grade { grid-template-columns: repeat(3, 1fr); gap: 10px; } }

.porta {
  --cor: var(--vermelho); --fita: var(--ouro);
  position: relative; aspect-ratio: 1 / 1.08; border: 0; border-radius: 18px; padding: 0; color: #fff;
  background:
    linear-gradient(90deg, transparent 43%, var(--fita) 43% 57%, transparent 57%),
    linear-gradient(180deg, transparent 43%, var(--fita) 43% 57%, transparent 57%),
    radial-gradient(circle at 30% 20%, rgba(255,255,255,.35), transparent 50%),
    var(--cor);
  box-shadow: 0 6px 0 rgba(0,0,0,.25), 0 10px 22px rgba(0,0,0,.3);
  transition: transform .2s; opacity: 0; animation: porta-entra .6s cubic-bezier(.3,1.5,.5,1) forwards; animation-delay: var(--d);
  overflow: visible;
}
@keyframes porta-entra { from { opacity: 0; transform: scale(.3) rotate(-15deg); } to { opacity: 1; transform: none; } }
.porta:hover { transform: translateY(-4px) rotate(-2deg) scale(1.04); }
.porta .num {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 56%; aspect-ratio: 1; border-radius: 50%; background: #fff; color: var(--cor);
  display: grid; place-items: center; font-family: var(--f-titulo); font-weight: 700; font-size: clamp(1.5rem, 4.4vw, 2.5rem);
  box-shadow: 0 3px 0 rgba(0,0,0,.18);
}
.porta .laco { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); font-size: 1.7rem; filter: drop-shadow(0 2px 2px rgba(0,0,0,.3)); }
.porta .cadeado { position: absolute; right: 6px; bottom: 6px; font-size: 1rem; background: rgba(0,0,0,.25); border-radius: 50%; width: 28px; height: 28px; display: grid; place-items: center; }
.porta.trancada { filter: saturate(.55) brightness(.85); }
.porta.trancada .laco { display: none; }
.porta.trancada::after { content: "❄"; position: absolute; left: 8px; top: 6px; font-size: 1rem; opacity: .8; }
.porta.hoje { animation: porta-entra .6s cubic-bezier(.3,1.5,.5,1) forwards, chamar 1.4s 1.2s ease-in-out infinite; animation-delay: var(--d), calc(var(--d) + .8s); z-index: 2; }
.porta.hoje::before {
  content: "HOJE!"; position: absolute; top: -12px; right: -8px; z-index: 3; background: var(--ouro); color: #5a3200;
  font-family: var(--f-titulo); font-weight: 700; font-size: .8rem; padding: .2em .55em; border-radius: 999px; transform: rotate(12deg);
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
}
@keyframes chamar { 0%,100% { transform: rotate(0) scale(1); box-shadow: 0 6px 0 rgba(0,0,0,.25), 0 0 0 0 rgba(255,200,61,.8); } 25% { transform: rotate(-4deg) scale(1.06); } 75% { transform: rotate(4deg) scale(1.06); box-shadow: 0 6px 0 rgba(0,0,0,.25), 0 0 0 12px rgba(255,200,61,0); } }
.porta.aberta { background: radial-gradient(circle at 50% 40%, #fffdf5, #ffeec2); box-shadow: inset 0 0 0 4px var(--cor), 0 6px 0 rgba(0,0,0,.2); }
.porta.aberta .num { background: none; box-shadow: none; font-size: clamp(2rem, 6vw, 3.2rem); width: auto; top: 44%; }
.porta.aberta .laco { display: none; }
.porta .rotulo-aberta { position: absolute; bottom: 6px; left: 0; right: 0; text-align: center; font-family: var(--f-titulo); font-weight: 700; color: var(--cor); font-size: .95rem; }
.porta .check { position: absolute; top: 6px; right: 8px; font-size: .95rem; }
.porta.tremer { animation: tremer .5s !important; opacity: 1; }
@keyframes tremer { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-8px) rotate(-4deg); } 40% { transform: translateX(8px) rotate(4deg); } 60% { transform: translateX(-6px); } 80% { transform: translateX(6px); } }

.porta.especial { --cor: #c2185b; --fita: #fff1b8; background:
    linear-gradient(90deg, transparent 43%, var(--fita) 43% 57%, transparent 57%),
    linear-gradient(180deg, transparent 43%, var(--fita) 43% 57%, transparent 57%),
    radial-gradient(circle at 50% 50%, #ffcf5c, #ff8a3d 50%, #c2185b); }
.porta.especial .selo-surpresa { position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%); background: #fff; color: #c2185b; font-family: var(--f-titulo); font-weight: 700; font-size: .72rem; padding: .15em .6em; border-radius: 999px; white-space: nowrap; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.porta.natal { grid-column: 1 / -1; aspect-ratio: auto; min-height: 130px; --cor: #7a2cff; }
.porta.natal { background: radial-gradient(circle at 50% 120%, #ffcf5c 0%, #ff8a3d 35%, #c2185b 75%, #6a1b9a 100%); }
.porta.natal .num { width: auto; aspect-ratio: auto; padding: .3em .9em; border-radius: 999px; font-size: clamp(1.3rem, 4vw, 2.2rem); white-space: nowrap; color: #c2185b; }

.sem-filho { margin: 20px 0 0; background: #fff3d1; color: var(--texto); border-radius: 18px; padding: 14px; text-align: center; }
.sem-filho p { margin: 0 0 .6em; font-weight: 700; }
.linha-form { display: flex; gap: 8px; justify-content: center; }
.linha-form input { font: inherit; font-weight: 700; padding: .55em .8em; border-radius: 12px; border: 2px solid #e2d8c0; width: 160px; }
.rodape { text-align: center; margin-top: 30px; opacity: .75; font-size: .9rem; }

/* ============================================================
   MODAL DO DIA
   ============================================================ */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(6, 8, 30, .72); backdrop-filter: blur(6px); display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 20px 12px 40px; }
.modal[hidden] { display: none; }
.modal-caixa {
  position: relative; width: 100%; max-width: 640px; background: var(--creme); color: var(--texto);
  border-radius: 28px; padding: 14px 14px 22px; box-shadow: var(--sombra); animation: modal-pop .55s cubic-bezier(.3,1.5,.5,1);
}
@keyframes modal-pop { from { transform: scale(.5) translateY(40px); opacity: 0; } }
.fechar { position: absolute; top: -12px; right: -6px; z-index: 6; width: 44px; height: 44px; border-radius: 50%; border: 3px solid #fff; background: var(--vermelho); color: #fff; font-size: 1.2rem; font-weight: 800; box-shadow: 0 4px 10px rgba(0,0,0,.3); }

.cena-moldura { container-type: inline-size; position: relative; border-radius: 20px; overflow: hidden; aspect-ratio: 16 / 10; perspective: 1200px; background: #0d1b4c; box-shadow: inset 0 0 0 5px rgba(255,255,255,.4); }
.cena { position: absolute; inset: 0; overflow: hidden; }
.cena .item { position: absolute; transform: translate(-50%, -50%) scale(0); line-height: 1; animation: item-entra .7s cubic-bezier(.3,1.7,.5,1) forwards; animation-delay: var(--d); }
.cena .item > span { display: inline-block; filter: drop-shadow(0 4px 6px rgba(0,0,0,.25)); }
@keyframes item-entra { to { transform: translate(-50%, -50%) scale(1); } }

/* fundos */
.cena.noite { background: radial-gradient(ellipse at 50% 120%, #3a2a7a 0%, #16124a 55%, #070d2b 100%); }
.cena.dia { background: linear-gradient(180deg, #7ec8ff 0%, #bfe6ff 60%, #e8f8ff 100%); }
.cena.dia::after { content: ""; position: absolute; left: -10%; right: -10%; bottom: -30%; height: 55%; border-radius: 50%; background: #7cd67f; box-shadow: 0 -10px 0 #5fc463 inset; }
.cena.campo { background: radial-gradient(ellipse at 50% 110%, #2c3f8a, #121a4f 60%, #070d2b); }
.cena.campo::after { content: ""; position: absolute; left: -20%; right: -20%; bottom: -35%; height: 62%; border-radius: 50%; background: #2c6e49; box-shadow: inset 0 14px 0 #3d8b5d; }
.cena.estabulo { background: radial-gradient(ellipse at 50% 70%, #ffd685 0%, #e09b45 40%, #7a4a1d 80%, #4a2c12 100%); }
.cena.estabulo::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 22%; background: repeating-linear-gradient(100deg, #e9c46a 0 6px, #d4a94f 6px 11px); opacity: .85; }
.cena.deserto { background: linear-gradient(180deg, #1a1350 0%, #4b2a7a 55%, #c96a5a 100%); }
.cena.deserto::after { content: ""; position: absolute; left: -20%; right: -20%; bottom: -30%; height: 55%; border-radius: 50% 50% 0 0; background: #e3a75c; box-shadow: inset 0 12px 0 #f0bf74; }
.cena.casa { background: radial-gradient(ellipse at 50% 40%, #fff1c9, #f6c97c 60%, #c98a3e); }
.cena.casa::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 20%; background: #a8692d; box-shadow: inset 0 6px 0 #c6884a; }
.cena.festa { background: radial-gradient(circle at 50% 50%, #fff3b0, #ffb347 45%, #ff6f91 80%, #9b5de5); }
.cena .ponto { position: absolute; width: 3px; height: 3px; background: #fff; border-radius: 50%; animation: piscar 2s infinite; }
.cena .bolinha { position: absolute; width: 10px; height: 10px; border-radius: 50%; opacity: .5; animation: subir-bolinha 6s linear infinite; }
@keyframes subir-bolinha { from { transform: translateY(0); } to { transform: translateY(-120%); opacity: 0; } }
.cena .item, .cena .ponto, .cena .bolinha { z-index: 1; }

/* animações dos itens */
.a-flutuar { animation: flutuar 3s ease-in-out infinite; }
.a-brilhar { animation: brilhar 1.8s ease-in-out infinite; }
.a-pular { animation: pular 1s ease-in-out infinite; }
.a-balancar { animation: balancar 2.2s ease-in-out infinite; transform-origin: 50% 90%; }
.a-voar { animation: voar 4s ease-in-out infinite; }
.a-girar { animation: girar-lento 4s linear infinite; }
.a-pulsar { animation: pulsar 1.8s ease-in-out infinite; }
.a-cair { animation: cair 3s ease-in infinite; }
.a-andar { animation: andar 2.4s ease-in-out infinite; }
.a-piscar { animation: piscar 1.6s ease-in-out infinite; }
@keyframes flutuar { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14%); } }
@keyframes brilhar { 0%,100% { transform: scale(1) rotate(0); filter: drop-shadow(0 0 4px #fff59d); } 50% { transform: scale(1.18) rotate(8deg); filter: drop-shadow(0 0 18px #ffeb3b); } }
@keyframes pular { 0%,100% { transform: translateY(0); } 40% { transform: translateY(-28%) scaleY(1.05); } 60% { transform: translateY(0) scaleY(.92); } }
@keyframes balancar { 0%,100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg); } }
@keyframes voar { 0%,100% { transform: translate(0,0) rotate(-6deg); } 25% { transform: translate(40%,-20%) rotate(6deg); } 50% { transform: translate(80%,0) rotate(-6deg); } 75% { transform: translate(40%,15%) rotate(6deg); } }
@keyframes girar-lento { to { transform: rotate(360deg); } }
@keyframes pulsar { 0%,100% { transform: scale(1); } 50% { transform: scale(1.1); } }
@keyframes cair { from { transform: translateY(-60%); } to { transform: translateY(60%); } }
@keyframes andar { 0%,100% { transform: translateX(-12%) rotate(-3deg); } 50% { transform: translateX(12%) rotate(3deg); } }
@keyframes piscar { 0%,100% { opacity: .3; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); } }
@keyframes surgir { to { opacity: 1; } }
@keyframes subir { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

/* portas que abrem por cima da cena */
.folha {
  position: absolute; top: 0; bottom: 0; width: 50%; z-index: 3; transition: transform 1.1s cubic-bezier(.5,0,.2,1);
  background:
    linear-gradient(0deg, transparent 44%, var(--ouro) 44% 56%, transparent 56%),
    radial-gradient(circle at 50% 30%, rgba(255,255,255,.25), transparent 60%),
    var(--cor-porta, var(--vermelho));
  backface-visibility: hidden;
}
.folha.esq { left: 0; transform-origin: left center; border-right: 2px solid rgba(0,0,0,.2); }
.folha.dir { right: 0; transform-origin: right center; border-left: 2px solid rgba(0,0,0,.2); }
.folha span { position: absolute; top: 50%; width: 14px; height: 14px; border-radius: 50%; background: var(--ouro); box-shadow: 0 2px 0 #b77600; transform: translateY(-50%); }
.folha.esq span { right: 14px; }
.folha.dir span { left: 14px; }
.abrindo .folha.esq { transform: rotateY(-115deg); }
.abrindo .folha.dir { transform: rotateY(115deg); }
.selo-dia {
  position: absolute; z-index: 4; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 96px; height: 96px; border-radius: 50%;
  display: grid; place-items: center; background: #fff; color: var(--vermelho); font-family: var(--f-titulo); font-weight: 700; font-size: 2.6rem;
  box-shadow: 0 6px 0 rgba(0,0,0,.2), 0 0 0 6px var(--ouro); transition: transform .5s cubic-bezier(.5,-0.5,.5,1.5), opacity .4s;
}
.abrindo .selo-dia { transform: translate(-50%, -50%) scale(0) rotate(180deg); opacity: 0; }

.modal-titulo { font-family: var(--f-titulo); text-align: center; color: var(--vermelho); font-size: clamp(1.5rem, 4.6vw, 2.2rem); margin: .6em 0 .2em; line-height: 1.1; }
.modal-titulo small { display: block; font-size: .5em; color: var(--texto-suave); letter-spacing: .1em; text-transform: uppercase; margin-bottom: .3em; }

/* envelope */
.envelope { position: relative; display: block; margin: 14px auto 6px; width: 240px; height: 160px; border: 0; background: none; padding: 0; animation: envelope-chama 1.6s ease-in-out infinite; }
.env-corpo { position: absolute; inset: 0; border-radius: 12px; background: linear-gradient(160deg, #ffe0e6, #ffc2cf); box-shadow: 0 8px 18px rgba(200,40,80,.25); }
.env-corpo::before { content: ""; position: absolute; inset: 0; border-radius: 12px; background: linear-gradient(to top right, transparent 49.5%, #f7a7b8 50%, transparent 51%), linear-gradient(to top left, transparent 49.5%, #f7a7b8 50%, transparent 51%); }
.env-aba { position: absolute; left: 0; right: 0; top: 0; height: 58%; background: #ff9fb5; clip-path: polygon(0 0, 100% 0, 50% 100%); transform-origin: top; transition: transform .6s; z-index: 2; }
.env-coracao { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%); font-size: 2.6rem; z-index: 3; transition: transform .4s; }
.env-texto { position: absolute; left: 0; right: 0; bottom: -30px; font-family: var(--f-titulo); font-weight: 600; color: var(--vermelho); }
.envelope.abrindo-env { animation: none; }
.envelope.abrindo-env .env-aba { transform: rotateX(180deg); }
.envelope.abrindo-env .env-coracao { transform: translate(-50%, -160%) scale(1.4); }
@keyframes envelope-chama { 0%,100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg) scale(1.04); } }

/* carta */
.carta {
  position: relative; margin: 16px 4px 4px; padding: 20px 20px 18px; border-radius: 6px;
  background: repeating-linear-gradient(180deg, var(--papel) 0 31px, #e8dcc0 31px 32px);
  box-shadow: 0 6px 18px rgba(0,0,0,.15); font-family: var(--f-carta); font-size: 1.32rem; line-height: 32px; color: #3a2f55;
  transform-origin: top; animation: carta-abre .7s cubic-bezier(.3,1.3,.5,1);
}
.carta::before { content: ""; position: absolute; top: 0; bottom: 0; left: 12px; width: 2px; background: #f4a6a6; opacity: .7; }
@keyframes carta-abre { from { transform: scaleY(0) translateY(-40px); opacity: 0; } }
.carta p { margin: 0 0 32px; }
.carta .saudacao-carta { font-size: 1.5rem; color: var(--vermelho); }
.carta .versiculo {
  font-family: var(--f-titulo); font-weight: 600; font-size: 1.2rem; line-height: 1.45; color: #1d3a6b;
  background: #fff; border-radius: 16px; padding: 14px 16px 14px 46px; margin: 0 0 24px; position: relative; box-shadow: 0 4px 0 #dcd0b2;
}
.carta .versiculo::before { content: "📖"; position: absolute; left: 12px; top: 12px; font-size: 1.4rem; }
.carta .versiculo cite { display: block; font-style: normal; font-size: .9rem; color: var(--vermelho); margin-top: .4em; }
.carta .frase { transition: background .25s, color .25s; border-radius: 6px; }
.carta .frase.lendo { background: #ffe58a; color: #000; box-shadow: 0 0 0 3px #ffe58a; }
.carta-audio { display: flex; gap: 8px; justify-content: center; margin-bottom: 14px; flex-wrap: wrap; }
.btn-audio { font-family: var(--f-titulo); font-weight: 600; font-size: 1.05rem; border: 0; border-radius: 999px; padding: .55em 1.1em; background: var(--verde); color: #fff; box-shadow: 0 4px 0 #157049; }
.btn-audio.parar { background: var(--vermelho); box-shadow: 0 4px 0 #a32530; }
.btn-audio.tocando { animation: pulsar 1s infinite; }
.desafio { background: #e7f8ef; border: 3px dashed var(--verde); border-radius: 16px; padding: 12px 14px; font-family: var(--f-corpo); font-size: 1rem; line-height: 1.45; margin-top: 4px; }
.desafio h3 { margin: 0 0 .3em; font-family: var(--f-titulo); color: var(--verde); font-size: 1.15rem; }
.desafio label { display: flex; align-items: center; gap: .5em; margin-top: .6em; font-weight: 800; cursor: pointer; }
.desafio input { width: 26px; height: 26px; accent-color: var(--verde); }
.assinatura { text-align: right; margin: 18px 0 0; color: var(--vermelho); }

.modal-nav { display: flex; justify-content: space-between; gap: 8px; margin-top: 18px; }

/* surpresa (dias 24 e 25) */
.surpresa { margin: 18px 4px 0; border-radius: 22px; padding: 18px 14px; text-align: center; color: #fff; background: linear-gradient(160deg, #7a2cff, #c2185b 60%, #ff8a3d); box-shadow: 0 8px 22px rgba(122,44,255,.35); position: relative; overflow: hidden; }
.surpresa::before { content: "✨ 🎁 ✨"; display: block; font-size: 1.6rem; animation: pulsar 1.5s infinite; }
.surpresa h3 { font-family: var(--f-titulo); font-size: 1.5rem; margin: .3em 0; }
.surpresa p { margin: .3em 0 1em; }
.video-caixa { position: relative; border-radius: 16px; overflow: hidden; background: #000; aspect-ratio: 16 / 9; margin: 10px 0; box-shadow: 0 0 0 4px rgba(255,255,255,.6); }
.video-caixa.vertical { aspect-ratio: 9 / 16; max-width: 360px; margin: 10px auto; }
.video-caixa iframe, .video-caixa video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.presente-fechado { font-size: 5rem; display: inline-block; animation: chamar 1.4s infinite; cursor: pointer; background: none; border: 0; }
.aguarde { background: rgba(255,255,255,.18); border-radius: 14px; padding: 12px; }

.modal.natal .modal-caixa { background: linear-gradient(180deg, #fff7d6, var(--creme)); }

/* toast */
.toast { position: fixed; z-index: 90; left: 50%; bottom: 24px; transform: translate(-50%, 200%); visibility: hidden; background: #fff; color: var(--texto); font-weight: 800; padding: .8em 1.2em; border-radius: 20px; box-shadow: var(--sombra); transition: transform .35s cubic-bezier(.3,1.5,.5,1); max-width: calc(100% - 32px); text-align: center; }
.toast.mostrar { transform: translate(-50%, 0); visibility: visible; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (max-width: 520px) {
  .carta { font-size: 1.2rem; padding: 16px 14px 14px 22px; }
  .envelope { width: 200px; height: 134px; }
  .selo-dia { width: 76px; height: 76px; font-size: 2rem; }
}
.bloco-presente + .bloco-presente, .surpresa .aguarde + h3 { margin-top: 18px; padding-top: 14px; border-top: 2px dashed rgba(255,255,255,.4); }
