/* Check-in do bem-estar (academia, pilates, clínica de estética).
 *
 * Cores de MARCA como var(--jg-<hex>, #<hex>): carteirinha, topo do sistema,
 * check e botões; parede, madeira, leitor grafite, LED verde e ouro em hex
 * direto. Nunca azul.
 *
 * Contrato:
 *  - Estado FINAL por classe estática ou @keyframes … forwards.
 *  - Movimento reduzido: cada coisa para num estado VISÍVEL.
 *  - Carteirinha, ondas e anel são JS (atributos no SVG), pelo relógio; aqui a
 *    tela do sistema, a luz forte e as faíscas do prêmio.
 *  - Posições em % do palco: viewBox 160×110 no mesmo 16:11. Leitor em (44,50)
 *    → 27,5% / 45,5%.
 */

.ac__palco {
    position: relative;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    aspect-ratio: 16 / 11;
    border-radius: 14px;
    overflow: hidden;
    background: #F2EFEA;
    box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .45);
    user-select: none;
    font-family: Arial, sans-serif;
}
.ac__cena { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.ac__rotulo {
    position: absolute;
    left: 2%; bottom: 2%;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--jg-14532d, #14532d);
    border: 1px solid #C9A227;
    font: 700 10px/1 Arial, sans-serif;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #FFF3C4;
    white-space: nowrap;
    z-index: 8;
}
.ac__rotulo img { width: 12px; height: 12px; }

/* ---------------- a luz do leitor no prêmio ---------------- */

.ac--premiou #acAnel { stroke: #86EFAC; stroke-width: 3.6; animation: ac-luz .45s ease-in-out 4 alternate; }
@keyframes ac-luz { to { stroke: #F4C430; } }

.ac__faiscas { position: absolute; left: 27.5%; top: 45.5%; width: 0; height: 0; z-index: 4; pointer-events: none; }
.ac__faiscas i {
    position: absolute; left: 0; top: 0;
    width: 14px; height: 14px; margin: -7px 0 0 -7px;
    background: #FFE68A;
    clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
    filter: drop-shadow(0 0 3px rgba(255, 214, 90, .95));
    opacity: 0;
}
.ac__faiscas i:nth-child(1) { --dx: -62px; --dy: -46px; }
.ac__faiscas i:nth-child(2) { --dx: 60px;  --dy: -50px; animation-delay: .06s; }
.ac__faiscas i:nth-child(3) { --dx: -74px; --dy: 18px;  animation-delay: .12s; }
.ac__faiscas i:nth-child(4) { --dx: 70px;  --dy: 24px;  animation-delay: .04s; }
.ac__faiscas i:nth-child(5) { --dx: -10px; --dy: -74px; animation-delay: .09s; }
.ac__faiscas i:nth-child(6) { --dx: 14px;  --dy: 64px;  animation-delay: .15s; }
.ac--premiou .ac__faiscas i { animation: ac-faisca .9s ease-out forwards; }
@keyframes ac-faisca {
    0%   { transform: translate(0, 0) scale(.3) rotate(0deg); opacity: 0; }
    20%  { opacity: 1; }
    100% { transform: translate(var(--dx), var(--dy)) scale(1) rotate(60deg); opacity: .9; }
}

/* ---------------- o monitor do sistema ---------------- */

.ac__monitor {
    position: absolute;
    left: 57%; top: 8%;
    width: 40%; height: 55%;
    box-sizing: border-box;
    padding: 1.4%;
    border-radius: 10px;
    background: linear-gradient(135deg, #3A413C, #1C211E);
    box-shadow: 0 12px 22px -10px rgba(0, 0, 0, .5);
    z-index: 2;
}
.ac__monitor::after {                                    /* o pé */
    content: ''; position: absolute; left: 42%; right: 42%; top: 100%; height: 12%;
    background: linear-gradient(180deg, #2B3330, #3E4743);
    border-radius: 0 0 4px 4px;
}
.ac__tela { position: relative; width: 100%; height: 100%; border-radius: 7px; overflow: hidden; background: #FBFAF6; }
.ac__sistema { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; }
.ac__topo {
    width: 100%; box-sizing: border-box;
    display: flex; align-items: center; justify-content: center; gap: 5px;
    padding: 5% 4%;
    background: linear-gradient(180deg, var(--jg-2aa152, #2AA152), var(--jg-0a7a00, #0A7A00));
    border-bottom: 2px solid #C9A227;
    color: #FFF3C4;
    font: 700 clamp(8px, 2.3vw, 11px)/1 Arial, sans-serif;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.ac__topo img { width: 12px; height: 12px; }
.ac__icone { width: 30%; margin-top: 9%; color: #9FB3A9; }
.ac__icone svg { display: block; width: 100%; }
.ac__status { margin-top: 5%; font: 700 clamp(9px, 2.5vw, 12px)/1.2 Arial, sans-serif; color: #46564c; text-align: center; padding: 0 6%; }
.ac__pontos { display: flex; gap: 5px; margin-top: 6%; }
.ac__pontos i { width: 6px; height: 6px; border-radius: 50%; background: #CFD8D3; }
.ac--jogando .ac__pontos i { animation: ac-ponto .9s ease-in-out infinite; }
.ac--jogando .ac__pontos i:nth-child(2) { animation-delay: .15s; }
.ac--jogando .ac__pontos i:nth-child(3) { animation-delay: .3s; }
@keyframes ac-ponto { 50% { background: var(--jg-2aa152, #2AA152); transform: translateY(-3px); } }

/* ---------------- tela de resultado (escrita só no desfecho) ---------------- */

.ac__resultado { position: absolute; inset: 0; pointer-events: none; }
.ac__ouro, .ac__padrao {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 0 6%;
    text-align: center;
    opacity: 0;
    animation: ac-entra var(--ac-troca, .45s) ease-out forwards;
}
@keyframes ac-entra { from { opacity: 0; transform: scale(1.06); } to { opacity: 1; transform: scale(1); } }

.ac__ouro {
    gap: 4%;
    background:
        radial-gradient(circle at 50% 25%, rgba(255, 250, 220, .9), rgba(255, 250, 220, 0) 55%),
        linear-gradient(160deg, #FFF3B0, #F4C430 45%, #C98E0E);
}
.ac__titulo { font: 700 clamp(12px, 3.3vw, 16px)/1.15 Georgia, 'Times New Roman', serif; color: var(--jg-14532d, #14532d); animation: ac-pisca .4s .3s 4 alternate both; }
@keyframes ac-pisca { from { opacity: 1; } to { opacity: .3; } }
.ac__parabens { font: 700 clamp(9px, 2.4vw, 11px)/1 Arial, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: #6B4E0E; }
.ac__premiado {
    display: flex; align-items: center; gap: 8px;
    margin-top: 4%;
    padding: 4% 5%;
    border-radius: 8px;
    background: rgba(255, 253, 244, .92);
    box-shadow: 0 0 0 1px #C9A227;
    text-align: left;
}
.ac__premiado img { width: 34px; height: 34px; object-fit: cover; border-radius: 50%; border: 2px solid #D4AF37; background: #fff; flex: none; }
.ac__premiado small { display: block; font: 700 clamp(7px, 1.8vw, 9px)/1 Arial, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #8A6D1F; }
.ac__premiado b { display: block; margin-top: 2px; font: 700 clamp(10px, 2.7vw, 13px)/1.15 Georgia, serif; color: var(--jg-14532d, #14532d); overflow-wrap: anywhere; }

.ac__padrao { gap: 5%; background: #FBFAF6; }
.ac__check { width: 30%; }
.ac__check path { stroke-dasharray: 1 1; stroke-dashoffset: 1; animation: ac-traco .4s .15s ease-out forwards; }
@keyframes ac-traco { to { stroke-dashoffset: 0; } }
.ac__padrao b { font: 700 clamp(10px, 2.8vw, 13px)/1.2 Arial, sans-serif; color: var(--jg-14532d, #14532d); }
.ac__padrao span { font: italic 700 clamp(10px, 2.7vw, 13px)/1.2 Georgia, serif; color: #5C6B60; }

/* ---------------- botão e mensagem ---------------- */

.ac__botao {
    display: block;
    width: 100%;
    max-width: 480px;
    margin: 10px auto 0;
    padding: 12px 10px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(180deg, var(--jg-2aa152, #2AA152), var(--jg-0a7a00, #0A7A00));
    color: #fff;
    font: 700 15px/1.2 Arial, sans-serif;
    letter-spacing: .02em;
    cursor: pointer;
    touch-action: manipulation;
    box-shadow: 0 6px 14px -6px rgba(var(--jg-rgb-0a7a00, 10,122,0), .8), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.ac__botao:hover:not(:disabled) { filter: brightness(1.06); }
.ac__botao:disabled { opacity: .55; cursor: default; }

.ac__msg {
    max-width: 480px;
    min-height: 56px;
    margin: 10px auto 0;
    padding: 8px 12px;
    box-sizing: border-box;
    display: flex; align-items: center; justify-content: center;
    border-radius: 9px;
    text-align: center;
    font: 700 clamp(11px, 3vw, 14px)/1.35 Arial, sans-serif;
    color: #46564c;
    background: var(--jg-eef4ef, #EEF4EF);
    border: 1px solid var(--jg-dce6de, #DCE6DE);
}
.ac__msg--premiado { background: var(--jg-e3f5e6, #E3F5E6); border-color: var(--jg-9fd8ab, #9FD8AB); color: var(--jg-14532d, #14532d); }
.ac__msg--consolo  { background: #F1F3F1; border-color: #CDD5CE; color: #4F5A52; }
.ac__msg b { color: var(--jg-0a7a00, #0A7A00); }
.ac__msg--consolo b { color: #5C6B60; }

/* ---------------- vitrine ---------------- */

.ac__premios {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
    margin: 14px auto 0; max-width: 640px;
}
.ac__titulo-vitrine {
    width: 100%; text-align: center;
    font: 700 13px/1.3 Arial, sans-serif; color: var(--jg-14532d, #14532d); margin-bottom: 2px;
}
.ac__premio { width: 74px; text-align: center; font: 600 10px/1.2 Arial, sans-serif; color: #46564c; }
.ac__premio img { width: 100%; border-radius: 6px; display: block; margin-bottom: 3px; }

/* ---------------- movimento reduzido ---------------- */
@media (prefers-reduced-motion: reduce) {
    .ac--premiou #acAnel { animation: none; }
    .ac--premiou .ac__faiscas i { animation: none; opacity: .9; transform: translate(var(--dx), var(--dy)) scale(1) rotate(60deg); }
    .ac--jogando .ac__pontos i { animation: none; }
    .ac__ouro, .ac__padrao { animation: none; opacity: 1; }
    .ac__titulo { animation: none; }
    .ac__check path { animation: none; stroke-dashoffset: 0; }
}
