/* Papelitos, carteles de logro y celebración de la victoria (js/efectos.js). */
.papelitos { position: fixed; inset: 0; z-index: 400; pointer-events: none; }

/* Logro chico: entra desde arriba con rebote y se va */
.logro { position: fixed; top: 76px; left: 50%; z-index: 390; display: flex; align-items: center; gap: 10px;
  padding: 10px 18px 10px 10px; border-radius: 999px; background: #fff; color: #1d2530; font-size: 15px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25), 0 0 0 3px var(--c1); transform: translateX(-50%);
  animation: logro-entra .55s cubic-bezier(.2, 1.6, .4, 1) both; }
.logro.sale { animation: logro-sale .4s ease-in both; }
.logro-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--c1); color: #fff; font-size: 16px;
  animation: logro-giro .8s .2s ease-out both; }
.logro b { white-space: nowrap; }
@keyframes logro-entra { from { transform: translate(-50%, -80px) scale(.6); opacity: 0; } }
@keyframes logro-sale { to { transform: translate(-50%, -60px) scale(.8); opacity: 0; } }
@keyframes logro-giro { from { transform: rotate(-200deg) scale(.3); } }

/* Celebración a pantalla completa */
.celebra { position: fixed; inset: 0; z-index: 380; display: grid; place-items: center; overflow: hidden; cursor: pointer;
  background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--c1) 85%, #fff) 0%, var(--c1) 35%, color-mix(in srgb, var(--c2) 80%, #000) 100%);
  animation: cel-fondo .5s ease-out both; }
.celebra.perdio { background: radial-gradient(circle at 50% 45%, #59626d 0%, #2b323a 70%); }
.celebra.sale { animation: cel-sale .4s ease-in both; }
.cel-rayos { position: absolute; width: 220vmax; height: 220vmax; left: 50%; top: 45%; transform: translate(-50%, -50%);
  background: repeating-conic-gradient(rgba(255,255,255,.16) 0 7deg, transparent 7deg 18deg);
  animation: cel-rayos 18s linear infinite; }
.celebra.perdio .cel-rayos { display: none; }
.cel-centro { position: relative; text-align: center; color: #fff; padding: 16px; max-width: 760px; }
.cel-cara { display: block; margin: 0 auto; width: min(42vmin, 260px); height: auto; filter: drop-shadow(0 12px 24px rgba(0,0,0,.35));
  animation: cel-cara 1s cubic-bezier(.2, 1.5, .4, 1) .15s both; }
.celebra.perdio .cel-cara { filter: grayscale(.7) drop-shadow(0 8px 16px rgba(0,0,0,.4)); animation: cel-cae 1.2s ease-out both; }
.cel-laureles { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); font-size: 54px; color: #f5b81c;
  text-shadow: 0 4px 10px rgba(0,0,0,.35); animation: cel-corona .9s cubic-bezier(.2, 1.8, .4, 1) .7s both; }
.cel-titulo { margin: 10px 0 6px; font-size: clamp(28px, 6vw, 56px); line-height: 1.05; text-transform: uppercase; letter-spacing: .02em;
  text-shadow: 0 4px 0 rgba(0,0,0,.25), 0 10px 30px rgba(0,0,0,.3); animation: cel-sello .7s cubic-bezier(.2, 1.6, .4, 1) .45s both; }
.cel-sub { margin: 0; font-size: clamp(15px, 2.4vw, 20px); opacity: .95; animation: cel-sube .6s ease-out .9s both; }
.cel-toca { margin-top: 18px; font-size: 13px; opacity: .75; animation: cel-sube .6s ease-out 1.6s both, pt-latido 1.6s 2.2s infinite; }
@keyframes cel-fondo { from { opacity: 0; } }
@keyframes cel-sale { to { opacity: 0; transform: scale(1.05); } }
@keyframes cel-rayos { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes cel-cara { from { transform: scale(0) rotate(-15deg); opacity: 0; } }
@keyframes cel-cae { from { transform: translateY(-30px); opacity: 0; } }
@keyframes cel-corona { from { transform: translate(-50%, -60px) scale(.2); opacity: 0; } }
@keyframes cel-sello { from { transform: scale(2.4); opacity: 0; } }
@keyframes cel-sube { from { transform: translateY(14px); opacity: 0; } }

/* Podio de la repetición: el que gana la provincia salta y brilla */
.podio-lugar.primero .podio-circ { animation: podio-salta .7s cubic-bezier(.2, 1.6, .4, 1) both; }
.podio-gana { animation: cel-sello .5s cubic-bezier(.2, 1.6, .4, 1) .25s both; }
.rep-pres.yo:first-of-type, .rep-fila.yo.sube { animation: fila-brilla 1.2s ease-out; }
@keyframes podio-salta { 0% { transform: scale(.6); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes fila-brilla { 0% { box-shadow: 0 0 0 0 rgba(245,184,28,.9); } 100% { box-shadow: 0 0 0 14px rgba(245,184,28,0); } }

/* Cabecera de la noche electoral cuando ganaste */
.noche-cab.gano { position: relative; overflow: hidden; background: linear-gradient(100deg, #fff6dc, #fffaf0 60%); }
.noche-cab.gano h1 { animation: cel-sello .7s cubic-bezier(.2, 1.6, .4, 1) both; }
.noche-cab.gano::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.8) 50%, transparent 70%);
  transform: translateX(-100%); animation: brillo 2.4s 1s ease-in-out infinite; pointer-events: none; }
@keyframes brillo { 60%, 100% { transform: translateX(100%); } }

@media (prefers-reduced-motion: reduce) {
  .celebra, .celebra *, .logro, .logro *, .podio-lugar .podio-circ, .noche-cab.gano::after { animation: none !important; }
}

/* Máquina de fichas (tipo chicles) */
.maquina .mq-cuerpo { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; justify-content: center; }
.mq-aparato { position: relative; width: 190px; height: 270px; flex: none; }
.mq-globo { position: absolute; left: 10px; top: 0; width: 170px; height: 170px; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.9) 0 8%, rgba(220,235,250,.55) 30%, rgba(170,200,230,.45) 100%);
  box-shadow: inset 0 -10px 20px rgba(0,0,0,.12), 0 0 0 5px #c0392b; }
.mq-bola { position: absolute; width: 26px; height: 26px; margin: -13px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0 12%, var(--b) 45%, color-mix(in srgb, var(--b) 70%, #000) 100%); }
.mq-base { position: absolute; left: 25px; top: 158px; width: 140px; height: 105px; border-radius: 14px 14px 22px 22px;
  background: linear-gradient(#e0303a, #a5151d); box-shadow: inset 0 -6px 0 rgba(0,0,0,.18); display: grid; justify-items: center; align-content: start; padding-top: 10px; gap: 6px; }
.mq-cartel { font: 700 11px "Barlow Condensed", sans-serif; letter-spacing: .08em; color: #fff; background: #184282; padding: 2px 8px; border-radius: 4px; }
.mq-perilla { width: 42px; height: 42px; border-radius: 50%; border: 0; background: radial-gradient(circle at 35% 30%, #fff, #c9ced4 60%, #8a97a6); color: #5d646c; font-size: 16px; cursor: pointer; box-shadow: 0 3px 0 rgba(0,0,0,.25); }
.mq-perilla:disabled { cursor: not-allowed; opacity: .7; }
.mq-boca { width: 46px; height: 18px; border-radius: 0 0 12px 12px; background: #3a0b0e; }
.mq-salida { position: absolute; left: 50%; top: 212px; width: 30px; height: 30px; margin-left: -15px; border-radius: 50%; opacity: 0;
  background: radial-gradient(circle at 35% 30%, #fff 0 12%, var(--b, #f5b81c) 45%, color-mix(in srgb, var(--b, #f5b81c) 70%, #000) 100%); }
.mq-aparato.girando .mq-perilla { animation: mq-perilla 1s ease-in-out; }
.mq-aparato.girando .mq-bola { animation: mq-sacude .25s var(--d) ease-in-out 4 alternate; }
.mq-aparato.cae .mq-salida { animation: mq-cae 1.1s cubic-bezier(.3, 1.4, .5, 1) forwards; }
@keyframes mq-perilla { to { transform: rotate(360deg); } }
@keyframes mq-sacude { to { transform: translate(4px, -6px) rotate(20deg); } }
@keyframes mq-cae { 0% { opacity: 1; transform: translateY(-30px) scale(.6); } 60% { opacity: 1; transform: translateY(40px) scale(1.1); } 100% { opacity: 1; transform: translateY(36px) scale(1.6); } }
.mq-lado { flex: 1 1 220px; display: grid; gap: 8px; }
.mq-fichas { margin: 0; font-size: 16px; }
.mq-fichas i { color: #f5b81c; }
.mq-chances ul { list-style: none; margin: 6px 0 0; padding: 0; max-height: 160px; overflow: auto; font-size: 13px; }
.mq-chances li { display: flex; justify-content: space-between; padding: 2px 0; border-bottom: 1px solid #eef1f4; }
.ti-maquina { margin-top: 8px; }

.mq-regalo { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: #23955a; color: #fff; font-size: 12px; font-weight: 700; }
.mq-promo { margin: 0; padding: 8px 10px; border-radius: 10px; background: #eaf7ef; color: #1d6b40; font-size: 13px; }
.mq-promo .btn { margin-left: 6px; }

/* Celular acostado: la máquina al costado de los botones y más chica, para que entre sin bajar */
@media (orientation: landscape) and (max-height: 520px) {
  .caja-modal.cuenta.maquina { width: min(96vw, 720px); max-width: none; }
  .maquina .mq-cuerpo { flex-wrap: nowrap; align-items: flex-start; }
  .mq-aparato { transform: scale(.78); transform-origin: top left; width: 150px; height: 215px; }
  .cel-cara { width: min(34vh, 200px); }
  .cel-titulo { font-size: clamp(24px, 5vw, 40px); }
}

/* ---------------------------------------------------------------- Máquina del tiempo */
.caja-modal.cuenta.tiempo { width: min(96vw, 800px); background: #0b0d22; color: #e8ecff; }
.tiempo header { background: linear-gradient(100deg, #140f38, #3b2a7a 55%, #b8892a); }
.tiempo .cuerpo-modal { background:
  radial-gradient(1px 1px at 12% 20%, #fff 50%, transparent), radial-gradient(1px 1px at 70% 12%, #fff 50%, transparent),
  radial-gradient(1.5px 1.5px at 40% 75%, #cfd8ff 50%, transparent), radial-gradient(1px 1px at 88% 60%, #fff 50%, transparent),
  radial-gradient(1px 1px at 25% 90%, #fff 50%, transparent), radial-gradient(1.5px 1.5px at 60% 40%, #ffe9a8 50%, transparent),
  radial-gradient(ellipse at 20% 30%, rgba(123,63,184,.35), transparent 60%), radial-gradient(ellipse at 90% 90%, rgba(47,143,216,.25), transparent 55%), #0b0d22; }
.tiempo .ayuda, .tiempo .mq-fichas, .tiempo .mq-chances summary { color: #c9d0f0; }
.tiempo .mq-chances li { border-color: rgba(255,255,255,.08); }
.tiempo .btn:not(.btn-naranja) { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.2); }

.tm { --k: #7b3fb8; --ang: 135deg; position: relative; flex: none; width: 250px; display: grid; justify-items: center; gap: 10px; padding: 16px 12px 14px;
  border-radius: 22px; background: linear-gradient(160deg, #2b2416, #14110b 60%, #1c1710);
  box-shadow: inset 0 0 0 3px #c9a227, inset 0 0 0 7px #3b3020, inset 0 0 40px rgba(201,162,39,.15), 0 14px 30px rgba(0,0,0,.5); overflow: hidden; }
/* Engranajes de bronce detrás del dial */
.tm-engranaje { position: absolute; border-radius: 50%; border: 9px dotted #8a6a1f; opacity: .55; animation: tm-gira 14s linear infinite; }
.tm-engranaje::after { content: ""; position: absolute; inset: 22%; border-radius: 50%; border: 4px solid #8a6a1f; }
.tm-engranaje.e1 { width: 90px; height: 90px; left: -30px; top: 40px; }
.tm-engranaje.e2 { width: 64px; height: 64px; right: -18px; top: 18px; animation-direction: reverse; animation-duration: 9s; }
.tm-engranaje.e3 { width: 70px; height: 70px; right: -22px; bottom: 70px; animation-duration: 11s; }
/* Dial con los años alrededor del portal */
.tm-dial { position: relative; width: 210px; height: 210px; border-radius: 50%;
  background: radial-gradient(circle, transparent 58%, #3b3020 59%, #2a2214 66%, #c9a227 67%, #8a6a1f 70%, transparent 71%); }
.tm-marca { position: absolute; left: 50%; top: 50%; transform: rotate(var(--a)) translateY(-96px); transform-origin: 0 0; }
.tm-marca b { position: absolute; transform: translate(-50%, -50%) rotate(calc(-1 * var(--a))); font: 700 11px "Barlow Condensed", sans-serif; color: #ffe08a; letter-spacing: .02em; }
.tm-portal { position: absolute; left: 50%; top: 50%; width: 140px; height: 140px; margin: -70px; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle, #0d0b26 0 45%, #1d1650 70%, #000 100%); box-shadow: 0 0 0 5px #c9a227, 0 0 22px 4px color-mix(in srgb, var(--k) 60%, transparent), inset 0 0 20px #000; }
.tm-vortice { position: absolute; inset: -30%; border-radius: 50%; filter: blur(1px); animation: tm-gira 6s linear infinite;
  background: repeating-conic-gradient(from 0deg, rgba(120,90,255,0) 0 12deg, rgba(150,120,255,.55) 14deg 20deg, rgba(80,200,255,0) 22deg 30deg); }
.tm-vortice::after { content: ""; position: absolute; inset: 30%; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.65), transparent 70%); }
.tm-cara { position: absolute; left: 50%; bottom: 0; width: 82%; transform: translateX(-50%) scale(.2); opacity: 0; filter: brightness(0); }
.tm-destello { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.tm-aguja { position: absolute; left: 50%; top: 50%; width: 4px; height: 98px; margin-left: -2px; transform-origin: 50% 100%; translate: 0 -98px;
  rotate: var(--ang); background: linear-gradient(#ff5a5a, #d7263d 70%, transparent); border-radius: 2px; transition: rotate 1.2s cubic-bezier(.3, 1.6, .5, 1); z-index: 2; }
.tm-aguja::after { content: ""; position: absolute; left: 50%; bottom: -6px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: #c9a227; box-shadow: 0 0 0 2px #3b3020; }
.tm-rayo { position: absolute; left: 50%; top: 50%; color: #9fd8ff; font-size: 16px; opacity: 0; transform: rotate(var(--r)) translateY(-82px) rotate(calc(-1 * var(--r))); text-shadow: 0 0 8px #6fc3ff; }
/* Tablero: destino y presente */
.tm-tablero { display: grid; gap: 6px; padding: 8px; max-width: 100%; border-radius: 10px; background: #0d0f14; box-shadow: inset 0 0 0 2px #3b3020; }
.tm-fila { display: flex; align-items: center; gap: 5px; }
.tm-fila small { width: 46px; font: 700 10px "Barlow Condensed", sans-serif; letter-spacing: .1em; text-transform: uppercase; color: #ff7a7a; }
.tm-fila.presente small { color: #7be08a; }
.tm-anio { display: flex; gap: 3px; }
.tm-anio span { display: grid; place-items: center; width: 24px; height: 32px; border-radius: 4px; background: linear-gradient(#22262e 50%, #1a1d24 50%);
  color: #ff6b6b; font: 800 22px "Barlow Condensed", sans-serif; box-shadow: inset 0 0 0 1px #000; text-shadow: 0 0 8px rgba(255,90,90,.7); }
.tm-fila.presente .tm-anio span { color: #7be08a; text-shadow: 0 0 8px rgba(123,224,138,.6); }
.tm-luces { display: flex; gap: 7px; justify-content: center; }
.tm-luces i { width: 9px; height: 9px; border-radius: 50%; background: #3a3f4b; box-shadow: inset 0 0 0 1px #000; }
/* Palanca vertical */
.tm-palanca { position: relative; width: 56px; height: 64px; border: 0; background: none; cursor: pointer; }
.tm-palanca::before { content: ""; position: absolute; left: 6px; right: 6px; bottom: 0; height: 16px; border-radius: 6px; background: linear-gradient(#5a4a2a, #2b2416); box-shadow: inset 0 0 0 2px #c9a227; }
.tm-mango { position: absolute; left: 50%; bottom: 8px; width: 8px; height: 50px; margin-left: -4px; border-radius: 4px; background: linear-gradient(90deg, #8a8f99, #e6e9ee, #8a8f99);
  transform-origin: 50% 100%; transform: rotate(-28deg); transition: transform .45s cubic-bezier(.3, 1.5, .5, 1); }
.tm-mango::before { content: ""; position: absolute; left: 50%; top: -12px; width: 22px; height: 22px; margin-left: -11px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ff8a8a, #d7263d 60%, #7a0f1b); box-shadow: 0 2px 5px rgba(0,0,0,.5); }
.tm-palanca:not(:disabled):hover .tm-mango { transform: rotate(-16deg); }
.tm-palanca:disabled { opacity: .5; cursor: not-allowed; }
/* Viajando */
.tm.viajando .tm-mango { transform: rotate(28deg); }
.tm.viajando .tm-vortice { animation-duration: .45s; }
.tm.viajando .tm-engranaje { animation-duration: 1.5s; }
.tm.viajando .tm-luces i { animation: tm-luz .3s steps(2) infinite; }
.tm.viajando .tm-luces i:nth-child(2n) { animation-delay: .15s; }
.tm.viajando .tm-rayo { animation: tm-chispa .5s var(--d) steps(2) 5; }
.tm.viajando .tm-cara { animation: tm-silueta 2.2s ease-in forwards; }
.tm.viajando:not(.llega) .tm-aguja { animation: tm-oscila .25s ease-in-out infinite alternate; }
/* Llegada */
.tm.llega .tm-destello { animation: tm-flash .6s ease-out; }
.tm.llega .tm-cara { animation: tm-revela .7s cubic-bezier(.2, 1.5, .4, 1) forwards; }
.tm.llega .tm-portal { box-shadow: 0 0 0 5px var(--k), 0 0 40px 12px var(--k), inset 0 0 20px #000; }
.tm.llega.legendario { box-shadow: inset 0 0 0 3px #ffd34d, inset 0 0 60px rgba(255,211,77,.35), 0 0 50px 12px rgba(255,196,0,.7); }
.tm.llega.legendario .tm-vortice { background: repeating-conic-gradient(rgba(255,210,80,0) 0 10deg, rgba(255,210,80,.8) 12deg 18deg, rgba(255,255,255,0) 20deg 30deg); }
@keyframes tm-gira { to { transform: rotate(360deg); } }
@keyframes tm-luz { to { background: #ffcf4a; box-shadow: 0 0 8px #ffcf4a; } }
@keyframes tm-chispa { 50% { opacity: 1; } }
@keyframes tm-oscila { from { rotate: -100deg; } to { rotate: 100deg; } }
@keyframes tm-silueta { from { opacity: 0; transform: translateX(-50%) scale(.2) rotate(-40deg); } to { opacity: .9; transform: translateX(-50%) scale(.8) rotate(0); } }
@keyframes tm-revela { from { filter: brightness(0); transform: translateX(-50%) scale(.8); } to { opacity: 1; filter: none; transform: translateX(-50%) scale(1); } }
@keyframes tm-flash { 0% { opacity: .95; } 100% { opacity: 0; } }
/* Categorías con su chance */
.tm-cats { display: flex; flex-wrap: wrap; gap: 6px; }
.tm-cats span { display: inline-flex; gap: 6px; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 12px; color: #fff;
  background: color-mix(in srgb, var(--k) 35%, transparent); box-shadow: inset 0 0 0 1.5px var(--k); }
.tm-cats b { text-transform: uppercase; letter-spacing: .05em; font-size: 11px; }

/* Legendarios destacados al costado */
.tm-leyendas { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tm-leyenda { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 8px 6px 8px; border-radius: 12px; overflow: hidden;
  background: linear-gradient(135deg, #3b2a00, #8a5a00 45%, #e0a800); color: #fff; box-shadow: 0 0 0 2px #ffd34d, 0 4px 12px rgba(224,168,0,.35); }
.tm-leyenda::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,.45) 50%, transparent 65%); transform: translateX(-100%); animation: brillo 3s 1s ease-in-out infinite; }
/* Los legendarios se muestran tal cual (con un halo dorado), para que se vea qué podés traer. */
.tm-leyenda img { flex: none; width: 96px; height: 110px; margin: 0; object-fit: contain; object-position: bottom; filter: drop-shadow(0 0 6px rgba(255,211,77,.9)) drop-shadow(0 3px 4px rgba(0,0,0,.45)); }
.tm-leyenda span { display: grid; line-height: 1.1; }
.tm-leyenda small { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: #ffe8a3; }
.tm-leyenda b { font-size: 13px; }
.tm-leyenda em { font-style: normal; font-size: 12px; color: #fff3c4; }
.mq-chances .tm-cat { margin-top: 6px; border-bottom: 2px solid var(--k); color: var(--k); font-weight: 700; }
.premio-cat { display: inline-block; margin-bottom: 4px; padding: 2px 10px; border-radius: 999px; background: var(--k); color: #fff; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.ti-leyenda { background: linear-gradient(135deg, #8a5a00, #e0a800); color: #fff; border: 0; }

@media (orientation: landscape) and (max-height: 520px) {
  .caja-modal.cuenta.tiempo { width: min(96vw, 760px); max-width: none; }
  .tm { width: 210px; padding: 10px 8px; gap: 6px; }
  .tm-dial { transform: scale(.82); margin: -18px 0; }
  .tm-tablero { padding: 6px 8px; }
  .tm-anio span { width: 20px; height: 26px; font-size: 18px; }
  .tm-palanca { height: 52px; }
}

/* Botones de la cabecera de la noche electoral */
.noche-botones { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* Compra de viajes: suelto o paquete de 10 */
.tm-compras { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tm-compras .btn { display: grid; gap: 2px; padding: 8px 6px; line-height: 1.1; }
.tm-compras small { font-size: 11px; opacity: .8; font-weight: 600; }
.tm-pack { position: relative; box-shadow: inset 0 0 0 2px #e0a800 !important; }
.tm-pack em { position: absolute; top: -9px; right: 8px; padding: 1px 8px; border-radius: 999px; background: #e0a800; color: #1d1500; font-size: 10px; font-style: normal; font-weight: 800; letter-spacing: .04em; }

/* ---------------------------------------------------------------- Carta coleccionable del premio */
.carta-premio { --k: #6b7785; display: grid; justify-items: center; gap: 12px; padding: 10px; width: min(92vw, 380px); color: #fff; text-align: center; }
.cp-titulo { margin: 0; font: 800 34px "Barlow Condensed", sans-serif; letter-spacing: .04em; text-transform: uppercase; color: #fff;
  text-shadow: 0 0 18px var(--k), 0 3px 0 rgba(0,0,0,.35); animation: cel-sello .6s cubic-bezier(.2, 1.6, .4, 1) 1s both; }
.cp-escena { perspective: 1000px; }
.cp-carta { position: relative; width: 260px; height: 380px; transform-style: preserve-3d; animation: cp-girar 1.1s cubic-bezier(.3, 1.3, .5, 1) .15s both; }
.cp-dorso, .cp-frente { position: absolute; inset: 0; border-radius: 18px; backface-visibility: hidden; overflow: hidden; }
.cp-dorso { display: grid; place-items: center; transform: rotateY(180deg);
  background: repeating-linear-gradient(45deg, #184282 0 14px, #1d4f9a 14px 28px); box-shadow: inset 0 0 0 8px #74acdf, inset 0 0 0 11px #fff; }
.cp-dorso span { display: grid; font: 800 30px "Barlow Condensed", sans-serif; letter-spacing: .06em; color: #fff; text-shadow: 0 3px 0 rgba(0,0,0,.3); }
.cp-dorso b { color: #f5b81c; font-size: 46px; }
/* Frente: marco del color de la categoría, arte con el color del partido */
.cp-frente { display: grid; grid-template-rows: 1fr auto auto; padding: 9px; background: linear-gradient(150deg, color-mix(in srgb, var(--k) 70%, #fff), var(--k) 40%, color-mix(in srgb, var(--k) 65%, #000));
  box-shadow: 0 18px 40px rgba(0,0,0,.45), 0 0 30px color-mix(in srgb, var(--k) 70%, transparent); }
.cp-arte { position: relative; border-radius: 12px 12px 4px 4px; overflow: hidden;
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--c1) 55%, #fff) 0%, var(--c1) 45%, var(--c2) 100%); box-shadow: inset 0 0 0 2px rgba(255,255,255,.5); }
.cp-arte::before { content: ""; position: absolute; inset: -40%; background: repeating-conic-gradient(rgba(255,255,255,.14) 0 8deg, transparent 8deg 20deg); animation: tm-gira 30s linear infinite; }
.cp-logo { position: absolute; right: -16px; top: 18px; width: 120px; opacity: .22; filter: brightness(0) invert(1); }
.cp-cara { position: absolute; left: 50%; bottom: 0; height: 96%; transform: translateX(-50%); filter: drop-shadow(0 6px 10px rgba(0,0,0,.35)); }
.cp-cat { position: absolute; left: 8px; top: 8px; display: inline-flex; gap: 5px; align-items: center; padding: 3px 9px; border-radius: 999px;
  background: var(--k); font: 800 12px "Barlow Condensed", sans-serif; letter-spacing: .08em; text-transform: uppercase; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.cp-anio { position: absolute; right: 8px; top: 8px; padding: 2px 8px; border-radius: 6px; background: rgba(0,0,0,.45); font: 700 14px "Barlow Condensed", sans-serif; }
.cp-placa { margin-top: 6px; padding: 6px 8px; border-radius: 4px; background: #fff; color: #1d2530; display: grid; line-height: 1.15; box-shadow: inset 0 -3px 0 rgba(0,0,0,.08); }
.cp-placa b { font: 800 20px "Barlow Condensed", sans-serif; text-transform: uppercase; letter-spacing: .02em; }
.cp-placa small { font-size: 11px; color: #5d646c; }
.cp-rasgos { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: 6px; }
.cp-rasgos span { display: inline-flex; gap: 4px; align-items: center; padding: 2px 7px; border-radius: 999px; background: rgba(0,0,0,.3); font-size: 10.5px; font-weight: 700; }
/* Brillo que pasa por encima; los épicos y legendarios, holográficos */
.cp-brillo { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.55) 48%, transparent 62%);
  transform: translateX(-120%); animation: cp-brillo 2.8s 1.3s ease-in-out infinite; }
.carta-premio.epico .cp-brillo, .carta-premio.legendario .cp-brillo { background: linear-gradient(115deg, transparent 25%, rgba(255,0,170,.35) 38%, rgba(255,230,0,.45) 48%, rgba(0,230,255,.35) 58%, transparent 72%); mix-blend-mode: screen; }
.carta-premio.legendario .cp-carta { animation: cp-girar 1.1s cubic-bezier(.3, 1.3, .5, 1) .15s both, cp-flota 3s 1.4s ease-in-out infinite; }
.carta-premio.legendario .cp-frente { box-shadow: 0 18px 40px rgba(0,0,0,.45), 0 0 50px 10px rgba(255,200,0,.6); }
.cp-sello { position: absolute; right: 14px; top: 46%; padding: 4px 12px; border: 3px solid #fff; border-radius: 8px; transform: rotate(-14deg);
  background: rgba(215,38,61,.85); font: 800 24px "Barlow Condensed", sans-serif; letter-spacing: .04em; animation: cel-sello .5s cubic-bezier(.2, 1.6, .4, 1) 1.2s both; }
.cp-texto { margin: 0; max-width: 340px; font-size: 14px; color: #e8ecff; }
.cp-botones { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
@keyframes cp-girar { from { transform: rotateY(-540deg) scale(.4); } to { transform: rotateY(0) scale(1); } }
@keyframes cp-brillo { 55%, 100% { transform: translateX(120%); } }
@keyframes cp-flota { 50% { transform: translateY(-8px); } }
@media (orientation: landscape) and (max-height: 520px) {
  .carta-premio { gap: 6px; }
  .cp-titulo { font-size: 24px; }
  .cp-carta { width: 190px; height: 278px; }
  .cp-placa b { font-size: 16px; }
  .cp-texto { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { .cp-carta, .cp-brillo, .cp-titulo, .cp-sello { animation: none !important; } }
/* Fondo oscuro detrás de la carta para que resalte */
#modal:has(.carta-premio) { background: radial-gradient(circle at 50% 40%, rgba(40, 30, 90, .9), rgba(8, 10, 24, .96)); }

/* Boleto de bienvenida (invitados): integrado a la máquina, con borde troquelado */
.mq-boleto { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; border-radius: 10px;
  background: linear-gradient(100deg, #3b2a00, #6b4a00); border: 1.5px dashed #e0a800; color: #ffe9a8; text-align: left; }
.mq-boleto::before, .mq-boleto::after { content: ""; position: absolute; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%; background: #0b0d22; }
.mq-boleto::before { left: -8px; } .mq-boleto::after { right: -8px; }
.mq-boleto > i { font-size: 22px; color: #ffd34d; transform: rotate(-12deg); }
.mq-boleto span { display: grid; flex: 1; line-height: 1.15; }
.mq-boleto b { font: 800 17px "Barlow Condensed", sans-serif; letter-spacing: .03em; text-transform: uppercase; color: #fff; }
.mq-boleto small { font-size: 12px; color: #ffe9a8; opacity: .85; }
.mq-boleto .btn { flex: none; }

/* Tres legendarios en la máquina */
.tm-leyendas { grid-template-columns: repeat(3, 1fr); }
.tm-leyenda img { width: 78px; height: 92px; }
.tm-leyenda b { font-size: 12px; }
