/* Cliente especial (supermercados, check-in no app do clube).
 *
 * Cores de MARCA como var(--jg-<hex>, #<hex>): o topo do app, a barra, o laser
 * e os botões; celular, loja, 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.
 *  - Laser, texto de status e barra são JS (style), pelo relógio; aqui a tela de
 *    resultado (dourada ou padrão), escrita só no desfecho.
 */

.ck__palco {
    position: relative;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    aspect-ratio: 16 / 11;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(180deg, #F6F2EA 0%, #EDE5D6 72%, #D9CBB3 72%, #CDBD9F 100%);
    box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .45);
    user-select: none;
    font-family: Arial, sans-serif;
}

/* loja ao fundo, desfocada: prateleiras com produtos genéricos */
.ck__fundo { position: absolute; inset: 0; filter: blur(1.5px); opacity: .8; }
.ck__fundo::before, .ck__fundo::after {
    content: ''; position: absolute; top: 34%; width: 30%; height: 1.6%; background: #D8CDB9;
}
.ck__fundo::before { left: 0; }
.ck__fundo::after  { right: 0; }
.ck__fundo i { position: absolute; bottom: 66%; width: 6%; border-radius: 3px 3px 1px 1px; }
.ck__fundo i:nth-child(1) { left: 3%;  height: 11%; background: #E8D5B5; }
.ck__fundo i:nth-child(2) { left: 11%; height: 15%; background: var(--jg-d9e4d2, #D9E4D2); }
.ck__fundo i:nth-child(3) { left: 19%; height: 9%;  background: #F0D6CC; }
.ck__fundo i:nth-child(4) { right: 19%; height: 13%; background: #E4DCC8; }
.ck__fundo i:nth-child(5) { right: 11%; height: 10%; background: #D6E0D8; }
.ck__fundo i:nth-child(6) { right: 3%;  height: 14%; background: #F0D6CC; }

/* ---------------- o celular ---------------- */

.ck__celular {
    position: absolute;
    left: 55%; top: 50%;
    height: 94%;
    aspect-ratio: 9 / 16;
    transform: translate(-50%, -50%);
    box-sizing: border-box;
    padding: 2.4% 2.4%;
    border-radius: 18px;
    background: linear-gradient(135deg, #3A413C, #1C211E);
    box-shadow: 0 14px 26px -10px rgba(0, 0, 0, .55), inset 0 0 0 1.5px #555E57;
    z-index: 2;
}
.ck__tela {
    position: relative;
    width: 100%; height: 100%;
    border-radius: 13px;
    overflow: hidden;
    background: #FBFAF6;
}
.ck__app { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; }
.ck__topo {
    width: 100%;
    box-sizing: border-box;
    display: flex; align-items: center; justify-content: center; gap: 5px;
    padding: 9% 6% 5%;
    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.1 Arial, sans-serif;
    letter-spacing: .04em;
    text-align: center;
}
.ck__topo img { width: 13px; height: 13px; flex: none; }
.ck__ola { margin: 7% 0 4%; text-align: center; font: 400 clamp(7px, 2vw, 10px)/1.3 Arial, sans-serif; color: #5C6B60; }
.ck__ola b { color: var(--jg-14532d, #14532d); font-size: 1.15em; }

.ck__leitor { position: relative; width: 70%; aspect-ratio: 1; }
.ck__qr { position: absolute; inset: 8%; width: 84%; height: 84%; display: block; }
.ck__canto { position: absolute; width: 18%; height: 18%; border: 2.5px solid var(--jg-0a7a00, #0A7A00); }
.ck__canto--a { left: 0; top: 0; border-right: 0; border-bottom: 0; border-radius: 5px 0 0 0; }
.ck__canto--b { right: 0; top: 0; border-left: 0; border-bottom: 0; border-radius: 0 5px 0 0; }
.ck__canto--c { left: 0; bottom: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 5px; }
.ck__canto--d { right: 0; bottom: 0; border-left: 0; border-top: 0; border-radius: 0 0 5px 0; }
.ck__laser {
    position: absolute; left: 3%; right: 3%; top: 6%;
    height: 2.5%;
    border-radius: 2px;
    background: var(--jg-2aa152, #2AA152);
    box-shadow: 0 0 8px 2px rgba(var(--jg-rgb-2aa152, 42,161,82), .7);
    opacity: 0;
    transform: translateY(-50%);
}
/* o bipe: os cantos piscam uma vez, igual nas duas */
.ck--bipou .ck__canto { animation: ck-bipe .35s ease-out; }
@keyframes ck-bipe { 50% { border-color: #F4C430; transform: scale(1.12); } }

.ck__status { margin-top: 5%; font: 700 clamp(7px, 2vw, 10px)/1.2 Arial, sans-serif; color: #46564c; }
.ck__barra { width: 70%; height: 5px; margin-top: 4%; border-radius: 3px; background: #E3E8E2; overflow: hidden; }
.ck__barra i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--jg-2aa152, #2AA152), var(--jg-0a7a00, #0A7A00)); }

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

.ck__resultado { position: absolute; inset: 0; pointer-events: none; }
.ck__ouro, .ck__padrao {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 0 8%;
    text-align: center;
    opacity: 0;
    animation: ck-entra var(--ck-troca, .5s) ease-out forwards;
}
@keyframes ck-entra { from { opacity: 0; transform: scale(1.06); } to { opacity: 1; transform: scale(1); } }

.ck__ouro {
    background:
        radial-gradient(circle at 50% 30%, rgba(255, 250, 220, .9), rgba(255, 250, 220, 0) 55%),
        linear-gradient(160deg, #FFF3B0, #F4C430 45%, #C98E0E);
    color: var(--jg-14532d, #14532d);
}
.ck__titulo {
    font: 700 clamp(10px, 2.9vw, 14px)/1.2 Georgia, 'Times New Roman', serif;
    color: var(--jg-14532d, #14532d);
    text-shadow: 0 1px 0 rgba(255, 255, 255, .6);
    animation: ck-pisca .45s .3s 4 alternate both;
}
@keyframes ck-pisca { from { opacity: 1; } to { opacity: .25; } }
.ck__foto { width: 46%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 3px solid #FFFFFF; box-shadow: 0 0 0 1.5px #9A7414, 0 0 16px 4px rgba(255, 246, 200, .8); background: #fff; margin: 9% 0 6%; }
.ck__ouro small { font: 700 clamp(6px, 1.7vw, 8px)/1.2 Arial, sans-serif; letter-spacing: .1em; text-transform: uppercase; color: #6B4E0E; }
.ck__nome { font: 700 clamp(10px, 2.8vw, 14px)/1.2 Georgia, 'Times New Roman', serif; overflow-wrap: anywhere; }
.ck__brilhos { position: absolute; inset: 0; }
.ck__brilhos i {
    position: absolute; width: 9%; aspect-ratio: 1;
    background: #FFFDF0;
    clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
    animation: ck-estrela 1s ease-in-out infinite alternate;
}
.ck__brilhos i:nth-child(1) { left: 10%; top: 12%; }
.ck__brilhos i:nth-child(2) { left: 80%; top: 20%; animation-delay: .3s; }
.ck__brilhos i:nth-child(3) { left: 14%; top: 62%; animation-delay: .6s; width: 6%; }
.ck__brilhos i:nth-child(4) { left: 82%; top: 70%; animation-delay: .15s; width: 7%; }
.ck__brilhos i:nth-child(5) { left: 48%; top: 90%; animation-delay: .45s; width: 5%; }
@keyframes ck-estrela { from { transform: scale(.6) rotate(0deg); opacity: .5; } to { transform: scale(1.1) rotate(40deg); opacity: 1; } }

.ck__padrao { background: #FBFAF6; gap: 5%; }
.ck__check { width: 38%; }
.ck__check circle, .ck__check path { stroke-dasharray: 1 1; stroke-dashoffset: 1; animation: ck-traco .5s .15s ease-out forwards; }
.ck__check path { animation-delay: .45s; }
@keyframes ck-traco { to { stroke-dashoffset: 0; } }
.ck__padrao b { font: 700 clamp(9px, 2.5vw, 12px)/1.25 Arial, sans-serif; color: var(--jg-14532d, #14532d); }
.ck__padrao span { font: 400 clamp(8px, 2.2vw, 11px)/1.3 Arial, sans-serif; color: #5C6B60; }

/* rótulo */
.ck__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;
}
.ck__rotulo img { width: 12px; height: 12px; }

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

.ck__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);
}
.ck__botao:hover:not(:disabled) { filter: brightness(1.06); }
.ck__botao:disabled { opacity: .55; cursor: default; }

.ck__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);
}
.ck__msg--premiado { background: var(--jg-e3f5e6, #E3F5E6); border-color: var(--jg-9fd8ab, #9FD8AB); color: var(--jg-14532d, #14532d); }
.ck__msg--consolo  { background: #F1F3F1; border-color: #CDD5CE; color: #4F5A52; }
.ck__msg b { color: var(--jg-0a7a00, #0A7A00); }
.ck__msg--consolo b { color: #5C6B60; }

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

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

/* ---------------- movimento reduzido ---------------- */
@media (prefers-reduced-motion: reduce) {
    .ck--bipou .ck__canto { animation: none; }
    .ck__ouro, .ck__padrao { animation: none; opacity: 1; }
    .ck__titulo { animation: none; }
    .ck__brilhos i { animation: none; }
    .ck__check circle, .ck__check path { animation: none; stroke-dashoffset: 0; }
}
