/* [Pulso-Supabase] Centro de celebraciones: lienzo, hologramas y panel. */
.cf-celeb-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 250; pointer-events: none; }

/* Holograma: texto grande con degradado, línea de escáner y brillo */
.cf-holo {
  --hc: #e879f9; position: fixed; left: 50%; top: 38%; z-index: 251; pointer-events: none; text-align: center;
  transform: translate(-50%, -50%); padding: 18px 34px 16px; border-radius: 22px; overflow: hidden;
  background: linear-gradient(180deg, rgba(18, 13, 38, .72), rgba(18, 13, 38, .45));
  border: 1px solid color-mix(in srgb, var(--hc) 55%, transparent);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .04) inset, 0 0 40px -6px var(--hc), 0 24px 60px -24px rgba(0, 0, 0, .7);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  animation: cf-holo-in .5s cubic-bezier(.2, .9, .2, 1.2) both;
}
.cf-holo::before { /* línea de escáner */
  content: ''; position: absolute; left: 0; right: 0; height: 40%; top: -40%;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--hc) 30%, transparent), transparent);
  animation: cf-holo-scan 1.1s ease-out .1s both;
}
.cf-holo b {
  display: block; font-size: clamp(34px, 9vw, 64px); font-weight: 900; letter-spacing: -1px; line-height: 1.05; white-space: nowrap;
  background: linear-gradient(90deg, #fff, var(--hc) 60%, #fff); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 14px color-mix(in srgb, var(--hc) 70%, transparent));
}
.cf-holo small { display: block; margin-top: 6px; font-size: 14px; font-weight: 700; letter-spacing: .6px; color: rgba(245, 243, 255, .85); text-transform: uppercase; }
.cf-holo-sale { animation: cf-holo-out .45s ease-in both; }
@keyframes cf-holo-in { from { opacity: 0; transform: translate(-50%, -40%) scale(.85); filter: blur(6px); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); filter: none; } }
@keyframes cf-holo-out { to { opacity: 0; transform: translate(-50%, -60%) scale(1.04); filter: blur(4px); } }
@keyframes cf-holo-scan { to { top: 110%; } }

/* Panel */
.cf-celeb {
  position: fixed; z-index: 170; left: 50%; top: 50%; width: min(520px, calc(100vw - 32px)); max-height: min(86vh, 760px); overflow-y: auto;
  padding: 22px 18px 18px; border-radius: 24px; color: #f5f3ff;
  background: radial-gradient(120% 60% at 50% -10%, rgba(168, 85, 247, .28), transparent 60%), linear-gradient(180deg, #17122e, #100c22);
  border: 1px solid rgba(232, 121, 249, .28); box-shadow: 0 30px 80px -24px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .03) inset;
  transform: translate(-50%, -46%) scale(.96); opacity: 0; visibility: hidden; transition: transform .22s cubic-bezier(.2, .8, .2, 1), opacity .2s, visibility 0s linear .22s;
  scrollbar-width: thin; scrollbar-color: rgba(232, 121, 249, .3) transparent; color-scheme: dark;
}
.cf-celeb.cf-open { transform: translate(-50%, -50%); opacity: 1; visibility: visible; transition-delay: 0s; }
.cf-celeb .cf-mmenu-grip { display: none; }
.cf-celeb .cf-perfil-x { border-color: rgba(255, 255, 255, .15); color: rgba(245, 243, 255, .7); }
.cf-celeb-head { display: flex; align-items: center; gap: 12px; margin: 0 44px 16px 0; }
.cf-celeb-head b { display: block; font-size: 20px; letter-spacing: -.3px; }
.cf-celeb-head small { display: block; font-size: 12.5px; color: rgba(226, 228, 245, .6); }
.cf-celeb-logo { width: 46px; height: 46px; flex: 0 0 auto; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, #f43f5e, #a855f7); box-shadow: 0 10px 26px -10px rgba(168, 85, 247, .9); }
.cf-celeb-logo svg { width: 70%; height: 70%; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; animation: cf-celeb-trazo 2.4s ease-in-out infinite; }
@keyframes cf-celeb-trazo { 0% { stroke-dashoffset: 40; } 45%, 100% { stroke-dashoffset: 0; } }
.cf-celeb-master {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 16px; cursor: pointer;
  background: linear-gradient(135deg, rgba(244, 63, 94, .16), rgba(168, 85, 247, .18)); border: 1px solid rgba(232, 121, 249, .35);
}
.cf-celeb-master b { display: block; font-size: 15px; }
.cf-celeb-master small { display: block; font-size: 12px; color: rgba(226, 228, 245, .6); }
.cf-celeb-lista h4 { margin: 18px 4px 8px; font-size: 11.5px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: rgba(232, 121, 249, .8); }
.cf-celeb-lista.cf-celeb-off { opacity: .45; }
.cf-celeb-item {
  display: grid; grid-template-columns: 42px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 10px 12px; margin-bottom: 8px;
  border-radius: 14px; background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .06); transition: border-color .2s, background .2s;
}
.cf-celeb-item.cf-on { border-color: rgba(232, 121, 249, .3); background: rgba(168, 85, 247, .07); }
.cf-celeb-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 21px; background: rgba(255, 255, 255, .05); }
.cf-celeb-item.cf-on .cf-celeb-ico { background: rgba(168, 85, 247, .18); box-shadow: 0 0 18px -6px rgba(232, 121, 249, .8); }
.cf-celeb-txt b { display: block; font-size: 14px; }
.cf-celeb-txt small { display: block; font-size: 12px; line-height: 1.3; color: rgba(226, 228, 245, .58); }
.cf-celeb-probar {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(232, 121, 249, .35); background: transparent; color: #f0abfc;
  font-size: 12px; cursor: pointer; transition: background .2s, box-shadow .2s;
}
.cf-celeb-probar:hover:not(:disabled) { background: rgba(232, 121, 249, .15); box-shadow: 0 0 14px rgba(232, 121, 249, .45); }
.cf-celeb-probar:disabled { opacity: .35; cursor: default; }

/* Interruptor tipo píldora */
.cf-sw { appearance: none; -webkit-appearance: none; position: relative; width: 46px; height: 26px; flex: 0 0 auto; border-radius: 99px; cursor: pointer; margin: 0;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .12); transition: background .25s, box-shadow .25s; }
.cf-sw::after { content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .25s cubic-bezier(.3, 1.4, .5, 1); box-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
.cf-sw:checked { background: linear-gradient(135deg, #f43f5e, #a855f7); border-color: transparent; box-shadow: 0 0 16px -4px rgba(232, 121, 249, .9); }
.cf-sw:checked::after { transform: translateX(20px); }
.cf-sw:disabled { opacity: .5; cursor: default; }
.cf-sw:focus-visible { outline: 2px solid #f0abfc; outline-offset: 2px; }

@media (max-width: 700px) {
  .cf-celeb { left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: 88vh; border-radius: 24px 24px 0 0; padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    transform: translateY(105%); opacity: 1; }
  .cf-celeb.cf-open { transform: translateY(0); }
  .cf-celeb .cf-mmenu-grip { display: block; background: rgba(255, 255, 255, .2); }
  .cf-celeb-item { grid-template-columns: 38px minmax(0, 1fr) auto auto; gap: 10px; padding: 10px; }
  .cf-celeb-ico { width: 38px; height: 38px; font-size: 19px; }
  .cf-holo { padding: 14px 22px 12px; max-width: calc(100vw - 40px); }
}
@media (prefers-reduced-motion: reduce) { .cf-holo, .cf-holo::before, .cf-celeb-logo svg { animation: none; } }

/* 📤 Pedido subido a EMY [Pulso-Supabase] */
.cf-emyv { position: fixed; inset: 0; z-index: 249; pointer-events: none; opacity: 0; transition: opacity .35s ease; }
.cf-emyv.cf-on { opacity: 1; }
.cf-emyv.cf-sale { opacity: 0; transition: opacity .55s ease; }
.cf-emyv-fondo { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 42%, rgba(34, 195, 214, .28), rgba(8, 10, 24, .82) 62%); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.cf-emyv-logo { position: absolute; transform: translate(-50%, -50%) scale(.4); opacity: 0; border-radius: 26%; background: #fff; display: grid; place-items: center; box-shadow: 0 0 0 3px rgba(255,255,255,.12), 0 18px 50px -12px rgba(0,0,0,.7);
  transition: transform .6s cubic-bezier(.2, 1.6, .4, 1), opacity .35s ease, box-shadow .4s ease; }
.cf-emyv.cf-on .cf-emyv-logo { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.cf-emyv-emy { transition-delay: .12s; }
.cf-emyv-logo img { width: 74%; height: 74%; object-fit: contain; border-radius: 18%; }
.cf-emyv-pulso { background: linear-gradient(135deg, #f43f5e, #a855f7); }
.cf-emyv-pulso img { width: 100%; height: 100%; border-radius: 26%; }
.cf-emyv-logo span { position: absolute; top: 100%; margin-top: 10px; font: 800 13px/1 system-ui, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: rgba(236, 254, 255, .75); }
.cf-emyv-emy.cf-golpe { animation: cf-emyv-golpe .7s cubic-bezier(.2, 1.6, .4, 1); box-shadow: 0 0 0 4px #22c3d6, 0 0 60px 10px rgba(34, 195, 214, .75); }
@keyframes cf-emyv-golpe { 0% { transform: translate(-50%, -50%) scale(1); } 35% { transform: translate(-50%, -50%) scale(1.28); } 100% { transform: translate(-50%, -50%) scale(1.06); } }
.cf-emyv-caja { position: absolute; font-size: 38px; transform: translate(-50%, -50%) scale(.2); filter: drop-shadow(0 0 14px rgba(103, 232, 249, .9)); opacity: 0; }
.cf-emyv-txt { position: absolute; left: 50%; transform: translate(-50%, 16px); opacity: 0; text-align: center; transition: transform .5s cubic-bezier(.2, 1.4, .4, 1), opacity .4s ease; width: min(92vw, 520px); }
.cf-emyv.cf-listo .cf-emyv-txt { transform: translate(-50%, 0); opacity: 1; }
.cf-emyv-txt b { display: block; font: 900 clamp(26px, 6vw, 40px)/1.1 system-ui, sans-serif; color: #ecfeff; text-shadow: 0 0 22px rgba(34, 195, 214, .9), 0 0 4px rgba(34, 195, 214, .9); }
.cf-emyv-txt small { display: block; margin-top: 8px; font: 700 15px/1.3 system-ui, sans-serif; color: rgba(207, 250, 254, .85); }
@media (prefers-reduced-motion: reduce) { .cf-emyv-logo, .cf-emyv-txt { transition: none; } .cf-emyv-emy.cf-golpe { animation: none; } }

/* 📦 tablero, 🔴 latido y tarjeta que vuela [Pulso-Supabase] */
.cf-tabl { position: fixed; left: 50%; top: 36%; z-index: 251; pointer-events: none; transform: translate(-50%, -50%) scale(.85); opacity: 0; transition: transform .5s cubic-bezier(.2, 1.4, .4, 1), opacity .35s ease;
  padding: 20px 22px; border-radius: 24px; background: rgba(10, 14, 28, .88); border: 1px solid color-mix(in srgb, var(--tc) 50%, transparent); box-shadow: 0 0 60px -10px color-mix(in srgb, var(--tc) 70%, transparent), 0 30px 60px -20px rgba(0,0,0,.8);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); width: min(92vw, 560px); text-align: center; }
.cf-tabl.cf-on { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.cf-tabl.cf-sale { opacity: 0; transform: translate(-50%, -60%) scale(.95); }
.cf-tabl-tit { display: block; font: 800 18px/1.2 system-ui, sans-serif; color: #f5f3ff; margin-bottom: 14px; }
.cf-tabl-fila { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cf-tabl-it { padding: 12px 6px; border-radius: 16px; background: color-mix(in srgb, var(--ic) 14%, transparent); border: 1px solid color-mix(in srgb, var(--ic) 40%, transparent); display: grid; gap: 2px; }
.cf-tabl-ico { font-size: 22px; }
.cf-tabl-it b { font: 900 clamp(26px, 7vw, 38px)/1.1 system-ui, sans-serif; color: var(--ic); text-shadow: 0 0 18px color-mix(in srgb, var(--ic) 70%, transparent); font-variant-numeric: tabular-nums; }
.cf-tabl-it small { font: 700 12px/1.2 system-ui, sans-serif; color: rgba(226, 228, 245, .75); }
.cf-latido { position: fixed; inset: 0; z-index: 248; pointer-events: none; box-shadow: inset 0 0 0 0 transparent; animation: cf-latido .9s ease-in-out calc(var(--lv) * 1); }
@keyframes cf-latido { 0%, 100% { box-shadow: inset 0 0 0 0 transparent; } 40% { box-shadow: inset 0 0 70px 8px color-mix(in srgb, var(--lc) 75%, transparent), inset 0 0 0 3px color-mix(in srgb, var(--lc) 80%, transparent); } }
.cf-volando { position: fixed; z-index: 247; pointer-events: none; margin: 0 !important; transition: transform .65s cubic-bezier(.5, -0.2, .7, 1), opacity .65s ease; transform-origin: center; box-shadow: 0 20px 50px -10px rgba(168, 85, 247, .7); }
.cf-card.cf-flash-dev { animation: cf-flash-dev 1.6s ease-in-out 2; }
@keyframes cf-flash-dev { 0%, 100% { box-shadow: none; } 45% { box-shadow: 0 0 0 2px #ef4444, 0 0 34px -4px rgba(239, 68, 68, .85); } }
@media (prefers-reduced-motion: reduce) { .cf-latido, .cf-card.cf-flash-dev { animation: none; } }
