/* ============================================================
   EXTRAS — brilho, cenas tocáveis, raspadinha, presépio, final
   ============================================================ */
#brilho { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 95; }

/* ---------- abertura da porta: luz e "câmera" ---------- */
.raios {
  position: absolute; inset: -40%; z-index: 2; pointer-events: none; opacity: 0;
  background: repeating-conic-gradient(from 0deg, rgba(255, 244, 190, .75) 0 6deg, transparent 6deg 18deg);
  -webkit-mask: radial-gradient(circle, #000 0 18%, transparent 55%); mask: radial-gradient(circle, #000 0 18%, transparent 55%);
}
.clarao { position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; background: radial-gradient(circle, #fff 0%, rgba(255, 246, 200, .8) 30%, transparent 70%); }
.abrindo .raios { animation: raios-abrem 2.4s ease-out .35s forwards; }
.abrindo .clarao { animation: clarao 1.2s ease-out .3s forwards; }
.abrindo .cena { animation: camera 2.6s cubic-bezier(.2, .7, .2, 1) .2s both; }
@keyframes raios-abrem { 0% { opacity: 0; transform: scale(.3) rotate(0); } 25% { opacity: 1; } 100% { opacity: 0; transform: scale(1.4) rotate(40deg); } }
@keyframes clarao { 0% { opacity: 0; } 25% { opacity: .95; } 100% { opacity: 0; } }
@keyframes camera { from { transform: scale(1.22); filter: brightness(1.6) saturate(.7); } to { transform: none; filter: none; } }

/* ---------- cena tocável ---------- */
.cena { cursor: pointer; touch-action: manipulation; }
.cena .item { translate: calc(var(--px, 0) * var(--s) * -1.2px) calc(var(--py, 0) * var(--s) * -.8px); transition: translate .5s ease-out; }
.cena .item.tocado > span { animation: tocado .75s cubic-bezier(.3, 1.6, .5, 1) !important; }
@keyframes tocado {
  0% { transform: scale(1) rotate(0); }
  30% { transform: scale(1.45, .75) translateY(10%); }
  55% { transform: scale(.9, 1.25) translateY(-45%) rotate(-12deg); }
  80% { transform: scale(1.1, .92) rotate(6deg); }
  100% { transform: scale(1) rotate(0); }
}
.cadente {
  position: absolute; z-index: 1; width: 90px; height: 3px; pointer-events: none; border-radius: 3px;
  background: linear-gradient(90deg, transparent, #fff 70%, #fff6c2); box-shadow: 0 0 10px #fff6c2;
  transform-origin: right center; animation: cadente 1.2s ease-out forwards;
}
@keyframes cadente { 0% { opacity: 0; transform: translate(-100%, 0) rotate(-25deg) scaleX(.2); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(40%, 140%) rotate(-25deg) scaleX(1); } }
.dica-toque {
  position: absolute; z-index: 2; left: 50%; bottom: 7%; transform: translateX(-50%); pointer-events: none;
  font-family: var(--f-titulo); font-weight: 600; font-size: clamp(.8rem, 3.2cqw, 1.05rem); color: #3a2a00;
  background: rgba(255, 241, 184, .95); padding: .35em .9em; border-radius: 999px; box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
  opacity: 0; animation: dica-entra .5s 2.4s forwards, dica-pula 1.4s 2.9s ease-in-out infinite;
}
@keyframes dica-entra { to { opacity: 1; } }
@keyframes dica-pula { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -5px); } }

/* ---------- raspadinha ---------- */
.carta .versiculo.coberto { min-height: 120px; }
.raspa { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 16px; z-index: 2; cursor: grab; touch-action: none; transition: opacity .6s, transform .6s; box-shadow: 0 0 0 3px #e9a823 inset; }
.raspa.sumindo { opacity: 0; transform: scale(1.06); pointer-events: none; }
.raspa-btn { position: absolute; z-index: 3; right: 8px; bottom: -14px; border: 0; border-radius: 999px; background: #fff; color: #8a5a00; font: 700 .78rem var(--f-corpo); padding: .3em .8em; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); }
.carta .versiculo.coberto::before { z-index: 0; }

/* ---------- botão e cartão do presépio no calendário ---------- */
.cartao-presepio {
  display: flex; align-items: center; gap: 14px; width: 100%; margin: 14px 0 4px; text-align: left; cursor: pointer;
  border: 0; border-radius: 20px; padding: 12px 16px; color: #fff;
  background: linear-gradient(120deg, #3a2a7a, #6b3fb8 55%, #c2185b); box-shadow: 0 6px 0 rgba(0, 0, 0, .25), 0 10px 26px rgba(107, 63, 184, .45);
  position: relative; overflow: hidden; transition: transform .15s;
}
.cartao-presepio:active { transform: translateY(3px); }
.cartao-presepio::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .25) 45%, transparent 60%); transform: translateX(-100%); animation: reflexo 3.5s 1s infinite; }
@keyframes reflexo { 0%, 60% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.cartao-presepio .cp-icone { font-size: 2.6rem; filter: drop-shadow(0 0 10px #ffd84d); animation: pulsar 2s infinite; }
.cartao-presepio b { font-family: var(--f-titulo); font-size: 1.25rem; display: block; }
.cartao-presepio small { opacity: .9; font-weight: 700; }
.cartao-presepio .cp-mini { margin-left: auto; font-size: 1.3rem; letter-spacing: -.15em; white-space: nowrap; max-width: 40%; overflow: hidden; text-overflow: clip; }

/* ---------- presépio ---------- */
.presepio-tela { position: fixed; inset: 0; z-index: 70; background: rgba(6, 8, 30, .82); backdrop-filter: blur(6px); display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 20px 10px 40px; }
.presepio-tela[hidden] { display: none; }
.pres-caixa { position: relative; width: 100%; max-width: 900px; background: linear-gradient(180deg, #1b1550, #2a1f6b); border-radius: 28px; padding: 16px 14px 20px; color: #fff; box-shadow: var(--sombra), 0 0 0 3px rgba(255, 216, 77, .35); animation: modal-pop .55s cubic-bezier(.3, 1.5, .5, 1); }
.pres-titulo { font-family: var(--f-titulo); text-align: center; margin: .1em 0 0; font-size: clamp(1.6rem, 5vw, 2.4rem); color: var(--ouro); text-shadow: 0 0 20px rgba(255, 200, 61, .6); }
.pres-sub { text-align: center; margin: .2em 0 .8em; opacity: .9; }
.pres-sub b { color: var(--ouro); font-size: 1.2em; }
.pres-dica { text-align: center; font-size: .9rem; opacity: .85; margin: .7em 0; }
.pres-lista { display: grid; grid-template-columns: repeat(12, 1fr); gap: 5px; margin: 6px 0 12px; }
@media (max-width: 560px) { .pres-lista { grid-template-columns: repeat(8, 1fr); } }
.slot { aspect-ratio: 1; display: grid; place-items: center; border-radius: 10px; background: rgba(255, 255, 255, .07); border: 2px dashed rgba(255, 255, 255, .2); font-size: clamp(1rem, 3.4vw, 1.5rem); }
.slot small { font-size: .7rem; opacity: .5; font-weight: 800; }
.slot.tem { background: rgba(255, 216, 77, .16); border: 2px solid rgba(255, 216, 77, .55); }
.pres-acoes { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

.palco {
  container-type: inline-size; position: relative; aspect-ratio: 16 / 10; border-radius: 20px; overflow: hidden; --luz: 0;
  background: radial-gradient(ellipse at 50% 110%, #3a2a7a 0%, #16124a 55%, #070d2b 100%);
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .25); user-select: none; -webkit-user-select: none;
}
.palco-ceu i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff; animation: piscar 2.4s infinite; }
.palco-cenario { position: absolute; inset: 0; width: 100%; height: 100%; }
.palco .parede-luz { opacity: calc(.25 + var(--luz) * .55); transition: opacity 1s; }
.palco.com-jesus .parede-luz { opacity: 1; }
.palco-brilho { position: absolute; left: 50%; top: 72%; width: 60%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, rgba(255, 236, 160, .75), transparent 62%); opacity: 0; transition: opacity 1.5s; pointer-events: none; }
.palco.com-jesus .palco-brilho { opacity: 1; animation: pulsar 3s infinite; }
.palco-feixe { position: absolute; left: 51%; top: 9%; width: 30%; height: 82%; transform: translateX(-50%); background: linear-gradient(180deg, rgba(255, 246, 200, .55), rgba(255, 246, 200, 0)); clip-path: polygon(47% 0, 53% 0, 100% 100%, 0 100%); opacity: 0; transition: opacity 1.5s; pointer-events: none; }
.palco.com-estrela .palco-feixe { opacity: 1; }
.palco-pecas { position: absolute; inset: 0; }
.peca {
  position: absolute; transform: translate(-50%, -50%); border: 0; background: none; padding: 0; line-height: 1; cursor: grab; touch-action: none;
  font-size: calc(var(--s) * 1cqw); filter: drop-shadow(0 4px 5px rgba(0, 0, 0, .4));
}
.peca > span { display: inline-block; transition: transform .2s; }
.peca.pegando { cursor: grabbing; z-index: 200 !important; }
.peca.pegando > span { transform: scale(1.25) rotate(-6deg); filter: drop-shadow(0 12px 10px rgba(0, 0, 0, .45)); }
.peca.tocado > span { animation: tocado .75s cubic-bezier(.3, 1.6, .5, 1); }
.peca[data-dia="20"] > span { animation: brilhar 2s infinite; }
.peca.voando { z-index: 300 !important; }
.peca.voando > span { transform: scale(3); filter: drop-shadow(0 0 30px #ffd84d); }
.peca.indo { transition: left 1.2s cubic-bezier(.45, -0.3, .3, 1.2), top 1.2s cubic-bezier(.3, 0, .2, 1); }
.peca.indo > span { transition: transform 1.2s cubic-bezier(.5, 0, .3, 1); transform: scale(1); }
.balao { position: absolute; z-index: 400; transform: translate(-50%, -260%); background: #fff; color: var(--texto); font: 800 clamp(.7rem, 2.2cqw, .95rem) var(--f-corpo); padding: .3em .7em; border-radius: 12px; white-space: nowrap; pointer-events: none; animation: balao 1.6s ease forwards; }
.balao::after { content: ""; position: absolute; left: 50%; bottom: -6px; border: 6px solid transparent; border-top-color: #fff; border-bottom: 0; transform: translateX(-50%); }
@keyframes balao { 0% { opacity: 0; transform: translate(-50%, -200%) scale(.6); } 15%, 80% { opacity: 1; transform: translate(-50%, -260%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -300%); } }

/* ---------- você ganhou uma peça ---------- */
.ganhou { position: fixed; inset: 0; z-index: 85; display: grid; place-items: center; background: rgba(6, 8, 30, .78); backdrop-filter: blur(5px); animation: surgir-ov .35s ease; overflow: hidden; padding: 16px; }
.ganhou.saindo { animation: sumir-ov .35s ease forwards; }
@keyframes surgir-ov { from { opacity: 0; } }
@keyframes sumir-ov { to { opacity: 0; } }
.ganhou-raios { position: absolute; left: 50%; top: 50%; width: 160vmax; height: 160vmax; translate: -50% -50%; background: repeating-conic-gradient(rgba(255, 216, 77, .22) 0 8deg, transparent 8deg 20deg); -webkit-mask: radial-gradient(circle, #000 0 10%, transparent 45%); mask: radial-gradient(circle, #000 0 10%, transparent 45%); animation: girar-lento 18s linear infinite; }
.ganhou-caixa { position: relative; text-align: center; color: #fff; max-width: 360px; }
.ganhou-topo { font-family: var(--f-titulo); font-weight: 600; font-size: 1.2rem; color: var(--ouro); margin: 0; animation: subir .5s .1s both; }
.ganhou-peca { font-size: clamp(6rem, 30vw, 9rem); line-height: 1.1; margin: .1em 0; filter: drop-shadow(0 0 30px rgba(255, 216, 77, .9)); animation: peca-chega 1s cubic-bezier(.3, 1.6, .5, 1) .2s both, flutuar 3s 1.2s ease-in-out infinite; }
@keyframes peca-chega { from { transform: scale(0) rotate(-200deg); opacity: 0; } }
.ganhou h3 { font-family: var(--f-titulo); font-size: 2rem; margin: 0 0 .6em; animation: subir .5s .6s both; }
.ganhou .btn-grande { animation: subir .5s .8s both; }
.link.claro { display: block; margin: 12px auto 0; color: #fff; opacity: .8; }

/* ---------- final do dia 25 ---------- */
.final { position: fixed; inset: 0; z-index: 88; background: #03040f; display: grid; place-items: center; overflow: hidden; animation: surgir-ov .6s ease; }
.final.saindo { animation: sumir-ov .5s ease forwards; }
.faixa-cinema { position: absolute; left: 0; right: 0; height: 9vh; background: #000; z-index: 3; }
.faixa-cinema.topo { top: 0; animation: faixa-topo 1s ease both; }
.faixa-cinema.baixo { bottom: 0; animation: faixa-baixo 1s ease both; }
@keyframes faixa-topo { from { transform: translateY(-100%); } }
@keyframes faixa-baixo { from { transform: translateY(100%); } }
.final-centro { position: relative; z-index: 2; width: min(92vw, calc(70vh * 1.6)); display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; color: #fff; }
.final-palco { width: 100%; filter: brightness(.08); transition: filter 3s ease; box-shadow: 0 0 60px rgba(255, 216, 77, .15); }
.final-palco.acendendo { filter: brightness(.55) saturate(.8); }
.final-palco.dia-claro { filter: none; box-shadow: 0 0 80px rgba(255, 216, 77, .45); }
.final-palco .peca { cursor: default; pointer-events: none; }
.peca.escondida { opacity: 0; }
.peca.surge > span { animation: surge-peca .6s cubic-bezier(.3, 1.7, .5, 1) both; }
@keyframes surge-peca { from { transform: scale(0) translateY(40%); opacity: 0; } }
.peca.desce { animation: estrela-desce 1.5s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes estrela-desce { from { top: -20%; transform: translate(-50%, -50%) scale(.4) rotate(-180deg); } }
.final-legenda { min-height: 2.8em; margin: 0; font-family: var(--f-titulo); font-weight: 500; font-size: clamp(1rem, 2.6vw, 1.4rem); opacity: 0; transition: opacity .6s; max-width: 680px; }
.final-legenda.visivel { opacity: 1; }
.final-legenda.versiculo-final { font-family: var(--f-carta); font-size: clamp(1.1rem, 2.8vw, 1.5rem); color: var(--ouro-claro); }
.final-titulo { margin: 0; font-family: var(--f-titulo); font-size: clamp(2.4rem, 8vw, 4.6rem); line-height: 1; min-height: 1em; color: var(--ouro); text-shadow: 0 0 30px rgba(255, 200, 61, .8), 0 4px 0 #8a5a00; }
.final-titulo span { display: inline-block; opacity: 0; }
.final-titulo.visivel span { animation: letra-final .8s cubic-bezier(.3, 1.8, .5, 1) both; animation-delay: calc(var(--i) * 70ms); }
@keyframes letra-final { from { opacity: 0; transform: translateY(-120%) scale(.3) rotate(-30deg); } to { opacity: 1; transform: none; } }
.final-seguir { animation: subir .6s both, chamar 1.6s .8s infinite; }
.final-pular { position: absolute; z-index: 4; right: 16px; bottom: calc(9vh + 12px); }

@media (prefers-reduced-motion: reduce) {
  .peca.escondida { opacity: 1; }
  .final-palco { filter: none; }
}

/* ---------- modo sala de aula (telão / projetor) ---------- */
.bloco-sala { margin-top: 14px; padding-top: 10px; border-top: 2px dashed #eadfc4; text-align: center; }
.bloco-sala .linha-form { margin-top: 8px; }
@media (min-width: 900px) {
  .modo-sala .modal-caixa { max-width: 980px; }
  .modo-sala .carta { font-size: 1.85rem; line-height: 44px; background: repeating-linear-gradient(180deg, var(--papel) 0 43px, #e8dcc0 43px 44px); }
  .modo-sala .carta p { margin-bottom: 44px; }
  .modo-sala .carta .saudacao-carta { font-size: 2.1rem; }
  .modo-sala .carta .versiculo { font-size: 1.6rem; }
  .modo-sala .desafio { font-size: 1.35rem; }
  .modo-sala .modal-titulo { font-size: 2.8rem; }
}
.modo-sala .topo h1::after { content: "👩‍🏫 Sala de aula"; display: inline-block; vertical-align: middle; margin-left: .5em; font-size: .45em; background: var(--ouro); color: #5a3200; padding: .25em .7em; border-radius: 999px; }

/* ---------- cadastro e "outro filho" ---------- */
.form label .dica { display: block; font-weight: 600; font-size: .78rem; color: var(--texto-suave); margin-top: .3em; }
.outro-filho { margin: 22px auto 0; max-width: 560px; background: rgba(255,255,255,.1); border-radius: 16px; padding: 10px 14px; }
.outro-filho summary { cursor: pointer; font-weight: 800; }
.outro-filho .linha-form { flex-wrap: wrap; margin-top: 10px; }
.outro-filho .linha-form input { flex: 1; min-width: 150px; font: inherit; font-weight: 700; padding: .55em .8em; border-radius: 12px; border: 2px solid #e2d8c0; }
