/* ---- emotes y remates (cosmetics.js): vistas previas en tienda, cajas y pase, y botón táctil del emote */

/* emote: el bocadillo pixel-art (imagen a escala 1, ampliada con píxeles nítidos) */
.cos-emo { display: flex; align-items: center; justify-content: center; width: 100%; height: calc(var(--ico, 48px) * 1.25); }
.cos-emo img { display: block; max-width: 100%; height: calc(var(--ico, 48px) * .82); width: auto; object-fit: contain; image-rendering: pixelated;
  filter: drop-shadow(0 0 0 transparent); animation: cos-bob 1.6s ease-in-out infinite; }
@keyframes cos-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }

/* remate: cartel con rayos del color del personaje, el luchador en su idle y el nombre */
.cos-fin { --cc: #ffd84a; position: relative; display: block; width: min(100%, calc(var(--ico, 48px) * 2.3)); height: calc(var(--ico, 48px) * 1.65); overflow: hidden;
  background: radial-gradient(circle at 50% 62%, color-mix(in srgb, var(--cc) 45%, #0b0714) 0, #0b0714 70%);
  box-shadow: 0 0 0 2px #000, inset 0 0 0 2px var(--cc); image-rendering: pixelated; }
.cos-fin-rays { position: absolute; inset: -60%; opacity: .32;
  background: repeating-conic-gradient(from 0deg at 50% 50%, var(--cc) 0 9deg, transparent 9deg 24deg); animation: cos-spin 9s linear infinite; }
@keyframes cos-spin { to { transform: rotate(360deg); } }
.cos-fin .cos-fin-pv { position: absolute; left: 50%; bottom: 3px; transform: translateX(-50%); height: 72%; width: auto; max-width: none; filter: drop-shadow(0 0 3px var(--cc)) drop-shadow(2px 2px 0 #000); }
.cos-fin em { position: absolute; left: 4px; right: 4px; top: 4px; font-style: normal; font-size: 7px; line-height: 1.25; color: #fff; text-align: center;
  text-shadow: 1px 0 #000, -1px 0 #000, 0 1px #000, 0 -1px #000, 0 0 6px var(--cc); letter-spacing: 0; }
.cos-fin-ko { position: absolute; right: 3px; bottom: 3px; font-style: normal; font-size: 7px; padding: 2px 3px; background: #e8412c; color: #ffd23a; box-shadow: 0 0 0 1px #000; }

.sh-item[data-t="emote"], .sh-item[data-t="finisher"] { --ico: clamp(42px, 3.6vw, 62px); }
.sh-item[data-t="emote"]:not(.own) .cos-emo img, .sh-item[data-t="finisher"]:not(.own) .cos-fin { filter: brightness(.82) saturate(.8); }
.sh-cos-grid { grid-template-columns: repeat(auto-fill, minmax(clamp(150px, 13vw, 200px), 1fr)); }
.cf-cos { display: flex; align-items: center; justify-content: center; min-width: 140px; }
.lb-ico .cos-fin { width: 92%; height: 80%; }
.lb-ico .cos-emo img { height: calc(var(--ico, 48px) * .62); }
.ps-goal-ico .cos-fin, .ps-d-ico .cos-fin, .mt-toast-ico .cos-fin { width: 100%; height: 100%; }
.ps-goal-ico .cos-fin em, .ps-d-ico .cos-fin em, .mt-toast-ico .cos-fin em, .ps-card .cos-fin em { display: none; }
.ps-goal-ico .cos-emo, .ps-d-ico .cos-emo, .mt-toast-ico .cos-emo { height: 100%; }
.ps-goal-ico .cos-emo img, .ps-d-ico .cos-emo img, .mt-toast-ico .cos-emo img { height: auto; max-height: 100%; animation: none; }
.ps-card .cos-emo img { height: calc(var(--ico, 48px) * .6); }

/* botón táctil del emote: abajo en el centro, entre el joystick y los botones (antes flotaba a media altura sobre el
   escenario, a la izquierda, y tapaba a J1). 44 px de alto para el dedo contando el piquito del bocadillo. */
#touch-emote { display: none; position: fixed; z-index: 31; bottom: calc(env(safe-area-inset-bottom, 0px) + 12px); left: 50%; margin-left: -20px; width: 40px; height: 34px;
  padding: 0; border: 0; background: #fff; box-shadow: 0 0 0 2px #20141e, 3px 3px 0 2px rgba(0,0,0,.4); opacity: .78; touch-action: none; }
#touch-emote.on { display: block; }
#touch-emote:active { transform: translate(1px, 1px); opacity: 1; }
#touch-emote i { position: absolute; inset: 9px 8px 13px; background:
  radial-gradient(circle, #20141e 2px, transparent 2.5px) 0 50% / 8px 8px repeat-x; }
#touch-emote::after { content: ''; position: absolute; left: 8px; bottom: -6px; border: 4px solid transparent; border-top: 5px solid #20141e; }
