/* Esmalte da sorte (beleza, estética e salões).
 *
 * Cores de MARCA como var(--jg-<hex>, #<hex>) nos botões e textos; mármore,
 * vidro fosco, tampas, dourado e as cores comuns de esmalte em hex direto.
 * Nunca azul.
 *
 * Contrato:
 *  - Estado FINAL por classe estática ou @keyframes … forwards.
 *  - Movimento reduzido: cada coisa para num estado VISÍVEL.
 *  - O pincel e o traço são JS (left/top em %, clip-path do traço).
 *  - Os três vidros são IGUAIS e foscos; as cerdas sobem transparentes. Nada
 *    de cor aparece antes da resposta.
 *  - Geometria: vidros em x = 30/50/70%; corpo de 72% a 94% (topo); tampa de
 *    52% a 72%. O pincel mede 34% de altura (tampa 20 + haste 11 + cerdas 3) e é
 *    ancorado pela ponta das cerdas (translate(-50%, -100%)).
 */

.es__palco {
    position: relative;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    aspect-ratio: 16 / 11;
    border-radius: 14px;
    overflow: hidden;
    background:
        linear-gradient(118deg, rgba(0, 0, 0, 0) 38%, rgba(200, 170, 175, .22) 39%, rgba(0, 0, 0, 0) 41%),
        linear-gradient(64deg, rgba(0, 0, 0, 0) 62%, rgba(200, 170, 175, .18) 63%, rgba(0, 0, 0, 0) 64.5%),
        linear-gradient(160deg, #FFF9F9, #F7E8EA);
    box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .45);
    user-select: none;
    font-family: Arial, sans-serif;
}

.es__rotulo {
    position: absolute;
    left: 50%; top: 2%;
    transform: translateX(-50%);
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 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;
}
.es__rotulo img { width: 12px; height: 12px; }

/* ---------------- vidros ---------------- */

.es__vidro { position: absolute; top: 52%; width: 14%; height: 42%; transform: translateX(-50%); z-index: 4; }
.es__corpo {
    position: absolute;
    left: 0; right: 0; bottom: 0; height: 52.4%;
    border-radius: 18% 18% 22% 22% / 14% 14% 18% 18%;
    background: linear-gradient(100deg, #F3E9EC, #FFFFFF 35%, #EADDE2 70%, #DCCDD3);
    box-shadow: inset 0 -6px 10px rgba(160, 120, 130, .18), 0 8px 12px -8px rgba(0, 0, 0, .35);
    border: 1px solid #D9C8CE;
}
.es__reflexo { position: absolute; left: 14%; top: 10%; width: 12%; height: 70%; border-radius: 99px; background: rgba(255, 255, 255, .8); }
.es__faixa { position: absolute; left: 12%; right: 12%; top: 58%; height: 7%; border-radius: 2px; background: linear-gradient(90deg, #E0B43A, #FFF3B0, #C9961A); }
.es__tampa {
    position: absolute;
    left: 50%; top: 0; width: 40%; height: 47.6%;
    transform: translateX(-50%);
    border-radius: 3px 3px 1px 1px;
    background: linear-gradient(90deg, #111, #3B3B3B 40%, #151515 70%, #000);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.es__tampa i { position: absolute; left: 0; right: 0; bottom: 6%; height: 7%; background: linear-gradient(90deg, #C9961A, #FFF3B0, #C9961A); }

/* ---------------- pincel ---------------- */

.es__pincel {
    position: absolute;
    width: 5.6%; height: 34%;
    transform-origin: 50% 100%;
    z-index: 3;                             /* atrás do corpo dos vidros: a haste some dentro */
    visibility: hidden;
    filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .25));
}
.es__pincel .es__tampa { width: 100%; height: 58.8%; transform: none; left: 0; transform-origin: 50% 50%; }
.es__haste { position: absolute; left: 44%; width: 12%; top: 58.8%; height: 32.4%; background: linear-gradient(90deg, #CFC6C9, #FFFFFF, #B9AEB2); }
.es__cerdas {
    position: absolute;
    left: 28%; width: 44%; top: 91.2%; height: 8.8%;
    border-radius: 0 0 50% 50% / 0 0 90% 90%;
    background: rgba(255, 255, 255, .55);          /* base incolor: igual nas duas */
    box-shadow: inset 0 0 0 1px rgba(160, 130, 140, .5);
}
.es__cerdas--ouro { background: linear-gradient(180deg, #FFF3B0, #D4AF37); box-shadow: none; }
.es--guardou .es__pincel { animation: es-sai .45s ease-in forwards; }
@keyframes es-sai { to { opacity: 0; margin-top: -8%; } }

/* ---------------- o traço ---------------- */

.es__traco {
    position: absolute;
    left: 16%; width: 70%;
    top: 35%; height: 14%;
    border-radius: 999px;
    display: flex; align-items: center; justify-content: center;
    clip-path: inset(0 100% 0 0);
    z-index: 2;
    box-shadow: inset 0 2px 3px rgba(255, 255, 255, .45), inset 0 -3px 5px rgba(0, 0, 0, .18);
}
.es__traco span {
    font: 900 clamp(13px, 3.8vw, 20px)/1 Georgia, 'Times New Roman', serif;
    letter-spacing: .04em;
    color: #5A4210;
    text-shadow: 0 1px 0 rgba(255, 246, 200, .8);
    white-space: nowrap;
    max-width: 92%;
    overflow: hidden;
    text-overflow: ellipsis;
}
.es__traco--cor { background: #C98E86; }
.es__traco--ouro {
    background:
        radial-gradient(circle, rgba(255, 255, 255, .95) 0 1px, rgba(255, 255, 255, 0) 1.6px) 0 0 / 9px 9px,
        radial-gradient(circle, rgba(255, 246, 200, .9) 0 1px, rgba(255, 246, 200, 0) 1.6px) 4px 5px / 11px 11px,
        linear-gradient(180deg, #FFF3B0, #F4C430 45%, #C9961A 80%, #E0B43A);
}
.es--premiou .es__traco--ouro { animation: es-glitter 1.6s linear infinite; box-shadow: 0 0 14px 3px rgba(255, 214, 90, .6), inset 0 2px 3px rgba(255, 255, 255, .5); }
@keyframes es-glitter {
    from { background-position: 0 0, 4px 5px, 0 0; }
    to   { background-position: 18px 0, -18px 5px, 0 0; }
}

/* brilhos (só no prêmio) */
.es__brilhos { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.es__brilhos i {
    position: absolute;
    width: 4.5%; aspect-ratio: 1;
    background: #FFF6C9;
    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));
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
}
.es--premiou .es__brilhos i { animation: es-estrela 1s ease-out forwards; }
@keyframes es-estrela {
    0%   { opacity: 0; transform: translate(-50%, -50%) scale(0) rotate(0deg); }
    45%  { opacity: 1; transform: translate(-50%, -50%) scale(1.25) rotate(30deg); }
    100% { opacity: .95; transform: translate(-50%, -50%) scale(.9) rotate(45deg); }
}

/* ---------------- placa do prêmio ---------------- */

.es__placa {
    position: absolute;
    left: 50%; top: 12%;
    width: 60%;
    transform: translate(-50%, -12px);
    opacity: 0;
    display: flex; align-items: center; gap: 8px;
    padding: 6px 9px;
    box-sizing: border-box;
    border-radius: 8px;
    background: linear-gradient(180deg, #FFF8DC, #F5E3A1);
    border: 1.5px solid #C9A227;
    box-shadow: 0 8px 16px -8px rgba(0, 0, 0, .5);
    z-index: 9;
}
.es__placa img { width: 40px; height: 40px; object-fit: cover; border-radius: 50%; border: 2px solid #D4AF37; flex: none; }
.es__placa div { font: 700 clamp(11px, 2.8vw, 13px)/1.25 Arial, sans-serif; color: var(--jg-14532d, #14532d); min-width: 0; }
.es__placa small { display: block; font: 700 9px/1.2 Arial, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #8A6D1F; margin-bottom: 2px; }
.es--placa .es__placa { animation: es-placa .5s cubic-bezier(.3, 1.3, .5, 1) forwards; }
@keyframes es-placa { to { transform: translate(-50%, 0); opacity: 1; } }

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

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

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

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

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

/* ---------------- movimento reduzido ---------------- */
@media (prefers-reduced-motion: reduce) {
    .es--guardou .es__pincel { animation: none; opacity: 0; }
    .es--premiou .es__traco--ouro { animation: none; }
    .es--premiou .es__brilhos i { animation: none; opacity: .95; transform: translate(-50%, -50%) scale(.9) rotate(45deg); }
    .es--placa .es__placa { animation: none; transform: translate(-50%, 0); opacity: 1; }
}
