/* animações da abertura (tela de carregar e escolha em Ajustes) */
#carregando { background: radial-gradient(120% 90% at 50% 20%, var(--n-sup2) 0%, var(--n-bg) 70%); transition: opacity .35s ease; z-index: 50; }
#carregando.saindo { opacity: 0; pointer-events: none; }
.abertura { display: grid; justify-items: center; gap: 16px; }
.abertura .ab { width: min(62vw, 250px); height: auto; overflow: visible; }
.abertura p { margin: 0; font-size: 15px; color: #c9cdf0; letter-spacing: .01em; animation: ab-pisca 1.8s ease-in-out infinite; }
.abertura-previa { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: radial-gradient(120% 90% at 50% 20%, var(--n-sup2) 0%, var(--n-bg) 70%); animation: ab-aparece .3s ease both; cursor: pointer; }
@keyframes ab-pisca { 50% { opacity: .55; } }
@keyframes ab-aparece { from { opacity: 0; } }
.ab text { font-family: system-ui, sans-serif; font-weight: 800; text-anchor: middle; }
.ab .estrela { fill: #fff; opacity: .2; animation: ab-cintila 2.4s ease-in-out infinite; }
@keyframes ab-cintila { 50% { opacity: .9; transform: scale(1.4); } }
.ab .estrela { transform-box: fill-box; transform-origin: center; }

/* porquinho */
.ab-porco .sombra { fill: #000; opacity: .28; transform-box: fill-box; transform-origin: center; animation: pg-sombra 1.8s ease-in-out infinite; }
.ab-porco .porco { transform-origin: 100px 142px; animation: pg-pula 1.8s ease-in-out infinite; }
.ab-porco .perna { fill: #e18f98; } .ab-porco .rabo { stroke: #e18f98; stroke-width: 4; stroke-linecap: round; transform-origin: 52px 96px; animation: pg-rabo .6s ease-in-out infinite alternate; }
.ab-porco .olho { transform-box: fill-box; transform-origin: center; animation: pg-pisca 3.6s infinite; }
.ab-porco .moeda text { fill: #8a6a10; font-size: 11px; }
.ab-porco .moeda { opacity: 0; animation: pg-cai 1.8s cubic-bezier(.5, 0, .9, .6) infinite; }
.ab-porco .m1 { animation-delay: .6s; } .ab-porco .m2 { animation-delay: 1.2s; }
.ab-porco .gira { transform-box: fill-box; transform-origin: center; animation: ab-gira .45s linear infinite; }
.ab-porco .faisca path { fill: #fff3b0; transform-box: fill-box; transform-origin: center; animation: pg-faisca .6s ease-out infinite; opacity: 0; }
@keyframes pg-pula { 0%, 24%, 57%, 90%, 100% { transform: none; } 29%, 62%, 95% { transform: scale(1.05, .92); } 40%, 73% { transform: translateY(-8px) scale(.98, 1.03); } }
@keyframes pg-sombra { 0%, 24%, 57%, 90%, 100% { transform: scale(1); } 40%, 73% { transform: scale(.8); opacity: .18; } }
@keyframes pg-rabo { to { transform: rotate(-18deg); } }
@keyframes pg-pisca { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes pg-cai { 0% { opacity: 0; transform: translateY(-14px); } 8% { opacity: 1; } 30% { opacity: 1; transform: translateY(46px); } 34%, 100% { opacity: 0; transform: translateY(50px) scale(.5); } }
@keyframes pg-faisca { 0%, 40% { opacity: 0; transform: scale(.2); } 55% { opacity: 1; transform: scale(1.2) rotate(30deg); } 100% { opacity: 0; transform: scale(.4) rotate(60deg); } }
@keyframes ab-gira { 0%, 100% { transform: scaleX(1); } 50% { transform: scaleX(.15); } }

/* nota correndo */
.ab-nota .chao path { stroke: #2c3577; stroke-width: 3; stroke-linecap: round; animation: no-chao .5s linear infinite; }
.ab-nota .papel { fill: #f7f8ff; }
.ab-nota .rosto circle { fill: #2a2f5c; } .ab-nota .rosto path { stroke: #2a2f5c; }
.ab-nota .linha { fill: #b6bce6; transform-box: fill-box; transform-origin: left; animation: no-escreve 2.4s ease-in-out infinite; }
.ab-nota .linha.total { fill: #ffc531; } .ab-nota .l2 { animation-delay: .25s; } .ab-nota .l3 { animation-delay: .5s; } .ab-nota .total { animation-delay: .8s; }
.ab-nota .perna, .ab-nota .braco { stroke: #f7f8ff; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.ab-nota .bt { stroke: #c9cdee; }
.ab-nota .corredor { animation: no-quica .34s ease-in-out infinite alternate; transform-origin: 100px 140px; }
.ab-nota .pe { transform-origin: 88px 118px; animation: no-passo .34s ease-in-out infinite alternate; }
.ab-nota .pd { transform-origin: 108px 118px; animation: no-passo .34s ease-in-out infinite alternate-reverse; }
.ab-nota .bt { transform-origin: 74px 70px; animation: no-passo .34s ease-in-out infinite alternate-reverse; }
.ab-nota .bf { transform-origin: 126px 70px; animation: no-passo .34s ease-in-out infinite alternate; }
.ab-nota .suor { fill: #8fd0ff; animation: no-suor 1.1s ease-in infinite; }
.ab-nota .poeira circle { fill: #6f78b8; transform-box: fill-box; transform-origin: center; animation: no-poeira .68s ease-out infinite; }
.ab-nota .poeira circle:nth-child(2) { animation-delay: .22s; } .ab-nota .poeira circle:nth-child(3) { animation-delay: .44s; }
@keyframes no-quica { from { transform: translateY(0) rotate(4deg); } to { transform: translateY(-7px) rotate(6deg); } }
@keyframes no-passo { from { transform: rotate(-32deg); } to { transform: rotate(32deg); } }
@keyframes no-escreve { 0% { transform: scaleX(0); } 30%, 80% { transform: scaleX(1); } 100% { transform: scaleX(0); } }
@keyframes no-chao { to { transform: translateX(-26px); } }
@keyframes no-poeira { from { opacity: .8; transform: translateX(0); } to { opacity: 0; transform: translateX(-20px) scale(1.7); } }
@keyframes no-suor { 0% { opacity: 0; transform: translate(0, 0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(8px, 14px); } }

/* moeda no pix */
.ab-moeda text { fill: #8a6a10; font-size: 16px; }
.ab-moeda .gira { transform-box: fill-box; transform-origin: center; animation: ab-gira .5s linear infinite; }
.ab-moeda .viagem { transform-box: fill-box; transform-origin: center; animation: mo-dispara 2.2s cubic-bezier(.6, 0, .35, 1) infinite; }
.ab-moeda .linhas rect { fill: #70bbff; opacity: 0; animation: mo-linhas 2.2s ease-in-out infinite; }
.ab-moeda .celular rect:first-child { fill: #2a3270; stroke: #4c58a8; stroke-width: 2; }
.ab-moeda .tela-cel { fill: #141a47; }
.ab-moeda .check { fill: #3dc6a4; transform-box: fill-box; transform-origin: center; animation: mo-check 2.2s ease infinite; }
.ab-moeda .v { stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 20; animation: mo-v 2.2s ease infinite; }
.ab-moeda .estouro line { stroke: #ffd966; stroke-width: 3; stroke-linecap: round; opacity: 0; animation: mo-estouro 2.2s ease-out infinite; transform-origin: 169px 78px; }
@keyframes mo-dispara { 0% { transform: translateX(-70px) scale(.9); opacity: 0; } 12% { opacity: 1; } 30%, 42% { transform: translateX(0) scale(1); } 62% { transform: translateX(100px) scale(.3); opacity: 0; } 100% { transform: translateX(100px) scale(.3); opacity: 0; } }
@keyframes mo-linhas { 0%, 38% { opacity: 0; transform: translateX(40px); } 50% { opacity: .8; transform: translateX(90px); } 62%, 100% { opacity: 0; transform: translateX(140px); } }
@keyframes mo-check { 0%, 58% { transform: scale(0); } 68% { transform: scale(1.25); } 76%, 92% { transform: scale(1); } 100% { transform: scale(0); } }
@keyframes mo-v { 0%, 64% { stroke-dashoffset: 20; } 76%, 92% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 20; } }
@keyframes mo-estouro { 0%, 60% { opacity: 0; transform: scale(.4); } 70% { opacity: 1; } 85%, 100% { opacity: 0; transform: scale(1.4); } }

/* gráfico vivo */
.ab-barras .cartao-g { fill: #1c2358; stroke: #2f3a85; stroke-width: 2; }
.ab-barras .grade path { stroke: #2f3a85; stroke-width: 1.5; stroke-dasharray: 3 5; }
.ab-barras .b { transform-box: fill-box; transform-origin: bottom; animation: ba-sobe 2.4s cubic-bezier(.3, 1.4, .5, 1) infinite; }
.ab-barras .b2 { animation-delay: .12s; } .ab-barras .b3 { animation-delay: .24s; } .ab-barras .b4 { animation-delay: .36s; }
.ab-barras .traco { stroke: #fff; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 130; animation: ba-risca 2.4s ease-in-out infinite; }
.ab-barras .ponta { fill: #fff; transform-box: fill-box; transform-origin: center; animation: ba-ponta 2.4s ease infinite; }
.ab-barras .confete rect { opacity: 0; transform-box: fill-box; transform-origin: center; animation: ba-confete 2.4s ease-out infinite; }
@keyframes ba-sobe { 0% { transform: scaleY(.1); } 30%, 80% { transform: scaleY(1); } 100% { transform: scaleY(.1); } }
@keyframes ba-risca { 0%, 15% { stroke-dashoffset: 130; } 45%, 80% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -130; } }
@keyframes ba-ponta { 0%, 42% { transform: scale(0); } 50% { transform: scale(1.6); } 56%, 80% { transform: scale(1); } 90%, 100% { transform: scale(0); } }
@keyframes ba-confete { 0% { opacity: 0; transform: translate(0, 0); } 8% { opacity: 1; } 40% { opacity: 0; transform: translate(var(--dx), -34px) rotate(var(--r)); } 100% { opacity: 0; } }

/* árvore de dinheiro */
.ab-arvore .caule { stroke: #3dc6a4; stroke-width: 6; stroke-linecap: round; stroke-dasharray: 100; animation: ar-cresce 3.2s ease-in-out infinite; }
.ab-arvore .galho { stroke: #3dc6a4; stroke-width: 4; stroke-linecap: round; stroke-dasharray: 40; animation: ar-galho 3.2s ease-in-out infinite; }
.ab-arvore .g2 { animation-delay: .1s; }
.ab-arvore .folha { fill: #5ee0b6; transform-box: fill-box; transform-origin: bottom center; transform: scale(0); animation: ar-folha 3.2s ease-in-out infinite both; }
.ab-arvore .f2 { animation-delay: .15s; fill: #3dc6a4; } .ab-arvore .f3 { animation-delay: .3s; } .ab-arvore .f4 { animation-delay: .2s; fill: #3dc6a4; }
.ab-arvore .fruto circle { fill: #ffd24a; stroke: #c98a10; stroke-width: 1.3; } .ab-arvore .fruto text { fill: #8a6a10; font-size: 8px; }
.ab-arvore .fruto { transform-box: fill-box; transform-origin: center; transform: scale(0); animation: ar-fruto 3.2s ease infinite both; }
.ab-arvore .regador { transform-origin: 46px 62px; animation: ar-rega 3.2s ease-in-out infinite; }
.ab-arvore .gotas circle { fill: #8fd0ff; animation: ar-gota .6s ease-in infinite; }
.ab-arvore .gotas circle:nth-child(2) { animation-delay: .2s; } .ab-arvore .gotas circle:nth-child(3) { animation-delay: .4s; }
@keyframes ar-cresce { 0% { stroke-dashoffset: 100; } 35%, 85% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 100; } }
@keyframes ar-galho { 0%, 25% { stroke-dashoffset: 40; } 45%, 85% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 40; } }
@keyframes ar-folha { 0%, 30% { transform: scale(0); } 48% { transform: scale(1.15); } 55%, 85% { transform: scale(1) rotate(-4deg); } 100% { transform: scale(0); } }
@keyframes ar-fruto { 0%, 10% { transform: scale(0); } 18% { transform: scale(1.3); } 24%, 44% { transform: scale(1); } 52%, 100% { transform: scale(0); } }
@keyframes ar-rega { 0%, 100% { transform: rotate(0); } 15%, 60% { transform: rotate(18deg); } }
@keyframes ar-gota { from { opacity: 1; transform: translate(0, 0); } to { opacity: 0; transform: translate(10px, 40px); } }

/* foguete */
.ab-foguete .riscos line { stroke: #8f9bd8; stroke-width: 2; stroke-linecap: round; opacity: .6; animation: fo-risco .9s linear infinite; }
.ab-foguete .planeta { fill: #efb5b9; animation: fo-planeta 6s linear infinite; } .ab-foguete .anel { fill: none; stroke: #ffd966; stroke-width: 2.5; animation: fo-planeta 6s linear infinite; }
.ab-foguete .nave { animation: fo-treme .12s linear infinite alternate, fo-sobe 2.6s ease-in-out infinite; }
.ab-foguete .cifrao { fill: #fff; font-size: 14px; }
.ab-foguete .fogo { transform-origin: 100px 118px; animation: fo-fogo .14s ease-in-out infinite alternate; }
.ab-foguete .f-ext { fill: #ff9f43; } .ab-foguete .f-int { fill: #ffe066; }
.ab-foguete .fumaca circle { fill: #c9cdf0; opacity: 0; transform-box: fill-box; transform-origin: center; animation: fo-fumaca 1s ease-out infinite; }
.ab-foguete .fumaca circle:nth-child(2) { animation-delay: .3s; } .ab-foguete .fumaca circle:nth-child(3) { animation-delay: .6s; }
@keyframes fo-risco { from { transform: translateY(-20px); } to { transform: translateY(170px); } }
@keyframes fo-planeta { from { transform: translateY(-20px); } to { transform: translateY(200px); } }
@keyframes fo-treme { from { transform: translateX(-.8px); } to { transform: translateX(.8px); } }
@keyframes fo-sobe { 0%, 100% { translate: 0 6px; } 50% { translate: 0 -8px; } }
@keyframes fo-fogo { from { transform: scaleY(.85) scaleX(.95); } to { transform: scaleY(1.15) scaleX(1.05); } }
@keyframes fo-fumaca { from { opacity: .6; transform: scale(.6); } to { opacity: 0; transform: scale(1.8) translateY(8px); } }

/* cofre */
.ab-cofre .disco line { stroke: #c9d0f5; stroke-width: 2; }
.ab-cofre .disco { transform-origin: 100px 78px; animation: co-gira 2.8s cubic-bezier(.6, 0, .4, 1) infinite; }
.ab-cofre .porta { transform-origin: 54px 78px; animation: co-abre 2.8s cubic-bezier(.6, 0, .3, 1) infinite; }
.ab-cofre .brilho-dentro rect { fill: #ffd966; opacity: 0; animation: co-brilho 2.8s ease infinite; }
.ab-cofre .mo { fill: #ffd24a; stroke: #c98a10; stroke-width: 1; opacity: 0; animation: co-moeda 2.8s ease infinite both; }
@keyframes co-gira { 0% { transform: rotate(0); } 25% { transform: rotate(200deg); } 40% { transform: rotate(120deg); } 55%, 100% { transform: rotate(160deg); } }
@keyframes co-abre { 0%, 55% { transform: perspective(400px) rotateY(0); } 70%, 88% { transform: perspective(400px) rotateY(-70deg); } 100% { transform: perspective(400px) rotateY(0); } }
@keyframes co-brilho { 0%, 58% { opacity: 0; } 70%, 85% { opacity: .35; } 100% { opacity: 0; } }
@keyframes co-moeda { 0%, 62% { opacity: 0; transform: translateY(-6px); } 72%, 88% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* carteira comilona */
.ab-carteira .sombra { fill: #000; opacity: .25; }
.ab-carteira .vm circle { fill: #ffd24a; stroke: #c98a10; stroke-width: 1.3; } .ab-carteira .vm text { fill: #8a6a10; font-size: 9px; }
.ab-carteira .vm { opacity: 0; transform-box: fill-box; transform-origin: center; animation: ca-voa 1.65s cubic-bezier(.4, 0, .6, 1) infinite; }
.ab-carteira .nota-voa rect { fill: #9ff0d6; stroke: #36b48f; stroke-width: 1.2; } .ab-carteira .nota-voa circle { fill: #36b48f; }
.ab-carteira .nota-voa { opacity: 0; transform-box: fill-box; transform-origin: center; animation: ca-voa 1.65s cubic-bezier(.4, 0, .6, 1) .8s infinite; }
.ab-carteira .tampa { transform-origin: 44px 78px; animation: ca-come .55s ease-in-out infinite; }
.ab-carteira .boca { transform-box: fill-box; transform-origin: center; animation: ca-boca .55s ease-in-out infinite; }
.ab-carteira .bicho { transform-origin: 96px 140px; animation: ca-mastiga .55s ease-in-out infinite; }
.ab-carteira .pupila { animation: ca-olha 1.65s ease-in-out infinite; }
@keyframes ca-voa { 0% { opacity: 0; transform: translate(10px, -10px) rotate(0); } 15% { opacity: 1; } 70% { opacity: 1; transform: translate(-90px, 12px) rotate(-180deg) scale(.8); } 80%, 100% { opacity: 0; transform: translate(-96px, 18px) scale(.3); } }
@keyframes ca-come { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-16deg); } }
@keyframes ca-boca { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(3.2); } }
@keyframes ca-mastiga { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.03, .97); } }
@keyframes ca-olha { 0%, 100% { transform: translateX(0); } 40% { transform: translateX(2.5px); } }


/* escolha em Ajustes */
.dlg-aberturas { width: min(760px, calc(100vw - 24px)); }
.aberturas-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 4px 0 6px; max-height: min(64vh, 620px); overflow-y: auto; padding: 2px; }
.ab-op { position: relative; display: grid; justify-items: center; gap: 6px; padding: 12px 8px 10px; border-radius: 16px; border: 1px solid var(--n-borda); background: radial-gradient(120% 90% at 50% 20%, var(--n-sup2) 0%, var(--n-sup) 80%); color: var(--n-texto2); cursor: pointer; font: inherit; }
.ab-op .ab { width: 110px; height: 88px; }
.ab-op b { font-size: 13.5px; color: var(--n-texto); font-weight: 600; } .ab-op small { font-size: 11.5px; color: var(--n-texto3); text-align: center; }
.ab-op.ativo { border-color: var(--n-accent); box-shadow: 0 0 0 2px var(--n-accent-t); }
.ab-op .sortear-ic { width: 110px; height: 88px; display: grid; place-items: center; color: var(--n-accent); }
.ab-op:hover { border-color: rgba(255, 217, 102, .5); }

.ab-lottie { aspect-ratio: 1 / 1; }
.abertura .ab-lottie { width: min(56vw, 230px); }
.ab-op .ab-lottie { width: 96px; height: 88px; }
.ab-sec { grid-column: 1 / -1; margin: 8px 2px 0; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--n-texto3); }
.ab-sec:first-child { margin-top: 0; }
.ab-op .ab-autor { font-size: 10.5px; opacity: .75; }
.ab-ver { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; border: 1px solid var(--n-borda); background: rgba(11, 16, 51, .7); color: var(--n-texto2); cursor: pointer; }
.ab-ver:hover { color: var(--n-accent); border-color: var(--n-accent); }
.ab-check { position: absolute; top: 8px; left: 8px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--n-accent); color: #3a2d00; }
.previa-dica { position: absolute; bottom: calc(28px + env(safe-area-inset-bottom, 0px)); left: 0; right: 0; text-align: center; color: #8f96c9; font-size: 12px; }

/* várias marcadas; no sorteio as outras ficam apagadas porque todas entram */
.ab-resumo { margin: 0 0 10px; font-size: 13px; color: var(--n-accent); }
.ab-resumo:empty { display: none; }
.aberturas-grade.sorteio .ab-op:not([data-abertura="sortear"]) { opacity: .55; }
.aberturas-grade.sorteio .ab-op:not([data-abertura="sortear"]):hover { opacity: .85; }
.ab-op.treme { animation: ab-treme .3s; }
@keyframes ab-treme { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.dlg-aberturas h2 { margin-bottom: 12px; }
