/* souk-equip.css · «¡Equipado!» (js/souk-equip.js): the moment a kid equips a look in the Draly Souk (his words
   2026-11-01: «a very cool feeling»). A layer centred on the character that never takes a tap, gone after 1.2 s:
   the character pops, light and a ring in the rarity's colour (--c1 · --c2 · --c3), sparkles fly out, the badge lands.
   Transform and opacity only (cheap phones); reduced motion = the glow and the badge, nothing moves. */
.deq { position: fixed; z-index: 9000; width: 0; height: 0; pointer-events: none; contain: layout style; }
.deq > i, .deq > b { position: absolute; left: 0; top: 0; pointer-events: none; }

/* the flash: a soft light behind and over the character */
.deq-flash {
  width: calc(var(--w) * 1.5); height: calc(var(--w) * 1.5); margin: calc(var(--w) * -0.75) 0 0 calc(var(--w) * -0.75); border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--c2) 85%, #fff) 0%, color-mix(in srgb, var(--c1) 55%, transparent) 38%, transparent 68%);
  mix-blend-mode: screen; opacity: 0;
  animation: deq-flash 760ms cubic-bezier(.2, .8, .2, 1) forwards;
}
@keyframes deq-flash { 0% { opacity: 0; transform: scale(.35); } 22% { opacity: .95; } 100% { opacity: 0; transform: scale(1.25); } }

/* the aura: the light behind the character, inside its pedestal's box (js/souk-equip.js puts it first in the .zc-pod) */
/* (a .zc-pod is the point where the feet stand, --h the character's height: the aura is centred on its body) */
.deq-aura { position: absolute; left: 0; top: calc(var(--h, 240px) * -.5); width: calc(var(--h, 240px) * 1.2); aspect-ratio: 1; transform: translate(-50%, -50%); pointer-events: none; z-index: 0; }
.deq-aura > i { position: absolute; inset: 0; border-radius: 50%; opacity: 0; }
.deq-glow { background: radial-gradient(circle, #fff7d6 0%, color-mix(in srgb, var(--c2) 85%, #fff) 14%, color-mix(in srgb, var(--c1) 75%, transparent) 34%, transparent 64%);
  animation: deq-glow 1100ms cubic-bezier(.2, .8, .2, 1) forwards; }
@keyframes deq-glow { 0% { opacity: 0; transform: scale(.4); } 20% { opacity: 1; transform: scale(1); } 70% { opacity: .85; } 100% { opacity: 0; transform: scale(1.08); } }
.deq-rays {
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--c1) 75%, transparent) 0deg 7deg, transparent 7deg 22deg);
  -webkit-mask: radial-gradient(circle, #000 0 16%, rgba(0, 0, 0, .6) 38%, transparent 66%); mask: radial-gradient(circle, #000 0 16%, rgba(0, 0, 0, .6) 38%, transparent 66%);
  animation: deq-rays 1100ms cubic-bezier(.16, .84, .3, 1) forwards;
}
@keyframes deq-rays { 0% { opacity: 0; transform: scale(.5) rotate(-12deg); } 25% { opacity: .9; } 75% { opacity: .6; } 100% { opacity: 0; transform: scale(1.1) rotate(18deg); } }

/* the rings: a shockwave in the rarity's colour */
.deq-ring {
  width: var(--w); height: var(--w); margin: calc(var(--w) * -0.5) 0 0 calc(var(--w) * -0.5); border-radius: 50%;
  box-shadow: 0 0 0 5px var(--c1), 0 0 24px 6px color-mix(in srgb, var(--c1) 65%, transparent), inset 0 0 20px color-mix(in srgb, var(--c2) 70%, transparent);
  opacity: 0; animation: deq-ring 640ms cubic-bezier(.12, .8, .3, 1) 40ms forwards;
}
.deq-ring.is-2 { box-shadow: 0 0 0 3px var(--c2), 0 0 16px 3px color-mix(in srgb, var(--c2) 60%, transparent); animation-delay: 170ms; animation-duration: 700ms; }
@keyframes deq-ring { 0% { opacity: 1; transform: scale(.25); } 100% { opacity: 0; transform: scale(1.7); } }

/* the sparkles: squares, dots and little stars flying out, a turn and a fall */
.deq-bit { width: 12px; height: 12px; margin: -6px 0 0 -6px; background: var(--bc); border-radius: 3px; opacity: 0;
  box-shadow: 0 0 10px color-mix(in srgb, var(--bc) 75%, transparent), inset 0 0 0 1px rgba(255, 255, 255, .45);
  animation: deq-bit var(--dur, 760ms) cubic-bezier(.15, .75, .3, 1) var(--dl, 0ms) forwards; }
.deq-bit.is-dot { border-radius: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; }
.deq-bit.is-star { width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 0; background: var(--bc);
  clip-path: polygon(50% 0, 61% 38%, 100% 50%, 61% 62%, 50% 100%, 39% 62%, 0 50%, 39% 38%); box-shadow: none; }
@keyframes deq-bit {
  0% { opacity: 0; transform: translate(0, 0) scale(.4) rotate(0); }
  12% { opacity: 1; }
  70% { opacity: 1; transform: translate(var(--dx), var(--dy)) scale(1) rotate(var(--rot)); }
  100% { opacity: 0; transform: translate(var(--dx), calc(var(--dy) + 26px)) scale(.6) rotate(var(--rot)); }
}

/* the badge: «¡Equipado!» lands over the character and stays until the moment ends */
.deq-badge {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  transform: translate(-50%, var(--by)); padding: 9px 16px 9px 12px; border-radius: 999px;
  font: 800 19px/1 'Baloo 2', 'Nunito', system-ui, sans-serif; letter-spacing: .01em; color: #3a2a05;
  background: linear-gradient(180deg, #fff3c4, #ffd36a 55%, #f0b532); box-shadow: 0 0 0 2.5px #fffbe9, 0 0 0 4.5px var(--c1), 0 10px 26px rgba(0, 0, 0, .35), 0 0 30px color-mix(in srgb, var(--c1) 70%, transparent);
  opacity: 0; animation: deq-badge 1180ms cubic-bezier(.2, .8, .2, 1) 90ms forwards;
}
.deq-badge svg { flex: none; color: #1f6b45; }
@keyframes deq-badge {
  0% { opacity: 0; transform: translate(-50%, calc(var(--by) + 18px)) scale(.55); }
  22% { opacity: 1; transform: translate(-50%, calc(var(--by) - 6px)) scale(1.1); }
  34% { transform: translate(-50%, var(--by)) scale(.97); }
  44% { transform: translate(-50%, var(--by)) scale(1); }
  82% { opacity: 1; transform: translate(-50%, var(--by)) scale(1); }
  100% { opacity: 0; transform: translate(-50%, calc(var(--by) - 10px)) scale(.96); }
}

/* the character itself: a squash, a jump, a settle (the outer figure: its own idle keeps breathing inside) */
.deq-pop, #screen-list.md .zc-pod .zc-fig.deq-pop.deq-pop, .dsc .zc-pod .zc-fig.deq-pop.deq-pop { animation: deq-pop 640ms cubic-bezier(.3, .7, .3, 1) both; transform-origin: 50% 100%; }
@keyframes deq-pop {
  0% { transform: none; }
  16% { transform: translateY(3px) scale(1.06, .9); }
  42% { transform: translateY(-16px) scale(.95, 1.08); }
  66% { transform: translateY(0) scale(1.04, .97); }
  82% { transform: translateY(-3px) scale(.99, 1.01); }
  100% { transform: none; }
}

/* the look in use, on its own page: a gold «¡Equipado!» chip at the start of «Lo estás usando…» (js/mi-dralingo.js) */
#screen-list.md .zc-using .zc-eq {
  flex: none; display: inline-flex; align-items: center; padding: 4px 10px; margin-right: 2px; border-radius: 999px;
  font: 900 13px/1 'Baloo 2', 'Nunito', system-ui, sans-serif; letter-spacing: .02em; color: #3a2a05;
  background: linear-gradient(180deg, #fff3c4, #ffd36a 60%, #f0b532); box-shadow: 0 0 0 1.5px #fffbe9, 0 0 14px rgba(255, 206, 110, .55);
}

/* a legendary: gold all the way, a stronger shine */
.deq-r-legendario .deq-flash { animation-duration: 880ms; }
.deq-aura.deq-r-legendario .deq-rays { animation-duration: 1150ms; }

/* reduced motion: a calm glow and the badge, nothing moves */
.deq.is-calm .deq-flash, .deq-aura.is-calm .deq-glow { animation: deq-calm 1100ms ease forwards; transform: none; }
.deq.is-calm .deq-badge { animation: deq-calm-badge 1150ms ease forwards; transform: translate(-50%, var(--by)); }
@keyframes deq-calm { 0% { opacity: 0; } 30% { opacity: .7; } 100% { opacity: 0; } }
@keyframes deq-calm-badge { 0% { opacity: 0; } 18% { opacity: 1; } 82% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .deq-pop, #screen-list.md .zc-pod .zc-fig.deq-pop.deq-pop { animation: none; }
  .deq-rays, .deq-ring, .deq-bit { display: none; }
}
