/* =====================================================================
   interfaz v3 · gachas (Zona Safari, Calabaza Embrujada, Santuario Legendario), abrir Poké Balls,
   pantalla final, novedades, chats, perfil de otro jugador, encuestas y lo que sale en la partida
   ===================================================================== */

/* ------------------------------------------------------------------ gachas */
/* la ventana de gachas: un cartel grande por gacha, cada uno con su ambiente */
.ga-panel { width: min(54rem, 100%); }
.ga-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 0.9rem; }
.ga-list .chest-widget {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  flex-direction: column;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  min-height: 15.5rem;
  margin: 0;
  padding: 1.3rem 1rem 1.1rem;
  text-align: center;
  border-radius: var(--r-l);
  border-width: 1px;
  transition: transform 0.15s, filter 0.15s, box-shadow 0.2s;
}
.ga-list .chest-widget:hover { transform: translateY(-0.25rem); filter: brightness(1.1); }
.ga-list .chest-widget:active { transform: scale(0.98); }
.ga-list .chest-widget .cw-ball { width: 7.4rem; height: 7.4rem; border-radius: 50%; background: none; isolation: isolate; }
.ga-list .chest-widget .cw-ball img { width: 6.2rem; height: 6.2rem; object-fit: contain; filter: drop-shadow(0 0.4rem 0.6rem rgba(0, 0, 0, 0.5)); }
.ga-list .chest-widget .cw-badge { top: 0.2rem; right: 0.2rem; }
.ga-list .cw-info { align-items: center; gap: 0.25rem; }
.ga-list .chest-widget b { font-size: 2.1rem; white-space: normal; text-shadow: 0 0.15rem 0 rgba(0, 0, 0, 0.5); }
.ga-list .ga-desc { display: block; max-width: 22rem; margin: 0; font-size: 0.82rem; line-height: 1.35; color: rgba(255, 255, 255, 0.82); white-space: normal; }
.ga-list #hw-txt, .ga-list #lg-txt { margin-top: 0.35rem; padding: 0.2rem 0.8rem; font-size: 0.85rem; font-weight: 900; color: #ffe066; border-radius: 999px; background: rgba(0, 0, 0, 0.38); white-space: normal; }
.ga-ribbon { position: absolute; top: 0.7rem; right: 0.7rem; z-index: 2; padding: 0.1rem 0.6rem; font-family: var(--f-disp); font-size: 1rem; color: #fff; border-radius: 999px; background: #e8331c; box-shadow: var(--sh-1); animation: itPulse 1.4s ease-in-out infinite; }
/* Calabaza Embrujada: noche morada con luna y resplandor naranja */
#hw-widget {
  border-color: rgba(255, 138, 26, 0.75);
  background: radial-gradient(circle at 84% 16%, #fff1c4 0 1.1rem, rgba(255, 240, 200, 0.22) 1.2rem, transparent 3.4rem),
    radial-gradient(ellipse at 50% 108%, rgba(255, 128, 26, 0.55), transparent 58%),
    linear-gradient(180deg, #2e1146 0%, #1c0c30 60%, #12081f 100%);
  box-shadow: 0 0 1.2rem rgba(255, 138, 26, 0.3), var(--sh-1);
}
#hw-widget .cw-ball img { animation: hwbBob 2.2s ease-in-out infinite; }
#hw-widget b { color: #ffa83a; text-shadow: 0 0 0.7rem rgba(255, 122, 0, 0.7), 0 0.15rem 0 #3a0a00; }
#hw-widget::after { /* murciélagos de adorno */
  content: '🦇';
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: -1;
  font-size: 1.3rem;
  opacity: 0.55;
  animation: hwbBob 3s ease-in-out infinite;
}
.chest-widget.hw-widget.ready { box-shadow: 0 0 1.6rem rgba(255, 138, 26, 0.55), var(--sh-1); }
/* Santuario Legendario: dorado con rayos que giran detrás de la Master Ball */
#lg-widget {
  border-color: rgba(255, 210, 58, 0.7);
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 210, 58, 0.4), transparent 60%), linear-gradient(180deg, #2f1f62 0%, #1a1240 60%, #110c2a 100%);
}
#lg-widget b { color: var(--yel); text-shadow: 0 0 0.7rem rgba(255, 203, 5, 0.55), 0 0.15rem 0 #2a1a00; }
#lg-widget .cw-ball::before {
  content: '';
  position: absolute;
  inset: -45%;
  z-index: -1;
  background: repeating-conic-gradient(rgba(255, 215, 90, 0.38) 0 9deg, transparent 9deg 24deg);
  -webkit-mask: radial-gradient(circle, #000 22%, transparent 68%);
  mask: radial-gradient(circle, #000 22%, transparent 68%);
  animation: sfRays 12s linear infinite;
}
.chest-widget.lg-widget.ready { box-shadow: 0 0 1.6rem rgba(255, 210, 58, 0.5), var(--sh-1); }
@media (max-height: 520px) {
  .ga-list .chest-widget { min-height: 0; padding: 0.8rem 0.8rem 0.7rem; gap: 0.3rem; }
  .ga-list .chest-widget .cw-ball { width: 5rem; height: 5rem; }
  .ga-list .chest-widget .cw-ball img { width: 4.2rem; height: 4.2rem; }
  .ga-list .chest-widget b { font-size: 1.7rem; }
  .ga-list .ga-desc { font-size: 0.75rem; }
}
.sf-help { margin: 0 0 0.7rem; font-size: 0.9rem; color: var(--tx-2); }
.sf-tip { margin: 0 0 0.5rem; text-align: center; font-family: var(--f-disp); font-size: 1.25rem; color: #ffe066; animation: itPulse 1.6s ease-in-out infinite; }

/* Zona Safari */
#sf-regions { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 0.5rem; }
.sf-reg { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; padding: 0.6rem; cursor: pointer; color: #fff; border-radius: var(--r-m); border: 1px solid rgba(52, 207, 108, 0.45); background: linear-gradient(180deg, rgba(52, 207, 108, 0.16), rgba(11, 17, 38, 0.6)); transition: transform 0.12s, filter 0.15s; }
.sf-reg:hover:not(:disabled) { filter: brightness(1.15); transform: translateY(-0.12rem); }
.sf-reg img { width: 3.3rem; height: 3.3rem; image-rendering: pixelated; }
.sf-reg b { font-family: var(--f-disp); font-weight: 400; font-size: 1.35rem; }
.sf-reg small { font-size: 0.75rem; color: var(--tx-2); }
.sf-reg .bar { width: 100%; }
.sf-reg:disabled { opacity: 0.5; cursor: default; }
.sf-reg.done { border-color: rgba(255, 203, 5, 0.7); }
#sf-result h3 { margin: 0 0 0.5rem; font-size: 1.6rem; text-align: center; }
.sf-stage { display: flex; align-items: center; gap: 0.9rem; justify-content: center; }
#sf-mc, #hw-mc { width: 13.5rem; height: auto; flex: none; image-rendering: pixelated; }
#lg-mc { width: 14rem; height: auto; flex: none; image-rendering: pixelated; }
.sf-stage #sf-items { flex: 1; max-width: 35rem; }
#sf-items, #hw-items { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; margin-bottom: 0.6rem; }
.sf-it { position: relative; height: 7rem; padding: 0.25rem; font: inherit; color: #fff; cursor: pointer; border-radius: var(--r-m); background: var(--ink-1); border: 1px solid var(--line-2); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04); }
/* el color de la rareza no se ve hasta abrir la bola (antes la casilla ya salía dorada, lila o gris) */
.sf-it.open { border-color: var(--rar, var(--line-2)); }
.sf-it .sf-cov, .sf-it .sf-face { position: absolute; inset: 0.25rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.12rem; }
.sf-it .sf-cov img { width: 3.3rem; height: 3.3rem; image-rendering: pixelated; animation: wobble 1.6s ease-in-out infinite; }
.sf-it .sf-face { display: none; }
.sf-it.open .sf-cov { display: none; }
.sf-it.open .sf-face { display: flex; animation: sfPop 0.35s ease-out; }
.sf-it.open.pokemon { box-shadow: inset 0 0 0 0.14rem var(--rar), 0 0 0.9rem var(--rar); }
.sf-it .sf-face img { width: 3.4rem; height: 3.4rem; image-rendering: pixelated; }
.sf-it .sf-face img.cur { width: 2.1rem; height: 2.1rem; }
.sf-it .sf-face b { font-family: var(--f-disp); font-weight: 400; font-size: 1.05rem; line-height: 1.05; text-align: center; }
.sf-it .sf-face small { font-size: 0.68rem; }
.sf-it.empty { opacity: 0.35; cursor: default; }
.sf-it.empty .sf-cov img { visibility: hidden; }
@keyframes sfPop { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.sf-fly { position: fixed; z-index: 9999; width: 2.75rem; height: 2.75rem; margin: -1.375rem 0 0 -1.375rem; image-rendering: pixelated; pointer-events: none; will-change: transform; }
.gc-conf { position: fixed; z-index: 9999; width: 0.55rem; height: 0.8rem; margin: -0.4rem 0 0 -0.275rem; border-radius: 0.12rem; pointer-events: none; will-change: transform; }
/* cada premio: rebota al caer en su hueco, gira como una carta al abrirlo y suelta un destello de su color */
.sf-it { isolation: isolate; transition: transform 0.12s; }
.sf-it:not(.empty):not(.open):hover { transform: translateY(-0.15rem); }
.sf-it.land { animation: sfLand 0.45s cubic-bezier(0.2, 1.6, 0.4, 1); }
.sf-it.land::after { content: ''; position: absolute; inset: -0.15rem; z-index: -1; border-radius: inherit; box-shadow: 0 0 0 0.18rem rgba(255, 255, 255, 0.7), 0 0 1.2rem rgba(255, 255, 255, 0.45); pointer-events: none; animation: sfRing 0.65s ease-out both; }
@keyframes sfLand { 0% { transform: scale(0.8); } 55% { transform: scale(1.1); } 100% { transform: none; } }
@keyframes sfRing { from { opacity: 1; transform: scale(0.92); } to { opacity: 0; transform: scale(1.2); } }
.sf-it.open .sf-face { animation: sfFlip 0.5s cubic-bezier(0.2, 1.3, 0.4, 1) both; }
@keyframes sfFlip { 0% { transform: perspective(28rem) rotateY(100deg) scale(0.85); opacity: 0.2; } 100% { transform: none; opacity: 1; } }
.sf-it.open::before { content: ''; position: absolute; inset: -35%; z-index: -1; border-radius: 50%; background: radial-gradient(circle, var(--rar) 0, transparent 62%); pointer-events: none; animation: sfBurst 0.8s ease-out both; }
@keyframes sfBurst { from { opacity: 0.9; transform: scale(0.3); } to { opacity: 0; transform: scale(1.3); } }
/* premio bueno (épico, legendario, skin, sombrero): rayos que giran detrás y brillo */
.sf-it.open.big { border-color: var(--rar); box-shadow: inset 0 0 0 0.14rem var(--rar), 0 0 1.4rem var(--rar); }
.sf-it.open.big::before {
  inset: -55%;
  background: repeating-conic-gradient(var(--rar) 0 8deg, transparent 8deg 26deg);
  -webkit-mask: radial-gradient(circle, #000 20%, transparent 66%);
  mask: radial-gradient(circle, #000 20%, transparent 66%);
  opacity: 0.55;
  animation: sfRays 7s linear infinite, sfRaysIn 0.5s ease-out both;
}
@keyframes sfRays { to { transform: rotate(360deg); } }
@keyframes sfRaysIn { from { opacity: 0; } to { opacity: 0.55; } }

/* Calabaza Embrujada (Halloween): ventana de noche morada con luna, el escaparate de premios y botones naranjas */
.hw-panel {
  border-color: rgba(255, 138, 26, 0.55);
  background: radial-gradient(ellipse at 88% 2%, rgba(255, 240, 200, 0.12), transparent 34%),
    radial-gradient(ellipse at 30% 108%, rgba(255, 120, 30, 0.2), transparent 55%),
    radial-gradient(1px 1px at 12% 22%, rgba(255, 255, 255, 0.7), transparent), radial-gradient(1px 1px at 64% 12%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1px 1px at 38% 44%, rgba(255, 255, 255, 0.5), transparent), radial-gradient(1px 1px at 86% 58%, rgba(255, 255, 255, 0.5), transparent),
    linear-gradient(180deg, #26123c 0%, #180c2c 55%, #0f0820 100%);
  box-shadow: 0 0 2.2rem rgba(255, 122, 0, 0.18), var(--sh-2);
}
.hw-panel .pn-head { --sec: var(--org); background: linear-gradient(180deg, #341a4c, #24123a); border-bottom-color: rgba(255, 138, 26, 0.3); }
.hw-panel .pn-head h2 { color: #ffa040; text-shadow: 0 0 0.8rem rgba(255, 122, 0, 0.6), 0 0.12rem 0 #3a0a00; }
.hw-panel .pn-head h2 small { color: #e2c4ff; }
.hw-timer { display: block; width: fit-content; max-width: 100%; margin: 0 auto 0.6rem; padding: 0.15rem 0.9rem; text-align: center; font-family: var(--f-disp); font-size: 1.3rem; color: #ffb040; border-radius: 999px; background: rgba(255, 138, 26, 0.14); border: 1px solid rgba(255, 138, 26, 0.5); animation: itPulse 1.6s ease-in-out infinite; }
.hw-panel .sf-help { color: #d9c2f2; text-align: center; }
.hw-panel .sf-stage { gap: 1.2rem; }
#hw-mc { width: 15rem; filter: drop-shadow(0 0 1.4rem rgba(255, 138, 26, 0.25)); }
.hw-side { flex: 1; max-width: 36rem; }
#hw-prizes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; }
.hw-prize {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.65rem 0.3rem 0.55rem;
  text-align: center;
  border-radius: var(--r-m);
  background: linear-gradient(180deg, rgba(70, 30, 104, 0.92), rgba(32, 14, 52, 0.92));
  border: 1px solid rgba(180, 106, 255, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 0.12s;
}
.hw-prize:hover { transform: translateY(-0.15rem); }
.hw-prize img { height: 2.7rem; image-rendering: pixelated; filter: drop-shadow(0 0.15rem 0.3rem rgba(0, 0, 0, 0.5)); }
.hw-prize small { font-size: 0.75rem; font-weight: 800; line-height: 1.2; color: #f1e6ff; }
.hw-prize.legend { background: linear-gradient(180deg, rgba(120, 62, 10, 0.95), rgba(52, 24, 6, 0.95)); border-color: #ffd23a; box-shadow: 0 0 0.9rem rgba(255, 170, 30, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.15); }
.hw-prize.legend img { height: 3rem; }
.hw-prize.legend::after { /* brillo que pasa por encima de las skins */
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.32), transparent);
  pointer-events: none;
  animation: hwShine 3.2s ease-in-out infinite;
}
@keyframes hwShine { 0%, 55% { left: -60%; } 100% { left: 130%; } }
.hw-prize.got { opacity: 0.62; }
.hw-prize.got::before { content: '✓'; position: absolute; top: 0.25rem; right: 0.3rem; z-index: 1; width: 1.25rem; height: 1.25rem; display: grid; place-items: center; font-size: 0.75rem; font-weight: 900; color: #fff; border-radius: 50%; background: var(--grn-2); }
.hw-prize.got small::after { content: none; }
.hw-pity { margin: 0.6rem 0 0; text-align: center; font-size: 0.9rem; color: #d8a8ff; }
.hw-skin-pity { color: var(--yel); }
#hw-items.one { grid-template-columns: minmax(0, 9rem); justify-content: center; }
#hw-items .sf-it { background: linear-gradient(180deg, #2a1440, #170b26); }
#hw-items .sf-face img.hat { width: auto; height: 2.1rem; }
#hw-items .sf-it.legend.open, #lg-items .sf-it.legend.open { animation: hw-legend 0.9s ease-in-out infinite alternate; }
@keyframes hw-legend { from { box-shadow: 0 0 0.4rem #ffd23a; } to { box-shadow: 0 0 1.4rem #ff8a1a, 0 0 0.4rem #ffd23a; } }
#hw-buy { flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
#hw-buy .act.gold { min-height: 2.6rem; padding: 0.3rem 1.1rem; background: linear-gradient(180deg, #ffab45, #f06810); color: #2a0e00; text-shadow: 0 1px 0 rgba(255, 220, 160, 0.5); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 -0.2rem 0 rgba(0, 0, 0, 0.2), 0 0.2rem 0 #7a2e00, 0 0 0.9rem rgba(255, 128, 26, 0.35); }
#hw-buy #hw-free { background: linear-gradient(180deg, #6ae88e, #22a052); color: #fff; text-shadow: 0 0.1rem 0 rgba(0, 0, 0, 0.35); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 0.2rem 0 #0f5a2a, 0 0 1rem rgba(80, 230, 130, 0.5); animation: itPulse 1.2s ease-in-out infinite; }
#hw-buy .money img { width: 1rem; height: 1rem; }
.hw-panel #hw-reveal, .hw-panel #hw-done { min-height: 2.6rem; }

/* Santuario Legendario */
.lg-panel { border-color: rgba(255, 210, 58, 0.5); background: radial-gradient(ellipse at 30% 0%, rgba(255, 210, 58, 0.14), transparent 45%), linear-gradient(180deg, #241b52 0%, #171138 55%, #0f0b26 100%); }
.lg-panel .pn-head { --sec: var(--yel); background: linear-gradient(180deg, #2e2364, #1e1748); }
.lg-panel .pn-head h2 { color: var(--yel); text-shadow: 0 0 0.8rem rgba(255, 203, 5, 0.5), 0 0.12rem 0 #2a1a00; }
#lg-mc { filter: drop-shadow(0 0 1.2rem rgba(255, 210, 58, 0.25)); }
#lg-buy .act.gold { min-height: 2.8rem; padding: 0.3rem 1.4rem; font-size: 1.4rem; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 -0.2rem 0 rgba(0, 0, 0, 0.2), 0 0.2rem 0 #7a5200, 0 0 1rem rgba(255, 210, 58, 0.4); }
.lg-side { flex: 1; max-width: 29rem; }
#lg-odds { display: flex; flex-direction: column; gap: 0.4rem; }
.lg-odd { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; align-items: center; padding: 0.45rem 0.7rem; text-align: left; border-radius: var(--r-m); background: var(--ink-1); border: 1px solid var(--line); box-shadow: inset 0.25rem 0 0 var(--c); }
.lg-odd b { font-family: var(--f-disp); font-weight: 400; font-size: 1.2rem; color: var(--c); }
.lg-odd small { grid-row: 2; font-size: 0.75rem; color: var(--tx-2); }
.lg-odd span { grid-row: 1 / 3; grid-column: 2; font-family: var(--f-disp); font-size: 1.5rem; color: #fff; }
#lg-items { display: grid; grid-template-columns: minmax(0, 10.5rem); justify-content: center; }
#lg-items .sf-it { height: 9.4rem; }
#lg-items .sf-it .sf-face img { width: 5rem; height: 5rem; }
#lg-items .sf-it .sf-face img.cur { width: 2.75rem; height: 2.75rem; }
#lg-items .sf-it .sf-face b { font-size: 1.35rem; }
#lg-items .sf-face img.dupe { filter: grayscale(0.85); opacity: 0.75; }
#lg-items .sf-face small .money img { width: 0.75rem; height: 0.75rem; vertical-align: -0.12rem; }
#lg-1.off { filter: grayscale(0.7); opacity: 0.8; }

/* ------------------------------------------------------------------ abrir una Poké Ball */
#chestopen { padding: 0; cursor: pointer; background: radial-gradient(circle at 50% 42%, #2a3c84, #070b1d 75%); }
#chest-fx { position: absolute; inset: 0; image-rendering: pixelated; }
.chest-ui { position: relative; z-index: 1; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: max(1rem, var(--sat)) calc(1rem + var(--sar)) max(1.2rem, var(--sab)) calc(1rem + var(--sal)); pointer-events: none; }
.chest-ui > * { pointer-events: auto; }
.chest-ui h2 { font-size: 2.3rem; text-shadow: 0 0.15rem 0 rgba(0, 0, 0, 0.5); }
#chest-reward { flex: 1; display: flex; align-items: center; justify-content: center; }
#chest-summary { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; }
#chest-summary:empty { display: none; }
#chest-buttons { margin-top: 0.6rem; }
#chest-hint { margin: 0.5rem 0 0; font-size: 0.95rem; color: var(--tx-2); animation: blink 1.2s infinite; }
.reward { display: flex; flex-direction: column; align-items: center; gap: 0.1rem; padding: 0.6rem 1rem; border-radius: var(--r-l); background: rgba(10, 15, 40, 0.85); border: 1px solid var(--line-2); box-shadow: var(--sh-1); animation: pop 0.45s ease; }
.reward img { width: 3rem; height: 3rem; image-rendering: pixelated; }
.reward b { font-family: var(--f-disp); font-weight: 400; font-size: 1.6rem; color: var(--yel); }
.reward span { font-size: 0.8rem; color: var(--tx-2); }
.reward.new { border-color: var(--yel); box-shadow: 0 0 1.2rem rgba(255, 210, 60, 0.55); }
.reward.new img { width: 4rem; height: 4rem; }
.reward.shiny { border-color: #fff3a0; box-shadow: 0 0 1.6rem rgba(255, 230, 90, 0.9), 0 0 3rem rgba(255, 120, 220, 0.45); }
.reward.shiny img { filter: drop-shadow(0 0 0.4rem #ffe066) saturate(1.4); }
.reward.large { padding: 1rem 1.9rem; animation: rise 0.5s cubic-bezier(0.2, 1.6, 0.4, 1); }
.reward.large img { width: 5.2rem; height: 5.2rem; }
.reward.large b { font-size: 2.4rem; }
.reward.large span { font-size: 1rem; }
.reward.large.new img { width: 7.5rem; height: 7.5rem; }
@keyframes rise { 0% { transform: translateY(2.5rem) scale(0.3); opacity: 0; } 100% { transform: none; opacity: 1; } }
.sum { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; animation: pop 0.4s ease; }
.sum h3 { font-size: 1.7rem; color: var(--yel); }
.sum-items { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; }
.tokens { display: flex; align-items: center; gap: 0.5rem; min-width: 16rem; padding: 0.4rem 0.75rem; border-radius: var(--r-m); background: rgba(10, 15, 40, 0.7); border: 1px solid var(--line); }
.tokens img { width: 1.9rem; height: 1.9rem; image-rendering: pixelated; }
.tok-info { flex: 1; display: flex; flex-direction: column; gap: 0.2rem; }
.tok-info small { font-size: 0.72rem; color: var(--tx-2); }

/* ------------------------------------------------------------------ pantalla final */
.end-panel { width: min(58rem, 100%); max-height: 100%; padding-top: 0.9rem; }
.end-head { display: flex; align-items: baseline; justify-content: center; gap: 0.75rem; flex-wrap: wrap; }
.end-head h1 { margin: 0; font-size: 3.2rem; }
.end-head small { font-size: 0.95rem; color: var(--tx-2); }
#end:not(.hidden) #result { animation: endPop 0.45s cubic-bezier(0.2, 1.6, 0.4, 1) both; }
#end-teams { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0.7rem; margin: 0.6rem 0; text-align: left; }
.end-team h3 { margin: 0 0 0.3rem; font-size: 1.35rem; }
.end-team.blue h3 { color: #7ab8ff; }
.end-team.red h3 { color: #ff8a8a; }
.end-team h3 em { font-style: normal; color: #ffe066; }
.end-team.ffa { grid-column: 1 / -1; }
.end-team.ffa .et-rows { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0.3rem 0.6rem; }
.et-rows { display: flex; flex-direction: column; gap: 0.3rem; }
.end-row { display: grid; grid-template-columns: auto minmax(0, 1fr) repeat(4, 3.2rem); align-items: center; gap: 0.4rem; padding: 0.25rem 0.45rem 0.25rem 0.25rem; border-radius: var(--r-m); border: 1px solid transparent; }
.end-row.no-stat { grid-template-columns: auto minmax(0, 1fr) repeat(3, 3.2rem); }
.end-team.ffa .end-row { grid-template-columns: 1.6rem auto minmax(0, 1fr) repeat(4, 2.6rem); background: rgba(255, 255, 255, 0.06); }
.end-team.blue .end-row { background: linear-gradient(90deg, rgba(63, 123, 255, 0.35), rgba(40, 80, 180, 0.12)); }
.end-team.red .end-row { background: linear-gradient(90deg, rgba(239, 65, 54, 0.35), rgba(150, 40, 40, 0.12)); }
.end-row.me { border-color: #7dff8f; }
.end-row.human { cursor: pointer; }
.end-row.human:hover { filter: brightness(1.15); }
#end:not(.hidden) .end-row { animation: rowIn 0.3s ease-out both; }
#end:not(.hidden) .end-row:nth-child(2) { animation-delay: 0.06s; }
#end:not(.hidden) .end-row:nth-child(3) { animation-delay: 0.12s; }
#end:not(.hidden) .end-row:nth-child(n + 4) { animation-delay: 0.18s; }
.er-rank { font-family: var(--f-disp); font-size: 1.3rem; color: var(--yel); text-align: center; }
.er-pt { position: relative; width: 2.5rem; height: 2.5rem; border-radius: var(--r-s); background: rgba(255, 255, 255, 0.12); }
.er-pt img { display: block; width: 2.5rem; height: 2.5rem; image-rendering: pixelated; }
.er-mvp { position: absolute; left: -0.25rem; bottom: -0.35rem; padding: 0.02rem 0.25rem; font-style: normal; font-family: var(--f-disp); font-size: 0.85rem; line-height: 1; color: var(--yel-ink); border-radius: 0.3rem; background: var(--yel); }
#end:not(.hidden) .er-mvp { animation: mvpGlow 1.2s ease-in-out 0.4s infinite alternate; }
@keyframes mvpGlow { to { filter: drop-shadow(0 0 0.25rem #ffe066) brightness(1.2); } }
.er-name { display: flex; flex-direction: column; min-width: 0; line-height: 1.1; }
.er-name b { font-family: var(--f-disp); font-weight: 400; font-size: 1.2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.end-row.me .er-name b { color: #7dff8f; }
.er-name b.creator { color: var(--yel) !important; }
.er-name small { font-size: 0.72rem; color: #d8e2ff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.er-st { display: flex; flex-direction: column; align-items: center; line-height: 1; }
.er-st b { font-family: var(--f-disp); font-weight: 400; font-size: 1.2rem; }
.er-st small { max-width: 100%; margin-top: 0.1rem; font-size: 0.58rem; font-weight: 800; line-height: 1.05; text-align: center; color: var(--tx-2); overflow-wrap: anywhere; }
/* los nombres de las columnas solo en la primera fila de cada equipo (en todas se pisaban) */
.et-rows .end-row:not(:first-child) .er-st small { display: none; }
.er-rep { display: inline-grid; place-items: center; margin-left: 0.35rem; width: 1.35rem; height: 1.35rem; font-style: normal; font-size: 0.8rem; vertical-align: middle; border-radius: 0.35rem; background: rgba(0, 0, 0, 0.35); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3); }
.end-row.human:hover .er-rep { background: #e8453c; }
#end-rewards { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.3rem 0.6rem; margin: 0.3rem 0; }
#end:not(.hidden) #end-rewards > * { animation: rowIn 0.35s ease-out 0.25s both; }
#end-rewards .tokens { min-width: min(20rem, 100%); }
.got { margin: 0; flex-basis: 100%; text-align: center; font-size: 0.85rem; color: #ffe066; }
.copas-change { display: flex; align-items: center; gap: 0.5rem; padding: 0.3rem 0.9rem; border-radius: var(--r-m); background: rgba(10, 15, 40, 0.7); border: 1px solid var(--line); }
.copas-change img { width: 1.75rem; height: 1.75rem; image-rendering: pixelated; }
.copas-change b { font-family: var(--f-disp); font-weight: 400; font-size: 1.8rem; }
.copas-change.up b { color: #7dff8f; }
.copas-change.down b { color: #ff7a7a; }
.copas-change small { font-size: 0.8rem; color: var(--tx-2); }
.mastery-up { border-color: var(--mc) !important; box-shadow: 0 0 0.9rem var(--mc); }
.mastery-up .mast-up-ic { width: 2.5rem; height: 3rem; image-rendering: pixelated; margin: -0.6rem 0.25rem -0.6rem -0.25rem; }
.end-panel .row { position: sticky; bottom: -1.15rem; z-index: 2; margin: 0.5rem -1.15rem -1.15rem; padding: 0.6rem 1rem 0.8rem; background: linear-gradient(180deg, rgba(13, 20, 48, 0), rgba(13, 20, 48, 0.97) 30%); }
.end-vote { margin: 0.2rem 0 0.4rem; min-height: 1.1rem; text-align: center; font-size: 0.88rem; color: #c9d4f2; }
.end-vote b { color: #ffe066; }
.end-vote span { display: inline-block; margin: 0 0.25rem; padding: 0.05rem 0.5rem; border-radius: 999px; background: rgba(255, 255, 255, 0.08); }
.end-vote span.ok { background: rgba(80, 200, 120, 0.25); color: #b8ffcf; }
#again.voted { filter: saturate(0.6) brightness(0.85); }
#again:disabled { opacity: 0.6; }
#scores { width: 100%; border-collapse: collapse; margin-top: 0.7rem; font-size: 0.9rem; }

/* ------------------------------------------------------------------ novedades y otros avisos */
.patch-vers { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: -0.1rem 0 0.7rem; flex: none; max-height: 4.6rem; overflow-y: auto; }
.patch-vers button { padding: 0.12rem 0.6rem; font-family: var(--f-disp); font-size: 1.05rem; color: var(--tx-2); border: 1px solid var(--line-2); border-radius: 999px; background: var(--ink-1); }
.patch-vers button.on { color: var(--yel-ink); border-color: transparent; background: var(--yel); }
#patch-list { list-style: none; margin: 0 0 0.8rem; padding: 0; display: grid; gap: 0.4rem; overflow-y: auto; min-height: 0; flex: 1 1 auto; }
#patch-list li { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.5rem 0.7rem; font-size: 0.92rem; line-height: 1.4; color: var(--tx); border-radius: var(--r-m); background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); }
#patch-list li i { font-style: normal; font-size: 1.15rem; line-height: 1.2; }
#patch-ok { flex: none; width: 100%; }
.srv-text p { margin: 0 0 0.6rem; font-size: 1rem; line-height: 1.4; color: var(--tx); }
.srv-text b { color: #ffe066; }
.srv-btns { display: flex; gap: 0.6rem; justify-content: center; align-items: center; flex-wrap: wrap; margin-top: 0.4rem; }

/* sobre el creador */
.ab-sub { margin: 0 0 0.75rem; font-size: 0.95rem; color: var(--tx-2); }
.ab-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; margin-bottom: 0.9rem; }
.ab-link { display: flex; flex-direction: column; align-items: center; gap: 0.1rem; padding: 0.6rem 0.4rem; text-align: center; text-decoration: none; color: var(--tx); border-radius: var(--r-m); border: 1px solid var(--line-2); background: var(--ink-1); }
.ab-link b { font-family: var(--f-disp); font-weight: 400; font-size: 1.35rem; color: #ffe066; }
.ab-link small { font-size: 0.75rem; color: var(--tx-2); overflow-wrap: anywhere; }
.ab-link:hover { border-color: var(--yel); }
.ab-share { margin-bottom: 0.9rem; padding: 0.65rem 0.8rem; border-radius: var(--r-m); background: rgba(255, 255, 255, 0.05); }
.ab-share p { margin: 0; font-size: 0.9rem; line-height: 1.45; color: var(--tx); }
.ab-share p + p { margin-top: 0.25rem; }
#ab-share { width: 100%; }

/* ideas y fallos */
.fb-sub { margin: 0 0 0.6rem; font-size: 0.9rem; color: var(--tx-2); }
#fb-text { width: 100%; min-height: 6rem; resize: vertical; flex: none; font-size: 0.95rem; line-height: 1.45; }
.fb-foot { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.6rem; }
.fb-foot small { flex: 1; font-size: 0.82rem; color: #ffb0a8; }

/* encuesta */
.poll-q { margin: 0 0 0.6rem; color: var(--tx); }
.poll-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr)); gap: 0.5rem; margin-bottom: 0.7rem; overflow-y: auto; }
.poll-opt { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; padding: 0.5rem 0.4rem; font-size: 0.88rem; color: var(--tx); cursor: pointer; border-radius: var(--r-m); border: 1px solid var(--line-2); background: var(--ink-1); }
.poll-opt img { width: 2.5rem; height: 2.5rem; image-rendering: pixelated; border-radius: var(--r-s); }
.poll-opt.on { border-color: var(--yel); background: rgba(255, 203, 5, 0.12); box-shadow: 0 0 0.75rem rgba(255, 216, 74, 0.35); }
.poll-grid .poll-opt.poll-txt { grid-column: 1 / -1; flex-direction: row; justify-content: center; padding: 0.6rem 0.75rem; }

/* skin por vídeo */
.vskin-panel { width: min(29rem, 100%); }
.vskin-panel .vs-hero { display: flex; justify-content: center; gap: 0.4rem; margin: 0.25rem 0 0.4rem; }
.vskin-panel .vs-hero img { width: 6rem; height: 6rem; image-rendering: pixelated; filter: drop-shadow(0 0 0.6rem rgba(255, 230, 60, 0.7)); }
.vskin-panel .vs-intro { margin: 0 0 0.6rem; text-align: center; font-size: 0.9rem; line-height: 1.4; color: var(--tx-2); }
.vskin-panel .patch-list { list-style: none; margin: 0 0 0.9rem; padding: 0; display: grid; gap: 0.45rem; }
.vskin-panel .patch-list li { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.45rem 0.65rem; font-size: 0.88rem; line-height: 1.4; color: var(--tx); border-radius: var(--r-m); background: rgba(255, 255, 255, 0.05); }
.vskin-panel .patch-list li i { font-style: normal; font-size: 1.1rem; }
.vskin-panel .vs-btns { display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; }

/* sancionar (solo el creador) */
.sanc-panel label { display: flex; flex-direction: column; gap: 0.25rem; margin: 0 0 0.6rem; color: var(--tx-2); }

/* ------------------------------------------------------------------ perfil de otro jugador */
#pview { z-index: 62; }
.pv-panel .patch-head { flex-wrap: nowrap; }
.pv-av { width: 3.5rem; height: 3.5rem; flex: none; image-rendering: pixelated; border-radius: 50%; background: var(--ink-2); box-shadow: 0 0 0 0.14rem var(--yel); }
.pv-who { flex: 1; min-width: 0; }
.pv-who h2 { font-size: 1.8rem; color: #ffe066; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-who small { font-size: 0.82rem; color: var(--tx-2); }
.pv-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.4rem; margin: 0.25rem 0 0.75rem; }
.pv-stats div { padding: 0.4rem 0.5rem; text-align: center; border-radius: var(--r-m); background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); }
.pv-stats small { display: block; font-size: 0.68rem; font-weight: 800; color: var(--tx-3); text-transform: uppercase; }
.pv-stats b { font-family: var(--f-disp); font-weight: 400; font-size: 1.45rem; color: #fff; }
.pv-h { margin: 0 0 0.4rem; font-size: 1.3rem; color: #ffd84a; }
.pv-best { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; margin-bottom: 0.75rem; }
.pv-mon { display: flex; flex-direction: column; align-items: center; gap: 0.12rem; padding: 0.5rem 0.25rem; border-radius: var(--r-m); background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); }
.pv-mon.top { border-color: rgba(255, 210, 60, 0.6); background: rgba(255, 210, 60, 0.12); }
.pv-mon > img { width: 3rem; height: 3rem; image-rendering: pixelated; }
.pv-mon b { font-family: var(--f-disp); font-weight: 400; font-size: 1.15rem; color: #fff; text-align: center; }
.pv-mon span { display: flex; align-items: center; gap: 0.2rem; font-family: var(--f-disp); font-size: 1.1rem; color: #ffe066; }
.pv-mon .cup { width: 1rem; height: 1rem; }
.pv-acts { display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; }

/* ------------------------------------------------------------------ chat general y del grupo (lobby) */
.gchat { position: fixed; inset: 0; z-index: 55; display: flex; justify-content: flex-start; padding: max(0.6rem, var(--sat)) 0.6rem max(0.6rem, var(--sab)) calc(0.6rem + var(--sal)); background: rgba(4, 7, 18, 0.45); }
.gchat.kb { inset: auto 0 auto 0; }
.gc-panel { width: min(25rem, 100%); height: 100%; display: flex; flex-direction: column; padding: 0.75rem 0.8rem 0.7rem; animation: gcIn 0.22s ease-out both; }
@keyframes gcIn { from { transform: translateX(-1.8rem); opacity: 0; } to { transform: none; opacity: 1; } }
.gc-head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.55rem; }
.gc-head b { font-family: var(--f-disp); font-weight: 400; font-size: 1.75rem; color: #ffe066; }
.gc-head small { font-size: 0.8rem; color: #7dff8f; }
.gc-muted { margin-left: auto; padding: 0.15rem 0.55rem; font-size: 0.85rem; color: var(--tx-2); border: 1px solid var(--line-2); border-radius: 999px; background: var(--ink-1); cursor: pointer; }
.gc-muted + .fb-close { margin-left: 0.4rem; }
.gc-tabs { margin-bottom: 0.55rem; }
.gc-log { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 0.4rem; padding: 0.25rem 0.1rem; overscroll-behavior: contain; }
.gc-m { display: flex; gap: 0.5rem; align-items: flex-start; }
.gc-m > img { width: 2.1rem; height: 2.1rem; flex: none; image-rendering: pixelated; border-radius: 50%; background: var(--ink-2); }
.gc-m > img.gc-sh { box-shadow: 0 0 0 2px #ffe066, 0 0 0.45rem rgba(255, 214, 60, 0.7); } /* foto shiny */
.gc-b { flex: 1; min-width: 0; padding: 0.3rem 0.65rem 0.4rem; text-align: left; border-radius: 0.15rem var(--r-m) var(--r-m) var(--r-m); background: rgba(255, 255, 255, 0.06); }
.gc-m.mine .gc-b { background: rgba(125, 255, 143, 0.1); }
.gc-m.owner .gc-b { background: rgba(255, 207, 46, 0.12); box-shadow: inset 0 0 0 1px rgba(255, 207, 46, 0.4); }
.gc-m.helper .gc-b { background: rgba(190, 120, 255, 0.12); box-shadow: inset 0 0 0 1px rgba(190, 120, 255, 0.45); }
.gc-n { padding: 0; font: inherit; font-weight: 900; font-size: 0.92rem; color: #7ab4fa; background: none; border: 0; cursor: pointer; }
.gc-n:hover { text-decoration: underline; }
.gc-m.mine .gc-n { color: #7dff8f; }
.gc-m.owner .gc-n { color: var(--yel); }
.gc-m.helper .gc-n { color: #d6a8ff; }
.gc-tag { display: inline-block; margin-left: 0.4rem; padding: 0.05rem 0.4rem; font: 900 0.72rem/1.1rem var(--f-body); letter-spacing: 0.03em; vertical-align: 0.1rem; color: #2a1a00; border-radius: 0.3rem; background: var(--yel); }
.gc-tag.helper { background: #b67cff; color: #1e0a3a; }
.gc-tag.own { color: #10142a; }
.gc-tag.gigamax { background: linear-gradient(90deg, #8a3aff, #ff6a2a, #8a3aff); background-size: 200% 100%; color: #fff; animation: gigamaxTag 3s linear infinite; }
@keyframes gigamaxTag { to { background-position: -200% 0; } }
.gc-b small { margin-left: 0.4rem; font-size: 0.68rem; color: var(--tx-3); }
.gc-b p { margin: 0.05rem 0 0; font-size: 0.92rem; line-height: 1.4; color: var(--tx); overflow-wrap: anywhere; -webkit-user-select: text; user-select: text; }
.gc-re { display: block; margin: 0.12rem 0 0.06rem; padding: 0.12rem 0.4rem; font-size: 0.78rem; color: #a9bce6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 0.18rem solid #5aa8ff; border-radius: 0.25rem; background: rgba(90, 168, 255, 0.12); quotes: none; }
.gc-reply { display: flex; align-items: center; gap: 0.4rem; margin: 0 0 0.3rem; padding: 0.25rem 0.5rem; font-size: 0.82rem; border-left: 0.18rem solid #5aa8ff; border-radius: 0.4rem; background: rgba(90, 168, 255, 0.15); }
.gc-reply.hidden { display: none; }
.gc-reply span { flex: 1; min-width: 0; color: #cfe0ff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gc-reply button { font-size: 0.9rem; background: none; border: 0; cursor: pointer; }
.gc-menu { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.4rem; }
.gc-menu button, .gc-play, .gc-clan { padding: 0.2rem 0.6rem; font-size: 0.82rem; color: var(--tx); border: 1px solid var(--line-2); border-radius: 999px; background: var(--ink-2); cursor: pointer; }
.gc-menu button:hover { border-color: var(--yel); }
.gc-play:disabled { opacity: 0.6; cursor: default; }
.gc-clan { color: #ffe066; border-color: rgba(255, 203, 5, 0.45); background: rgba(255, 203, 5, 0.12); }
.gc-empty { margin: auto 0; text-align: center; font-size: 0.9rem; color: var(--tx-3); }
.gc-rules { margin: 0.4rem 0; font-size: 0.72rem; color: var(--tx-3); }
.gc-in { display: flex; gap: 0.4rem; }
.gc-in input { flex: 1; min-width: 0; }
.gc-mic, .gc-x { flex: none; width: 2.6rem; font-size: 1.1rem; color: #fff; border: 1px solid var(--line-2); border-radius: var(--r-s); background: var(--ink-2); cursor: pointer; }
.gc-mic.rec { border-color: #ff6a6a; background: #b02828; animation: recPulse 0.9s infinite; }
@keyframes recPulse { 50% { filter: brightness(1.35); } }
.gc-x { font-size: 0.95rem; color: var(--tx-2); }
.mu-row { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 0.4rem 0; border-top: 1px solid var(--line); }
#btn-chat { position: relative; }

/* ------------------------------------------------------------------ durante la partida */
#help {
  position: fixed;
  left: 50%;
  top: 5.6rem;
  z-index: 15;
  max-width: calc(100% - 2rem);
  padding: 0.45rem 1rem;
  transform: translateX(-50%);
  font-size: 0.82rem;
  line-height: 1.5;
  text-align: center;
  color: #fff;
  border-radius: 999px;
  background: rgba(6, 10, 26, 0.72);
  border: 1px solid var(--line);
  pointer-events: none;
}
#help .mobile, #help .pad { display: none; }
@media (pointer: coarse) { #help .pc { display: none; } #help .mobile { display: inline; } }
body.pad #help .pad { display: inline !important; }
body.pad #help .pc, body.pad #help .mobile { display: none !important; }
#btn-pause { position: fixed; top: max(0.6rem, var(--sat)); left: calc(0.6rem + var(--sal)); z-index: 20; }
body.in-match #game { cursor: none; }
#btn-mchat { position: fixed; z-index: 24; bottom: calc(14rem + var(--sab)); right: calc(0.6rem + var(--sar)); }
body.lefty #btn-mchat { right: auto; left: calc(0.6rem + var(--sal)); }
#btn-mchat.on { filter: brightness(1.3); border-color: var(--yel); }
body:has(#end:not(.hidden)) #btn-mchat { top: auto; bottom: calc(0.6rem + var(--sab)); }
.mchat { position: fixed; left: calc(0.6rem + var(--sal)); top: 7.5rem; z-index: 22; width: min(21rem, 46vw); pointer-events: none; }
.mchat-log { display: flex; flex-direction: column; gap: 0.2rem; }
.mchat-log p { align-self: flex-start; max-width: 100%; margin: 0; padding: 0.2rem 0.55rem; font-size: 0.85rem; line-height: 1.3; color: #fff; overflow-wrap: anywhere; border-radius: var(--r-s); background: rgba(8, 12, 28, 0.74); transition: opacity 1s; }
.mchat-log p b { font-weight: 900; }
.mchat-log p.me b { color: #7dff8f; }
.mchat-log p.ally b { color: #8ec2ff; }
.mchat-log p.foe b { color: #ff9a9a; }
.mchat-log p.creator b { color: var(--yel) !important; }
.mchat-log p.creator { box-shadow: inset 0 0 0 1px rgba(255, 210, 60, 0.5); }
.mchat-log p.old { opacity: 0; }
.mchat-bar { position: fixed; z-index: 24; bottom: calc(14rem + var(--sab)); right: calc(4rem + var(--sar)); width: min(21rem, 52vw); max-height: calc(100vh - 15rem); overflow-y: auto; padding: 0.5rem; pointer-events: auto; border-radius: var(--r-l); background: rgba(12, 18, 42, 0.95); border: 1px solid var(--line-2); box-shadow: var(--sh-2); }
body.lefty .mchat-bar { right: auto; left: calc(4rem + var(--sal)); }
.mchat-quick { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 0.45rem; }
.mchat-quick button { padding: 0.25rem 0.6rem; font-size: 0.88rem; color: #fff; border: 1px solid var(--line-2); border-radius: 999px; background: var(--ink-2); cursor: pointer; }
.mchat-quick button:active { background: var(--ink-3); }
.mchat-in { display: flex; gap: 0.4rem; }
.mchat-in input { flex: 1; min-width: 0; }
.mchat-mute { margin-top: 0.4rem; padding: 0; font-size: 0.82rem; color: var(--tx-3); background: none; border: 0; cursor: pointer; }
.practice-bar { position: fixed; top: calc(3.8rem + var(--sat)); left: calc(0.6rem + var(--sal)); z-index: 25; display: flex; flex-direction: column; align-items: stretch; gap: 0.3rem; }
.practice-bar .act { min-height: 1.9rem; padding: 0.15rem 0.6rem; font-size: 1rem; }
/* desplegable del tipo del maniquí (entrenamiento): oscuro, con las letras claras */
.practice-bar select.act { font-family: var(--f-disp); color-scheme: dark; cursor: pointer; }
.practice-bar select.act option { background: #1b2a4a; color: #fff; text-shadow: none; }

/* ------------------------------------------------------------------ tamaños */
@media (max-height: 520px) {
  #sf-mc { width: 9rem; }
  #hw-mc { width: 10.5rem; }
  #lg-mc { width: 9rem; }
  .sf-stage { gap: 0.5rem; }
  .sf-it { height: 5.6rem; }
  .sf-it .sf-face img, .sf-it .sf-cov img { width: 2.5rem; height: 2.5rem; }
  .hw-panel .sf-help, .lg-panel .sf-help { display: none; }
  .hw-prize { padding: 0.3rem; }
  .hw-prize img { height: 1.8rem; }
  .lg-odd { padding: 0.2rem 0.55rem; }
  .lg-odd small { display: none; }
  .lg-odd span { grid-row: 1; font-size: 1.2rem; }
  #lg-items .sf-it { height: 7rem; }
  #lg-items .sf-it .sf-face img { width: 3.4rem; height: 3.4rem; }
  .chest-ui h2 { font-size: 1.9rem; }
  .reward.large img { width: 3.6rem; height: 3.6rem; }
  .reward.large.new img { width: 5rem; height: 5rem; }
  .reward.large b { font-size: 1.9rem; }
  .end-panel { padding-top: 0.5rem; }
  .end-head h1 { font-size: 2.4rem; }
  .er-pt, .er-pt img { width: 2.1rem; height: 2.1rem; }
  .end-row { grid-template-columns: auto minmax(0, 1fr) repeat(4, 2.8rem); gap: 0.25rem; padding: 0.15rem 0.35rem 0.15rem 0.15rem; }
  .end-row.no-stat { grid-template-columns: auto minmax(0, 1fr) repeat(3, 2.8rem); }
  .end-team.ffa .end-row { grid-template-columns: 1.3rem auto minmax(0, 1fr) repeat(4, 2.2rem); }
  .end-team h3 { font-size: 1.15rem; }
  #end-teams { margin: 0.3rem 0; gap: 0.5rem; }
  .end-panel .row .big { min-height: 2.6rem; font-size: 1.45rem; }
  .end-panel .row #back { min-height: 2.6rem; font-size: 1.2rem; }
  .copas-change b { font-size: 1.5rem; }
  .gc-rules { display: none; }
  .gc-m > img { width: 1.75rem; height: 1.75rem; }
  .mchat { top: 4.6rem; }
  #btn-mchat, .mchat-bar { bottom: calc(12.5rem + var(--sab)); }
  .mchat-bar { max-height: calc(100vh - 13.5rem); width: min(29rem, 62vw); }
  #help { top: 4.6rem; }
  /* entrenamiento: los botones más pequeños para que no tapen media pantalla */
  .practice-bar { top: calc(3.3rem + var(--sat)); gap: 0.2rem; }
  .practice-bar .act { min-height: 1.65rem; padding: 0.05rem 0.5rem; font-size: 0.95rem; }
  .practice-bar .act .pxi, .practice-bar .act img { width: 0.95rem; height: 0.95rem; }
  .pv-stats { margin-bottom: 0.4rem; }
  .pv-mon { flex-direction: row; justify-content: center; gap: 0.4rem; padding: 0.3rem; }
  .pv-mon > img { width: 2rem; height: 2rem; }
  #patch-list li { padding: 0.4rem 0.6rem; font-size: 0.86rem; }
}
@media (max-width: 700px) {
  #sf-items, #hw-items { gap: 0.3rem; }
  #hw-prizes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  #end-teams, .end-team.ffa .et-rows { grid-template-columns: 1fr; }
}
@media (max-width: 700px) and (orientation: portrait) { .sf-stage { flex-direction: column; } }
