/* ========================================================
   BATTLEMON — TEMA POKÉMON PIXEL RPG MODERNO
======================================================== */

:root {
  /* Keep normal browser zoom readable: at least 16px, 18px at Full HD.
     Width and height constrain growth; smaller windows reflow instead of shrinking text. */
  font-size: clamp(16px, min(0.9375vw, 1.875dvh), 36px);
  --bg-main: #090d18;
  --bg-panel: #111829;
  --bg-card: #182238;
  --bg-card-hover: #21304d;
  --border-pixel: #2e4063;
  --border-highlight: #38bdf8;
  --color-primary: #ef4444;
  --color-gold: #fbbf24;
  --color-blue: #38bdf8;
  --color-green: #10b981;
  --color-purple: #a855f7;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --font-pixel-title: 'Press Start 2P', monospace;
  --font-pixel-ui: 'Pixelify Sans', 'Outfit', sans-serif;
  --font-clean: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

img { object-fit: contain; }

/* Presentation only: preserve stored text and the original spelling of player names. */
body, body *, body *::placeholder { text-transform: uppercase !important; }
#charNicknameInput, #headerTrainerName, #homeTrainerName, #lbUserName,
.lb-trainer-cell strong, .chat-msg-sender { text-transform: none !important; }

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-clean);
  user-select: none;
  scrollbar-width: thin;
  scrollbar-color: #3b82f6 #090e1a;
}

/* Scrollbars Customizadas no Tema Retro RPG (Pixel Dark com Trilho Azul/Ouro) */
::-webkit-scrollbar {
  width: 0.4375rem;
  height: 0.4375rem;
}

::-webkit-scrollbar-track {
  background: #070b14;
  border-radius: 0.25rem;
}

::-webkit-scrollbar-thumb {
  background: #1e3a6a;
  border: 0.0625rem solid #38bdf8;
  border-radius: 0.25rem;
  box-shadow: inset 0 0 0.25rem rgba(56, 189, 248, 0.4);
}

::-webkit-scrollbar-thumb:hover {
  background: #f59e0b;
  border-color: #fbbf24;
  box-shadow: inset 0 0 0.375rem rgba(251, 191, 36, 0.6);
}

html,
body {
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
}

body {
  background-color: #080c14;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
}

/* Moldura estilo RPG portátil */
.pixel-frame {
  background: var(--bg-panel);
  border: 0.125rem solid var(--border-pixel);
  border-radius: 0.625rem;
  box-shadow:
    inset 0 0 0 0.125rem rgba(255, 255, 255, 0.04),
    0 0.375rem 0 rgba(0, 0, 0, 0.45);
}

/* ========================================================
   BARRA SUPERIOR COMPACTA DE JOGO (NAVBAR HUD)
======================================================== */
.navbar {
  position: relative;
  background: #0b1120;
  border-bottom: 0.1875rem solid #1e293b;
  padding: 0.375rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  z-index: 60;
  gap: 0.5rem;
  min-height: 3.25rem;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 2;
}

.nav-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 1;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  cursor: pointer;
}

.pokeball-icon {
  width: 1.875rem;
  height: 1.875rem;
  background: linear-gradient(180deg, #ef4444 46%, #0f172a 46%, #0f172a 54%, #f8fafc 54%);
  border-radius: 50%;
  border: 0.125rem solid #f8fafc;
  position: relative;
  box-shadow: 0 0 0.625rem rgba(239, 68, 68, 0.5);
}

.pokeball-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0.5625rem;
  height: 0.5625rem;
  background: white;
  border: 0.125rem solid #0f172a;
  border-radius: 50%;
}

.pokeball-icon.animated {
  animation: floatBall 2.6s ease-in-out infinite;
}

@keyframes floatBall {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-0.1875rem); }
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-pixel-title);
  font-size: 0.85rem;
  color: var(--color-gold);
  text-shadow: 0.125rem 0.125rem 0 #991b1b;
  letter-spacing: 0.0625rem;
}

.brand-sub {
  font-family: var(--font-pixel-ui);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--color-blue);
  letter-spacing: 0.0625rem;
}

.nav-links {
  display: flex;
  gap: 0.375rem;
  flex-wrap: wrap;
}

.nav-btn {
  font-family: var(--font-pixel-ui);
  background: #141e33;
  border: 0.125rem solid #263554;
  color: var(--text-muted);
  padding: 0.375rem 0.75rem;
  border-radius: 0.4375rem;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  transition: all 0.15s;
}

.nav-btn:hover {
  background: #1e2d4a;
  color: var(--text-main);
  transform: translateY(-0.0625rem);
}

.nav-btn.active {
  background: #172554;
  border-color: var(--color-gold);
  color: var(--color-gold);
  box-shadow: 0 0.1875rem 0 #78350f;
}

.badge-count {
  background: rgba(56, 189, 248, 0.18);
  color: var(--color-blue);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.0625rem 0.375rem;
  border-radius: 0.25rem;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.currency-pill,
.streak-badge-header {
  font-family: var(--font-pixel-ui);
  display: flex;
  align-items: center;
  gap: 0.3125rem;
  padding: 0.25rem 0.625rem;
  border-radius: 0.375rem;
  font-size: 0.86rem;
  font-weight: 700;
  border: 0.125rem solid #263554;
  background: #141e33;
}

.currency-pill.coins {
  border-color: rgba(251, 191, 36, 0.45);
  color: var(--color-gold);
}

.currency-pill.bp {
  border-color: rgba(168, 85, 247, 0.45);
  color: #c084fc;
}

.streak-badge-header {
  border-color: rgba(16, 185, 129, 0.45);
  color: #34d399;
}

.btn-mic-toggle {
  position: relative;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(16, 185, 129, 0.12) !important;
  border-color: rgba(16, 185, 129, 0.45) !important;
}

.btn-mic-toggle:hover {
  background: rgba(16, 185, 129, 0.24) !important;
  border-color: #10b981 !important;
}

.btn-mic-toggle .icon-mic-on {
  color: #34d399 !important;
  display: block !important;
}

.btn-mic-toggle .icon-mic-muted {
  display: none !important;
}

.btn-mic-toggle:hover .icon-mic-on {
  color: #6ee7b7 !important;
  filter: drop-shadow(0 0 0.375rem rgba(16, 185, 129, 0.6));
}

.btn-mic-toggle.muted {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: rgba(239, 68, 68, 0.5) !important;
}

.btn-mic-toggle.muted .icon-mic-on {
  display: none !important;
}

.btn-mic-toggle.muted .icon-mic-muted {
  display: block !important;
  color: #f87171 !important;
  filter: drop-shadow(0 0 0.375rem rgba(239, 68, 68, 0.5));
}

.btn-mic-toggle.muted:hover {
  background: rgba(239, 68, 68, 0.25) !important;
  border-color: #ef4444 !important;
}

.btn-icon {
  background: #141e33;
  border: 0.125rem solid #263554;
  color: var(--text-main);
  width: 2.125rem;
  height: 2.125rem;
  border-radius: 0.375rem;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

/* ========================================================
   CONTAINER PRINCIPAL E TELAS (ADAPTÁVEL AO TAMANHO DA JANELA)
======================================================== */
.main-container {
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: clamp(0.375rem, 1.1dvh, 0.875rem) clamp(0.5rem, 1.4vw, 1.25rem);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.screen {
  display: none;
  flex-direction: column;
  width: 100%;
  height: 100%;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  animation: fadeIn 0.2s ease-out;
}

.screen.active {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(0.25rem); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========================================================
   TELA 0: TELA DE TÍTULO DE JOGO (SEM SCROLL • 100% ADAPTÁVEL)
======================================================== */
/* Preenchimento total no Menu Inicial (Full Bleed Edge-to-Edge) */
body:has(#homeScreen.active) .main-container,
body.in-home-screen .main-container {
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100vw !important;
  width: 100vw !important;
  height: 100dvh !important;
}

body:has(#homeScreen.active) #homeScreen,
body.in-home-screen #homeScreen {
  width: 100vw !important;
  height: 100dvh !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

/* ========================================================
   TELA 0: MENU INICIAL (FUNDO TOTAL COM PADRÃO DE POKÉMONS)
======================================================== */
.game-title-screen {
  position: relative;
  flex: 1;
  height: 100dvh;
  min-height: 100dvh;
  width: 100vw;
  background: #080c14;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(0.625rem, 2.2dvh, 1.625rem) clamp(1rem, 3vw, 2.5rem);
  gap: clamp(1.125rem, 3.8dvh, 2.375rem);
  overflow: hidden;
}

/* Padrão de Fundo com Pokémons de Vários Tipos (Preenchendo a Tela Toda) */
.title-pokemon-pattern-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-image: url('images/pokemon_types_pattern.svg');
  background-repeat: repeat;
  background-size: 35rem 35rem;
  opacity: 0.25;
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 1;
  animation: pokemonPatternDrift 80s linear infinite;
}

@keyframes pokemonPatternDrift {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 35rem 35rem;
  }
}

/* Efeito sutil de iluminação ambiente (Sem fundo azul) */
.title-aurora-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 25% 30%, rgba(249, 115, 22, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 75% 30%, rgba(245, 158, 11, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 50% 70%, rgba(168, 85, 247, 0.06) 0%, transparent 55%);
  filter: blur(1.5625rem);
  pointer-events: none;
  animation: auroraPulse 6s ease-in-out infinite alternate;
}

@keyframes auroraPulse {
  0% { opacity: 0.6; transform: scale(1); }
  100% { opacity: 0.95; transform: scale(1.04); }
}

/* Holograma azul desativado para manter o fundo limpo e com foco total no padrão */
.title-pokeball-hologram {
  display: none !important;
}

.pokeball-svg-holo {
  width: 100%;
  height: 100%;
  animation: rotateHolo 30s linear infinite;
  filter: drop-shadow(0 0 0.9375rem rgba(56, 189, 248, 0.4));
}

@keyframes rotateHolo {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Partículas flutuantes de energia */
.ambient-sparks-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.spark {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 0 0.25rem currentColor);
  animation: floatSpark 4.2s ease-in-out infinite;
}

.spark.s1 { width: 0.25rem; height: 0.25rem; background: #f97316; left: 8%; bottom: 12%; animation-delay: 0s; }
.spark.s2 { width: 0.1875rem; height: 0.1875rem; background: #38bdf8; left: 18%; bottom: 18%; animation-delay: 1.2s; }
.spark.s3 { width: 0.3125rem; height: 0.3125rem; background: #fbbf24; left: 26%; bottom: 8%; animation-delay: 2.1s; }
.spark.s4 { width: 0.1875rem; height: 0.1875rem; background: #c084fc; left: 34%; bottom: 14%; animation-delay: 0.6s; }
.spark.s5 { width: 0.25rem; height: 0.25rem; background: #f43f5e; left: 42%; bottom: 6%; animation-delay: 2.8s; }
.spark.s6 { width: 0.3125rem; height: 0.3125rem; background: #eab308; left: 50%; bottom: 16%; animation-delay: 1.7s; }
.spark.s7 { width: 0.1875rem; height: 0.1875rem; background: #06b6d4; left: 58%; bottom: 9%; animation-delay: 3.3s; }
.spark.s8 { width: 0.25rem; height: 0.25rem; background: #ff7849; left: 66%; bottom: 15%; animation-delay: 0.9s; }
.spark.s9 { width: 0.1875rem; height: 0.1875rem; background: #a855f7; left: 74%; bottom: 7%; animation-delay: 2.4s; }
.spark.s10 { width: 0.3125rem; height: 0.3125rem; background: #f59e0b; left: 82%; bottom: 13%; animation-delay: 1.5s; }
.spark.s11 { width: 0.25rem; height: 0.25rem; background: #38bdf8; left: 90%; bottom: 10%; animation-delay: 3.0s; }
.spark.s12 { width: 0.1875rem; height: 0.1875rem; background: #fb7185; left: 13%; bottom: 5%; animation-delay: 3.8s; }
.spark.s13 { width: 0.25rem; height: 0.25rem; background: #fde047; left: 23%; bottom: 22%; animation-delay: 0.4s; }
.spark.s14 { width: 0.1875rem; height: 0.1875rem; background: #34d399; left: 47%; bottom: 11%; animation-delay: 2.6s; }
.spark.s15 { width: 0.3125rem; height: 0.3125rem; background: #f97316; left: 62%; bottom: 6%; animation-delay: 3.7s; }
.spark.s16 { width: 0.25rem; height: 0.25rem; background: #818cf8; left: 71%; bottom: 20%; animation-delay: 1.1s; }
.spark.s17 { width: 0.1875rem; height: 0.1875rem; background: #f43f5e; left: 86%; bottom: 16%; animation-delay: 2.2s; }
.spark.s18 { width: 0.3125rem; height: 0.3125rem; background: #fbbf24; left: 94%; bottom: 6%; animation-delay: 0.2s; }

@keyframes floatSpark {
  0% { transform: translateY(0) scale(0.6); opacity: 0; }
  25% { opacity: 0.95; }
  75% { opacity: 0.75; }
  100% { transform: translateY(-10rem) scale(1.2); opacity: 0; }
}

/* ========================================================
   MASCOTES COM PEDESTAIS ELEMENTAIS & INTERATIVIDADE
======================================================== */
.mascot-wrapper {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  z-index: 2;
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.22s ease;
}

.mascot-wrapper:hover {
  transform: translateY(-0.5rem) scale(1.08);
}

.mascot-wrapper:hover .title-mascot {
  filter: drop-shadow(0 0 1rem rgba(251, 191, 36, 0.85));
}

.mascot-pedestal {
  position: absolute;
  bottom: 0;
  border-radius: 50%;
  transform: rotateX(65deg);
  pointer-events: none;
  filter: blur(0.125rem);
  animation: pedestalPulse 2.8s ease-in-out infinite alternate;
}

@keyframes pedestalPulse {
  0% { transform: rotateX(65deg) scale(0.92); opacity: 0.6; }
  100% { transform: rotateX(65deg) scale(1.06); opacity: 0.95; }
}

.fire-pedestal {
  width: clamp(5.625rem, 18dvh, 10rem);
  height: clamp(1.75rem, 6dvh, 3rem);
  background: radial-gradient(ellipse at center, rgba(249, 115, 22, 0.75) 0%, rgba(220, 38, 38, 0.4) 60%, transparent 80%);
  box-shadow: 0 0 1.25rem rgba(249, 115, 22, 0.6);
}

.aura-pedestal {
  width: clamp(5.625rem, 18dvh, 9.375rem);
  height: clamp(1.75rem, 6dvh, 2.875rem);
  background: radial-gradient(ellipse at center, rgba(56, 189, 248, 0.75) 0%, rgba(37, 99, 235, 0.4) 60%, transparent 80%);
  box-shadow: 0 0 1.25rem rgba(56, 189, 248, 0.6);
}

.electric-pedestal {
  width: clamp(4.0625rem, 12dvh, 6.875rem);
  height: clamp(1.25rem, 4dvh, 2.25rem);
  background: radial-gradient(ellipse at center, rgba(250, 204, 21, 0.7) 0%, rgba(234, 179, 8, 0.35) 60%, transparent 80%);
  box-shadow: 0 0 1rem rgba(250, 204, 21, 0.5);
}

.ghost-pedestal {
  width: clamp(4.0625rem, 12dvh, 6.875rem);
  height: clamp(1.25rem, 4dvh, 2.25rem);
  background: radial-gradient(ellipse at center, rgba(168, 85, 247, 0.7) 0%, rgba(126, 34, 206, 0.35) 60%, transparent 80%);
  box-shadow: 0 0 1rem rgba(168, 85, 247, 0.5);
}

.left-mascot-wrapper {
  left: 3%;
  bottom: 5%;
  animation: mascotFloat 3.6s ease-in-out infinite;
}

.right-mascot-wrapper {
  right: 3%;
  bottom: 5%;
  animation: mascotFloat 3.8s ease-in-out infinite 0.5s;
}

.sub-left-mascot-wrapper {
  left: 13%;
  top: 9%;
  animation: mascotFloat 3.2s ease-in-out infinite 0.2s;
}

.sub-right-mascot-wrapper {
  right: 13%;
  top: 9%;
  animation: mascotFloat 3.4s ease-in-out infinite 0.7s;
}

.title-mascot {
  image-rendering: pixelated;
  filter: drop-shadow(0 0.625rem 1.125rem rgba(0, 0, 0, 0.75));
  transition: filter 0.2s ease;
}

.left-mascot {
  width: clamp(6.25rem, 22dvh, 11.875rem);
  height: clamp(6.25rem, 22dvh, 11.875rem);
}

.right-mascot {
  width: clamp(5.9375rem, 21dvh, 11.25rem);
  height: clamp(5.9375rem, 21dvh, 11.25rem);
}

.sub-left-mascot {
  width: clamp(3.75rem, 12dvh, 6.5625rem);
  height: clamp(3.75rem, 12dvh, 6.5625rem);
  opacity: 0.9;
}

.sub-right-mascot {
  width: clamp(4rem, 12.5dvh, 6.875rem);
  height: clamp(4rem, 12.5dvh, 6.875rem);
  opacity: 0.9;
}

@keyframes mascotFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-0.4375rem); }
}

@media (max-width: 980px) {
  .sub-left-mascot-wrapper, .sub-right-mascot-wrapper {
    display: none;
  }
  .left-mascot-wrapper, .right-mascot-wrapper {
    opacity: 0.35;
  }
}

/* ========================================================
   LOGO PRINCIPAL BATTLEMON
======================================================== */
.title-logo-block {
  position: relative;
  z-index: 3;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.25rem, 1dvh, 0.5rem);
}

.title-badge-top {
  transform: translateY(-.5rem);
  font-family: var(--font-pixel-ui);
  font-size: clamp(0.6rem, 1.2dvh, 0.72rem);
  font-weight: 800;
  letter-spacing: 0.125rem;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.14);
  border: 0.0625rem solid rgba(245, 158, 11, 0.4);
  border-radius: 0.75rem;
  padding: 0.125rem 0.625rem;
  text-transform: uppercase;
  box-shadow: 0 0 0.75rem rgba(245, 158, 11, 0.25);
}

.battlemon-pixel-logo {
  font-family: var(--font-pixel-title);
  font-size: clamp(3.2rem, 8.5dvh, 5.4rem);
  color: #fbbf24;
  text-shadow:
    0 0.25rem 0 #b45309,
    0 0.5rem 0 #78350f,
    0 0.75rem 0 #451a03,
    0 1rem 1.75rem rgba(0, 0, 0, 0.95);
  letter-spacing: 0.3125rem;
  line-height: 1.05;
  margin: 0;
  text-align: center;
  filter: drop-shadow(0 0 1.25rem rgba(251, 191, 36, 0.35));
}

.battlemon-random-sublogo {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--font-pixel-title);
  font-size: clamp(0.85rem, 1.8dvh, 1.15rem);
  color: #ffedd5;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96) 0%, rgba(194, 65, 12, 0.9) 50%, rgba(15, 23, 42, 0.96) 100%);
  border: 0.125rem solid #ea580c;
  border-radius: 0.5rem;
  padding: clamp(0.1875rem, 0.7dvh, 0.375rem) clamp(1rem, 2vw, 1.5rem);
  letter-spacing: 0.375rem;
  text-shadow: 0 0.125rem 0 #0f172a, 0 0 0.75rem rgba(249, 115, 22, 0.8);
  box-shadow: 0 0.25rem 0 #7c2d12, 0 0 1.375rem rgba(249, 115, 22, 0.4);
  margin: 0;
}

.battlemon-random-sublogo .random-spark {
  color: #fbbf24;
  font-size: 0.85em;
  text-shadow: 0 0 0.5rem rgba(251, 191, 36, 0.9);
}

/* Rodapé Centralizado do Menu Inicial */
.title-footer-tagline {
  position: absolute;
  bottom: clamp(0.625rem, 1.8dvh, 1.125rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  font-family: var(--font-pixel-ui);
  font-size: clamp(0.65rem, 1.2dvh, 0.76rem);
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.175rem;
  text-transform: uppercase;
  text-shadow: 0 0.0625rem 0.25rem rgba(0, 0, 0, 0.95);
  pointer-events: none;
  white-space: nowrap;
  max-width: 90vw;
  text-align: center;
  opacity: 0.85;
}

/* Versão no canto inferior direito do menu inicial */
.title-footer-version {
  position: absolute;
  bottom: clamp(0.625rem, 1.8dvh, 1.125rem);
  right: clamp(1rem, 2.5vw, 2rem);
  left: auto;
  z-index: 6;
  font-family: var(--font-pixel-ui);
  font-size: clamp(0.68rem, 1.25dvh, 0.8rem);
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.125rem;
  text-transform: uppercase;
  text-shadow: 0 0.0625rem 0.25rem rgba(0, 0, 0, 0.95);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  opacity: 0.85;
}

.title-tagline {
  font-family: var(--font-pixel-ui);
  font-size: clamp(0.65rem, 1.2dvh, 0.74rem);
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.125rem;
  opacity: 0.9;
  text-shadow: 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.8);
}

/* ========================================================
   TERMINAL PRINCIPAL: BOTÃO JOGAR HEROICO & DESTACADO
======================================================== */
.title-play-wrapper {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.5rem, 1.4dvh, 0.875rem);
  width: 100%;
  max-width: 31.25rem;
}

.btn-hero-play {
  position: relative;
  width: 100%;
  min-height: clamp(4.25rem, 10.5dvh, 5.75rem);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.75rem, 2vw, 1.25rem);
  padding: clamp(0.75rem, 1.8dvh, 1.125rem) clamp(1.125rem, 2.5vw, 1.75rem);
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 0.125rem solid #f59e0b;
  border-radius: 0.875rem;
  box-shadow:
    0 0 1.75rem rgba(245, 158, 11, 0.35),
    0 0.875rem 2rem rgba(0, 0, 0, 0.75),
    inset 0 0.0625rem 0 rgba(251, 191, 36, 0.4),
    inset 0 -0.125rem 0 rgba(0, 0, 0, 0.6);
  cursor: pointer;
  overflow: hidden;
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Anel de brilho pulsante */
.btn-hero-play .play-btn-glow-ring {
  position: absolute;
  inset: -0.125rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.6), rgba(239, 68, 68, 0.5), rgba(56, 189, 248, 0.4), rgba(245, 158, 11, 0.6));
  z-index: 0;
  opacity: 0.6;
  filter: blur(0.5rem);
  pointer-events: none;
  animation: playRingPulse 4s linear infinite;
}

@keyframes playRingPulse {
  0% { transform: scale(0.98); opacity: 0.5; }
  50% { transform: scale(1.02); opacity: 0.85; }
  100% { transform: scale(0.98); opacity: 0.5; }
}

/* Sweep de luz sobre o botão */
.play-btn-shine-sweep {
  position: absolute;
  top: 0;
  left: -120%;
  width: 70%;
  height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.18) 50%, transparent 100%);
  transform: skewX(-25deg);
  pointer-events: none;
  z-index: 1;
  animation: playSweepIdle 5s ease-in-out infinite;
}

@keyframes playSweepIdle {
  0%, 70% { left: -120%; }
  100% { left: 160%; }
}

/* Ícone com Pokébola Grande */
.play-btn-icon-block {
  position: relative;
  z-index: 2;
  width: clamp(2.75rem, 6.5dvh, 3.625rem);
  height: clamp(2.75rem, 6.5dvh, 3.625rem);
  flex-shrink: 0;
  border-radius: 0.75rem;
  background: rgba(245, 158, 11, 0.12);
  border: 0.09375rem solid rgba(245, 158, 11, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 1rem rgba(245, 158, 11, 0.25);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.play-pokeball-svg {
  width: 82%;
  height: 82%;
  filter: drop-shadow(0 0.125rem 0.375rem rgba(0, 0, 0, 0.6));
  transition: transform 0.3s ease;
}

/* Textos do Botão */
.play-btn-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 0 1 auto;
  min-width: 0;
  gap: 0.125rem;
}

.play-btn-badge {
  font-family: var(--font-pixel-ui);
  font-size: clamp(0.6rem, 1.1dvh, 0.72rem);
  font-weight: 800;
  color: #fbbf24;
  letter-spacing: 0.125rem;
  text-transform: uppercase;
  text-shadow: 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.8);
}

.play-btn-main {
  font-family: var(--font-pixel-title);
  font-size: clamp(1.4rem, 3dvh, 2rem);
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.25rem;
  line-height: 1.1;
  text-shadow:
    0 0.125rem 0 #b45309,
    0 0.25rem 0 #78350f,
    0 0.375rem 0.875rem rgba(0, 0, 0, 0.9),
    0 0 1rem rgba(251, 191, 36, 0.5);
  transition: all 0.2s ease;
}

.play-btn-desc {
  font-size: clamp(0.68rem, 1.2dvh, 0.76rem);
  color: #cbd5e1;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Seta de Ação */
.play-btn-action {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.play-arrow-pill {
  width: clamp(2.125rem, 4.5dvh, 2.625rem);
  height: clamp(2.125rem, 4.5dvh, 2.625rem);
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(0.85rem, 1.5dvh, 1.05rem);
  font-weight: 900;
  box-shadow: 0 0 1rem rgba(245, 158, 11, 0.5), 0 0.25rem 0.5rem rgba(0, 0, 0, 0.5);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Estados Hover e Active */
.btn-hero-play:hover {
  transform: translateY(-0.25rem) scale(1.02);
  border-color: #fbbf24;
  background: linear-gradient(135deg, #243552 0%, #131e36 100%);
  box-shadow:
    0 0 2.625rem rgba(245, 158, 11, 0.65),
    0 1.25rem 2.5rem rgba(0, 0, 0, 0.85),
    inset 0 0.0625rem 0 rgba(255, 255, 255, 0.5);
}

.btn-hero-play:hover .play-btn-icon-block {
  transform: scale(1.15) rotate(-10deg);
  border-color: #fbbf24;
  box-shadow: 0 0 1.5rem rgba(245, 158, 11, 0.55);
}

.btn-hero-play:hover .play-pokeball-svg {
  transform: rotate(35deg);
}

.btn-hero-play:hover .play-btn-main {
  color: #fef08a;
  letter-spacing: 0.3125rem;
  text-shadow:
    0 0.125rem 0 #d97706,
    0 0.25rem 0 #92400e,
    0 0.5rem 1.25rem rgba(245, 158, 11, 0.8);
}

.btn-hero-play:hover .play-arrow-pill {
  transform: scale(1.16) translateX(0.1875rem);
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  box-shadow: 0 0 1.5rem rgba(251, 191, 36, 0.8);
}

.btn-hero-play:active {
  transform: translateY(0.125rem) scale(0.99);
  box-shadow:
    0 0 1.25rem rgba(245, 158, 11, 0.4),
    0 0.375rem 1rem rgba(0, 0, 0, 0.8);
}

/* Barra de Resumo da Carreira */
.title-career-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  margin-top: 0.625rem;
  padding: 0.375rem 0.875rem;
  background: rgba(15, 23, 42, 0.7);
  border: 0.0625rem solid rgba(255, 255, 255, 0.08);
  border-radius: 1.25rem;
  font-family: var(--font-pixel-ui);
  font-size: 0.72rem;
  color: #cbd5e1;
}

.title-career-summary strong {
  color: #fbbf24;
  font-weight: 800;
}

.summary-sep {
  color: #475569;
}

/* ========================================================
   TOOLTIP TÁTICO FLUTUANTE (ESTILO CLEAN & OTIMIZADO)
======================================================== */
.poke-tooltip {
  position: fixed;
  width: 19.375rem;
  background: rgba(10, 15, 28, 0.97);
  border: 0.125rem solid var(--color-gold);
  border-radius: 0.625rem;
  box-shadow: 0 0.875rem 2.1875rem rgba(0, 0, 0, 0.85);
  padding: 0.625rem 0.75rem;
  z-index: 999;
  pointer-events: none;
  color: var(--text-main);
  font-size: 0.74rem;
}

.tt-header {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  border-bottom: 0.0625rem solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem;
}

.tt-header > img {
  width: 2.875rem;
  height: 2.875rem;
  object-fit: contain;
  image-rendering: pixelated;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 0.5rem;
  padding: 0.125rem;
}

.tt-title-col {
  flex: 1;
}

.tt-num-bst {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--color-blue);
}

.tt-shiny-badge {
  font-size: 0.62rem;
  font-weight: 800;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.2);
  border: 0.0625rem solid #f59e0b;
  padding: 0.0625rem 0.375rem;
  border-radius: 0.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.1875rem;
}

.tt-name {
  font-family: var(--font-pixel-ui);
  font-size: 0.96rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #ffffff;
  margin: 0.0625rem 0 0.1875rem;
}

.tt-types-row {
  display: flex;
  gap: 0.25rem;
}

.tt-stats-mini {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.1875rem;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 0.375rem;
  padding: 0.25rem;
  margin-bottom: 0.4375rem;
  text-align: center;
}

.tt-stat-cell span {
  display: block;
  font-size: 0.6rem;
  color: var(--text-muted);
  font-weight: 700;
}

.tt-stat-cell strong {
  font-size: 0.76rem;
  color: #f8fafc;
}

.tt-matchup-group {
  margin-bottom: 0.375rem;
}

.tt-matchup-group:last-child {
  margin-bottom: 0;
}

.tt-group-label {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03125rem;
  margin-bottom: 0.1875rem;
}

.tt-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.tt-type-chip {
  font-size: 0.64rem;
  font-weight: 800;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  color: white;
  display: inline-flex;
  align-items: center;
  gap: 0.1875rem;
}

/* ========================================================
   TOOLTIP GENÉRICO FLUTUANTE (ITENS, RELÍQUIAS, INSÍGNIAS, GOLPES)
   Segue rigorosamente o padrão visual do Tooltip dos Pokémons
======================================================== */
.generic-tooltip {
  position: fixed;
  width: 16.875rem;
  background: rgba(10, 15, 28, 0.98);
  border: 0.125rem solid var(--color-gold);
  border-radius: 0.625rem;
  box-shadow: 0 0.875rem 2.1875rem rgba(0, 0, 0, 0.88);
  padding: 0.5625rem 0.6875rem;
  z-index: 1000;
  pointer-events: none;
  color: var(--text-main);
  font-size: 0.78rem;
  transition: opacity 0.12s ease;
}

.gt-header {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  border-bottom: 0.0625rem solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem;
}

.gt-icon-box {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 0.0625rem solid rgba(251, 191, 36, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  flex-shrink: 0;
}

.gt-icon-box.badge-box {
  padding: 0.3125rem;
}

.gt-icon-box svg {
  width: 100%;
  height: 100%;
}

.gt-title-col {
  flex: 1;
  min-width: 0;
}

.gt-category-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--color-blue);
  margin-bottom: 0.125rem;
}

.gt-title {
  font-family: var(--font-pixel-ui);
  font-size: 0.96rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

.gt-body-box {
  background: rgba(24, 34, 56, 0.9);
  border-left: 0.1875rem solid var(--color-gold);
  border-radius: 0.375rem;
  padding: 0.4375rem 0.5625rem;
  margin-bottom: 0.375rem;
}

.gt-body-title {
  font-weight: 800;
  font-size: 0.76rem;
  color: var(--color-gold);
  margin-bottom: 0.1875rem;
}

.gt-body-desc {
  font-size: 0.72rem;
  color: #cbd5e1;
  line-height: 1.35;
}

.gt-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 0.375rem;
  padding: 0.3125rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: #94a3b8;
}

/* ========================================================
   TELA 1: CENTRAL DA POKÉTOWER (ESQUADRÃO + MOCHILA NA ESQUERDA)
======================================================== */
.tower-hub-layout {
  flex: 1;
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(16.875rem, 28%) 1fr minmax(15.625rem, 26%);
  gap: clamp(0.625rem, 1.2vw, 1rem);
  align-items: stretch;
  overflow: hidden;
}

@media (max-width: 1080px) {
  .tower-hub-layout {
    grid-template-columns: 1fr 1fr;
    overflow-y: auto;
  }
  .tower-squad-shop-panel {
    grid-column: span 2;
  }
}

@media (max-width: 780px) {
  .tower-hub-layout {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
  .tower-squad-shop-panel {
    grid-column: span 1;
  }
}

.tower-squad-shop-panel {
  display: flex;
  flex-direction: column;
  gap: clamp(0.5rem, 1.2dvh, 0.75rem);
  height: 100%;
  min-height: 0;
  overflow-y: auto;
}

.squad-status-box {
  padding: clamp(0.625rem, 1.4dvh, 0.875rem);
  flex-shrink: 0;
}

/* Mochila de Itens da Run (Embaixo do Esquadrão Ativo) */
.backpack-status-box {
  padding: clamp(0.625rem, 1.4dvh, 0.875rem);
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow: hidden;
}

.backpack-count-tag {
  font-family: var(--font-pixel-ui);
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--color-gold);
  background: rgba(245, 158, 11, 0.15);
  border: 0.0625rem solid rgba(245, 158, 11, 0.4);
  padding: 0.125rem 0.4375rem;
  border-radius: 0.25rem;
}

.tower-backpack-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.375rem;
  flex: 1;
  overflow-y: auto;
  align-content: start;
  padding-right: 0.125rem;
}

.backpack-slot {
  background: #0f172a;
  border: 0.125rem solid #233352;
  border-radius: 0.4375rem;
  padding: 0.375rem 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.14s ease;
  position: relative;
  min-height: 3rem;
}

.backpack-slot.has-item {
  background: #141f36;
  border-color: #2e436d;
}

.backpack-slot.has-item:hover {
  border-color: var(--color-blue);
  background: #1a2a4a;
  transform: translateY(-0.0625rem);
}

.backpack-slot.empty {
  border: 0.125rem dashed #1e293b;
  background: rgba(15, 23, 42, 0.4);
  opacity: 0.65;
  justify-content: center;
}

.backpack-slot-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.backpack-slot-info {
  display: flex;
  flex-direction: column;
  gap: 0.0625rem;
  min-width: 0;
  flex: 1;
}

.backpack-slot-name {
  font-family: var(--font-pixel-ui);
  font-size: 0.72rem;
  font-weight: 800;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.backpack-slot-qty {
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--color-gold);
}

.backpack-slot-empty-text {
  font-family: var(--font-pixel-ui);
  font-size: 0.68rem;
  color: #475569;
  letter-spacing: 0.03125rem;
}

/* Abas da Mochila: Itens vs Insígnias */
.backpack-tabs-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.375rem;
  flex-shrink: 0;
}

.backpack-tab-btn {
  font-family: var(--font-pixel-ui);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.3125rem 0.5rem;
  border-radius: 0.375rem;
  border: 0.125rem solid #233352;
  background: #0f172a;
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  transition: all 0.14s ease;
}

.backpack-tab-btn:hover {
  background: #16223b;
  color: #e2e8f0;
}

.backpack-tab-btn.active {
  background: #172554;
  border-color: var(--color-gold);
  color: var(--color-gold);
  box-shadow: 0 0.125rem 0 #78350f;
}

.bp-tab-badge-count {
  font-size: 0.62rem;
  background: rgba(251, 191, 36, 0.16);
  color: var(--color-gold);
  padding: 0.0625rem 0.3125rem;
  border-radius: 0.25rem;
  font-weight: 900;
}

.backpack-tab-pane {
  display: none;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  gap: 0.375rem;
  overflow: hidden;
}

.backpack-tab-pane.active {
  display: flex;
}

/* Grade de 10 Quadradinhos das Insígnias (5x2) */
.tower-badges-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.4375rem;
  padding: 0.125rem;
  align-content: start;
}

.badge-slot-square {
  aspect-ratio: 1 / 1;
  background: #0b1324;
  border: 0.125rem solid #1e2d4a;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  padding: 0.375rem;
  box-sizing: border-box;
}

.badge-slot-square.locked {
  border: 0.125rem dashed #1e293b;
  background: rgba(11, 18, 34, 0.55);
}

.badge-slot-square.locked .badge-svg-wrap {
  opacity: 0.16;
  filter: grayscale(1);
}

.badge-slot-square.unlocked {
  background: radial-gradient(circle at 50% 50%, var(--badge-glow-soft, rgba(251, 191, 36, 0.2)) 0%, #0d1629 76%);
  border-color: var(--badge-border, rgba(251, 191, 36, 0.55));
  box-shadow:
    0 0 0.4375rem var(--badge-shadow, rgba(251, 191, 36, 0.18)),
    inset 0 0 0.375rem var(--badge-inner, rgba(251, 191, 36, 0.14));
}

.badge-slot-square:hover {
  transform: translateY(-0.125rem);
}

.badge-slot-square.unlocked:hover {
  box-shadow:
    0 0 0.625rem var(--badge-shadow-hover, rgba(251, 191, 36, 0.32)),
    inset 0 0 0.5rem var(--badge-inner, rgba(251, 191, 36, 0.22));
}

.badge-svg-wrap {
  width: 82%;
  height: 82%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.16s ease;
}

.badge-slot-square.unlocked .badge-svg-wrap {
  filter: drop-shadow(0 0 0.1875rem var(--badge-shadow, rgba(251, 191, 36, 0.35)));
}

.badge-slot-square.unlocked:hover .badge-svg-wrap {
  transform: scale(1.08);
}

.badge-svg-wrap svg {
  width: 100%;
  height: 100%;
  display: block;
}

.badge-floor-pip {
  position: absolute;
  bottom: 0.125rem;
  right: 0.25rem;
  font-family: var(--font-pixel-ui);
  font-size: 0.52rem;
  font-weight: 800;
  color: #475569;
  pointer-events: none;
  line-height: 1;
}

.badge-slot-square.unlocked .badge-floor-pip {
  color: #f8fafc;
  text-shadow: 0 0.0625rem 0.125rem rgba(0, 0, 0, 0.9);
}

.badge-inspector-bar {
  background: rgba(15, 23, 42, 0.75);
  border: 0.0625rem solid #1e2d4a;
  border-radius: 0.375rem;
  padding: 0.3125rem 0.5rem;
  font-family: var(--font-pixel-ui);
  font-size: 0.67rem;
  color: #cbd5e1;
  line-height: 1.3;
  min-height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Destaque de Nova Insígnia Conquistada no Modal de Vitória */
.victory-badge-unlock-card {
  margin-top: 0.625rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  border: 0.125rem solid var(--badge-border, #fbbf24);
  background: radial-gradient(circle at 20% 50%, var(--badge-glow-soft, rgba(251, 191, 36, 0.22)) 0%, rgba(15, 23, 42, 0.92) 80%);
  box-shadow: 0 0 0.625rem var(--badge-shadow, rgba(251, 191, 36, 0.22));
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-align: left;
}

.victory-badge-unlock-icon {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
}

.victory-badge-unlock-icon svg {
  width: 100%;
  height: 100%;
}

.victory-badge-unlock-info {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.victory-badge-unlock-tag {
  font-family: var(--font-pixel-title);
  font-size: 0.56rem;
  color: #fde047;
  letter-spacing: 0.03125rem;
}

.victory-badge-unlock-name {
  font-family: var(--font-pixel-ui);
  font-size: 0.84rem;
  font-weight: 900;
  color: #ffffff;
}

.tower-map-panel {
  padding: clamp(0.5rem, 1.1dvh, 0.8125rem);
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.tower-challenger-panel {
  padding: clamp(0.625rem, 1.4dvh, 1rem);
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
}

.panel-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 0.625rem;
}

.tower-map-header-row {
  flex-wrap: nowrap;
  gap: 0.5rem;
  margin-bottom: 0.4375rem;
  flex-shrink: 0;
}

.panel-title {
  font-family: var(--font-pixel-ui);
  font-size: 1rem;
  font-weight: 800;
  color: var(--color-gold);
}

.tower-map-title-horizontal {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.84rem;
  white-space: nowrap;
  margin: 0;
  line-height: 1.1;
}

.panel-subtitle {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.select-sector-compact {
  background: var(--bg-card);
  border: 0.0625rem solid var(--border-pixel);
  color: var(--color-blue);
  font-size: 0.66rem;
  font-weight: 700;
  padding: 0.1875rem 0.375rem;
  border-radius: 0.3125rem;
  cursor: pointer;
  flex-shrink: 0;
  max-width: 7.625rem;
}

.tower-overall-progress {
  background: #0b1120;
  border: 0.0625rem solid var(--border-pixel);
  border-radius: 0.5rem;
  padding: 0.375rem 0.5625rem;
  margin-bottom: 0.4375rem;
  flex-shrink: 0;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 0.25rem;
}

.progress-track-outer {
  height: 0.375rem;
  background: #1e293b;
  border-radius: 0.25rem;
  overflow: hidden;
}

.progress-track-fill {
  height: 100%;
  width: 100%;
  transform: scaleX(0.01);
  transform-origin: left center;
  transition: transform 0.3s ease-out;
  background: linear-gradient(90deg, #38bdf8, #fbbf24, #ef4444);
}

.tower-floors-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding-right: 0;
}

.floor-node-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 0.0625rem solid var(--border-pixel);
  border-radius: 0.375rem;
  padding: 0.125rem 0.5rem;
  flex: 1;
  min-height: 0;
  cursor: pointer;
  transition: all 0.15s;
}

.floor-node-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--color-blue);
}

.floor-node-item.current-floor {
  background: rgba(239, 68, 68, 0.16);
  border-color: #ef4444;
}

.floor-node-item.cleared-floor {
  background: rgba(30, 41, 59, 0.45);
  border-color: #334155;
  opacity: 0.60;
  filter: grayscale(0.9);
  transition: opacity 0.15s ease, filter 0.15s ease, background 0.15s ease;
}

.floor-node-item.cleared-floor:hover {
  opacity: 0.90;
  filter: grayscale(0.2);
  background: rgba(51, 65, 85, 0.55);
}

.floor-node-item.cleared-floor .floor-num-badge {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
}

.floor-node-item.cleared-floor .floor-trainer-name {
  color: #94a3b8;
}

.floor-node-item.inspected-floor {
  outline: 0.125rem solid var(--color-gold);
  outline-offset: -0.125rem;
}

.floor-node-left {
  display: flex;
  align-items: center;
  gap: 0.4375rem;
  min-width: 0;
}

.floor-num-badge {
  min-width: 2.25rem;
  text-align: center;
  font-family: var(--font-pixel-ui);
  font-size: 0.74rem;
  font-weight: 800;
  padding: 0.125rem 0.25rem;
  border-radius: 0.3125rem;
  background: rgba(255, 255, 255, 0.07);
  flex-shrink: 0;
}

.floor-trainer-name {
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.floor-node-info { min-width: 0; }
.floor-trainer-heading { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem .375rem; min-width: 0; }
.floor-trainer-heading .floor-trainer-name { min-width: 0; }
.floor-trainer-level { display: inline-flex; flex-shrink: 0; align-items: center; padding: .125rem .3125rem; border: .0625rem solid #38bdf84d; border-radius: .3125rem; color: #7dd3fc; background: #0c4a6e55; font: 800 .6rem/1.15 var(--font-pixel-ui); font-variant-numeric: tabular-nums; white-space: nowrap; }
.floor-trainer-level.special-level { color: #d8b4fe; border-color: #a855f766; background: #581c8740; }
.floor-trainer-level.leader-level { color: #fde68a; border-color: #fbbf2466; background: #78350f55; }

.floor-trainer-sub {
  font-size: 0.64rem;
  color: var(--text-muted);
  line-height: 1.1;
}

.floor-status-tag {
  font-size: 0.62rem;
  font-weight: 800;
  padding: 0.125rem 0.3125rem;
  border-radius: 0.25rem;
  flex-shrink: 0;
}

.floor-status-tag.done { background: rgba(71, 85, 105, 0.4); color: #94a3b8; border: 0.0625rem solid #475569; }
.floor-status-tag.now { background: #ef4444; color: white; }
.floor-status-tag.boss { background: rgba(251, 191, 36, 0.2); color: #fbbf24; }

/* Cartão do Desafiante */
.challenger-card {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.challenger-sector-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border-radius: 0.4375rem;
  background: #172554;
  border: 0.0625rem solid #3b82f6;
  font-family: var(--font-pixel-ui);
  font-size: 0.84rem;
  font-weight: 700;
}

.rank-pill {
  background: #ef4444;
  color: white;
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.7rem;
  font-weight: 800;
}

.challenger-profile {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.trainer-avatar-frame {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 0.625rem;
  background: #0b1120;
  border: 0.125rem solid var(--color-gold);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  flex-shrink: 0;
}

.trainer-avatar-frame img {
  width: 5rem;
  height: 5rem;
  object-fit: contain;
  image-rendering: pixelated;
}

.challenger-floor-label {
  font-family: var(--font-pixel-ui);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-gold);
}

.challenger-name {
  font-family: var(--font-pixel-ui);
  font-size: 1.5rem;
  font-weight: 800;
}

.challenger-title {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.challenger-quote {
  background: #0b1120;
  border-left: 0.25rem solid var(--color-gold);
  padding: 0.625rem 0.75rem;
  border-radius: 0 0.5rem 0.5rem 0;
  font-size: 0.84rem;
  font-style: italic;
  color: #cbd5e1;
}

.section-mini-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.challenger-team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(6.5625rem, 1fr));
  gap: 0.5rem;
}

.enemy-preview-poke {
  background: var(--bg-card);
  border: 0.0625rem solid var(--border-pixel);
  border-radius: 0.5rem;
  padding: 0.5rem 0.375rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.enemy-preview-poke:hover {
  border-color: var(--color-gold);
}

.enemy-preview-poke.enemy-poke-unknown {
  background: rgba(15, 23, 42, 0.75);
  border: 0.0625rem dashed rgba(251, 191, 36, 0.4);
  cursor: help;
}

.enemy-preview-poke.enemy-poke-unknown:hover {
  border-color: var(--color-gold);
  background: rgba(24, 34, 56, 0.9);
  box-shadow: 0 0 0.75rem rgba(251, 191, 36, 0.2);
}

.mystery-poke-box {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.375rem;
  background: rgba(0, 0, 0, 0.35);
  border: 0.0625rem solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mystery-q-mark {
  font-family: var(--font-pixel-ui);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--color-gold);
  text-shadow: 0 0 0.5rem rgba(251, 191, 36, 0.5);
  user-select: none;
}

.mystery-hint-tag {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.0625rem 0.375rem;
  border-radius: 0.25rem;
}

.enemy-preview-poke > img {
  width: 3.5rem;
  height: 3.5rem;
  object-fit: contain;
  image-rendering: pixelated;
}

.enemy-preview-poke .ep-name {
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: capitalize;
  margin-top: 0.1875rem;
}

.enemy-preview-poke .ep-bst {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.challenger-rewards-row {
  display: flex;
  gap: 0.625rem;
}

.reward-tag {
  flex: 1;
  background: #0b1120;
  border: 0.0625rem solid var(--border-pixel);
  border-radius: 0.5rem;
  padding: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

.reward-tag strong {
  color: var(--color-gold);
}

.challenger-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.btn-tower-fight {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-inline: auto;
  font-family: var(--font-pixel-ui);
  width: 100%;
  background: linear-gradient(180deg, #ef4444 0%, #b91c1c 100%);
  color: white;
  border: 0.125rem solid #fca5a5;
  padding: 0.8125rem;
  border-radius: 0.5rem;
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 0.25rem 0 #7f1d1d;
  transition: transform .18s ease, box-shadow .2s ease, border-color .2s ease, filter .2s ease;
}

.btn-tower-fight:hover {
  transform: translateY(-0.0625rem);
  filter: brightness(1.08);
  border-color: #fde68a;
  box-shadow: 0 .25rem 0 #7f1d1d, 0 0 1rem #fb923c88, 0 0 2rem #ef444444, inset 0 0 .75rem #fbbf2422;
}

.btn-tower-fight:active { transform: translateY(.1875rem) scale(.985); box-shadow: 0 .0625rem 0 #7f1d1d, 0 0 .75rem #fbbf2488; }
.btn-tower-fight:focus-visible { outline: .125rem solid #fde68a; outline-offset: .25rem; }
.tower-fight-label { position: relative; z-index: 1; font: inherit; line-height: 1.25; }
.tower-fight-label > span { font: inherit; }
.tower-fight-label small { display: block; margin-top: .25rem; color: #ffe6bb; font-size: .62rem; letter-spacing: .075em; font-weight: 700; }
.tower-fight-sparks { position: absolute; inset: 0; pointer-events: none; border-radius: inherit; }
.tower-fight-sparks i { position: absolute; bottom: 10%; left: var(--spark-left); width: .1875rem; height: .1875rem; background: #fde68a; box-shadow: 0 0 .35rem #fbbf24; opacity: 0; animation: towerButtonSpark 2.6s ease-out infinite; animation-delay: var(--spark-delay); }
.tower-fight-sparks i:nth-child(1) { --spark-left: 8%; --spark-delay: 0s; --spark-drift: -.5rem; }
.tower-fight-sparks i:nth-child(2) { --spark-left: 24%; --spark-delay: -.7s; --spark-drift: .25rem; }
.tower-fight-sparks i:nth-child(3) { --spark-left: 42%; --spark-delay: -1.8s; --spark-drift: -.25rem; }
.tower-fight-sparks i:nth-child(4) { --spark-left: 64%; --spark-delay: -.3s; --spark-drift: .5rem; }
.tower-fight-sparks i:nth-child(5) { --spark-left: 81%; --spark-delay: -1.4s; --spark-drift: -.375rem; }
.tower-fight-sparks i:nth-child(6) { --spark-left: 94%; --spark-delay: -2.1s; --spark-drift: .375rem; }
@keyframes towerButtonSpark { 0%, 15% { opacity: 0; transform: translate3d(0, 0, 0) scale(.5); } 30% { opacity: .9; } 85%, 100% { opacity: 0; transform: translate3d(var(--spark-drift), -3rem, 0) scale(.15); } }
@media (prefers-reduced-motion: reduce) { .tower-fight-sparks i { animation: none; } .btn-tower-fight { transition: none; } }

.challenger-sub-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.btn-sub-tower {
  background: var(--bg-card);
  border: 0.0625rem solid var(--border-pixel);
  color: #e2e8f0;
  padding: 0.5625rem;
  border-radius: 0.4375rem;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.tower-squad-shop-panel {
  display: flex;
  flex-direction: column;
  gap: clamp(0.5rem, 1.2dvh, 0.875rem);
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.btn-pokecenter {
  background: rgba(16, 185, 129, 0.16);
  border: 0.0625rem solid #10b981;
  color: #34d399;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.3125rem 0.5625rem;
  border-radius: 0.375rem;
  cursor: pointer;
}

.lobby-squad-list {
  display: flex;
  flex-direction: column;
  gap: 0.4375rem;
}

.lobby-squad-card {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  background: var(--bg-card);
  border: 0.0625rem solid var(--border-pixel);
  border-radius: 0.5rem;
  padding: 0.4375rem 0.625rem;
}

.lobby-squad-card img {
  width: 2.75rem;
  height: 2.75rem;
  object-fit: contain;
  image-rendering: pixelated;
}

.lsc-info {
  flex: 1;
}

.lsc-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.1875rem;
}

.lsc-name {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.lsc-lvl {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--color-gold);
}

.lsc-hp-bar {
  height: 0.375rem;
  background: #0b1120;
  border-radius: 0.1875rem;
  overflow: hidden;
  margin-bottom: 0.1875rem;
}

.lsc-hp-fill {
  height: 100%;
  background: #10b981;
}

.lsc-hp-text {
  font-size: 0.68rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

.shop-tab-headers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.375rem;
  margin-bottom: 0.625rem;
  flex-shrink: 0;
}

.shop-tab-btn {
  background: var(--bg-card);
  border: 0.0625rem solid var(--border-pixel);
  color: var(--text-muted);
  padding: 0.4375rem;
  border-radius: 0.375rem;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.shop-tab-btn.active {
  background: #172554;
  border-color: var(--color-gold);
  color: var(--color-gold);
}

.shop-tab-content {
  display: none;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.shop-tab-content.active {
  display: flex;
  flex-direction: column;
}

.shop-items-list {
  display: flex;
  flex-direction: column;
  gap: 0.4375rem;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.shop-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: var(--bg-card);
  border: 0.0625rem solid var(--border-pixel);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  min-height: 4rem;
  max-height: 4rem;
  box-sizing: border-box;
  transition: all 0.12s ease;
}

.shop-item-row:hover {
  border-color: #3b82f6;
  background: #1e2c47;
}

.shop-item-left {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex: 1;
  min-width: 0;
}

.shop-item-icon {
  font-size: 1.35rem;
  flex-shrink: 0;
}

.shop-item-title {
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shop-item-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 16.25rem;
}

.shop-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 0.125rem;
  min-width: 5.9375rem;
  flex-shrink: 0;
}

.owned-qty-badge {
  font-size: 0.65rem;
  color: var(--color-blue);
  font-weight: 700;
}

.btn-buy-shop {
  background: rgba(251, 191, 36, 0.18);
  border: 0.0625rem solid var(--color-gold);
  color: var(--color-gold);
  padding: 0.25rem 0.5625rem;
  border-radius: 0.3125rem;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

.btn-buy-shop.bp-btn {
  background: rgba(168, 85, 247, 0.18);
  border-color: #a855f7;
  color: #c084fc;
}

.btn-buy-shop:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ========================================================
   TELA 2: CRIAÇÃO DE ESQUADRÃO CLEAN E OTIMIZADA (#squadScreen)
======================================================== */
#squadScreen {
  gap: clamp(0.375rem, 1dvh, 0.625rem);
}

/* ========================================================
   SQUAD SCREEN: LAYOUT DIVIDIDO (ESQUERDA PICKER | DIREITA 3 RETÂNGULOS)
======================================================== */
.squad-split-layout {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 0.75rem;
  flex: 1;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

@media (max-width: 960px) {
  .squad-split-layout {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
}

.squad-left-picker {
  padding: 0.625rem 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.picker-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.picker-panel-title {
  font-family: var(--font-pixel-ui);
  font-size: 0.92rem;
  font-weight: 800;
  color: #f8fafc;
}

.squad-right-slots-col {
  padding: 0.625rem 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.squad-right-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.squad-right-title {
  font-family: var(--font-pixel-ui);
  font-size: 0.78rem;
  font-weight: 700;
  color: #94a3b8;
}

.squad-right-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.btn-pixel-secondary {
  font-family: var(--font-pixel-ui);
  background: #1e293b;
  border: 0.125rem solid #475569;
  color: #f8fafc;
  padding: 0.375rem 0.75rem;
  border-radius: 0.4375rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.12s;
}

.btn-pixel-secondary:hover {
  border-color: var(--color-blue);
}

.btn-pixel-primary {
  font-family: var(--font-pixel-ui);
  background: linear-gradient(180deg, #ef4444 0%, #b91c1c 100%);
  border: 0.125rem solid #fca5a5;
  color: white;
  padding: 0.375rem 0.875rem;
  border-radius: 0.4375rem;
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 0.1875rem 0 #7f1d1d;
  transition: all 0.12s;
}

.btn-pixel-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-0.0625rem);
}

.squad-vertical-slots-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.125rem;
}

/* O Retângulo Vertical de Cada Slot - Preenche o espaço uniformemente (sem espaço vazio abaixo) */
.squad-slot-rect {
  background: #0b1120;
  border: 0.125rem solid #263554;
  border-radius: 0.5625rem;
  padding: 0.5rem 0.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.375rem;
  cursor: pointer;
  transition: all 0.14s ease;
  flex: 1; /* Preenche o espaço vertical uniformemente */
  min-height: 7rem;
}

.squad-slot-rect:hover {
  border-color: #475569;
}

.squad-slot-rect.active-slot {
  background: #121e38;
  border-color: var(--color-gold);
  box-shadow: 0 0 0.875rem rgba(251, 191, 36, 0.22);
}

.squad-slot-rect.locked-slot {
  border-color: #ef4444;
}

.slot-rect-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 0.0625rem dashed rgba(255, 255, 255, 0.08);
  padding-bottom: 0.1875rem;
  flex-shrink: 0;
}

.slot-rect-tag {
  font-family: var(--font-pixel-title);
  font-size: 0.6rem;
  color: var(--color-gold);
  letter-spacing: 0.0625rem;
}

.active-slot-pill {
  font-family: var(--font-pixel-ui);
  font-size: 0.65rem;
  font-weight: 800;
  color: #10b981;
  background: rgba(16, 185, 129, 0.15);
  padding: 0.0625rem 0.375rem;
  border-radius: 0.25rem;
}

.slot-rect-main {
  display: grid;
  grid-template-columns: 13.75rem 1fr;
  gap: 0.75rem;
  align-items: center;
  flex: 1;
}

.slot-poke-profile {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 0;
}

.slot-poke-img {
  width: 3rem;
  height: 3rem;
  object-fit: contain;
  image-rendering: pixelated;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 0.4375rem;
  padding: 0.125rem;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.12s;
}

.slot-poke-img:hover {
  transform: scale(1.08);
}

.slot-poke-meta {
  display: flex;
  flex-direction: column;
  gap: 0.1875rem;
  min-width: 0;
  flex: 1;
}

.slot-name-row {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-wrap: nowrap;
}

.slot-poke-name {
  font-family: var(--font-pixel-ui);
  font-size: 0.86rem;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
  letter-spacing: 0.03125rem;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 7.1875rem;
}

.slot-poke-lvl {
  font-size: 0.68rem;
  color: var(--color-gold);
  font-weight: 700;
  flex-shrink: 0;
}

.slot-types-row {
  display: flex;
  gap: 0.1875rem;
  flex-wrap: wrap;
}


.slot-quick-btns {
  display: flex;
  gap: 0.25rem;
  margin-top: 0.0625rem;
}

.btn-slot-mini {
  background: #1e293b;
  border: 0.0625rem solid #334155;
  color: #cbd5e1;
  font-size: 0.64rem;
  padding: 0.0625rem 0.3125rem;
  border-radius: 0.25rem;
  cursor: pointer;
}

.btn-slot-mini.shiny-active {
  background: rgba(251, 191, 36, 0.2);
  border-color: var(--color-gold);
  color: var(--color-gold);
}

/* Área dos 4 Golpes dentro do Retângulo */
.slot-moves-section {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  justify-content: center;
  height: 100%;
}

.slot-moves-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.3125rem;
}

.slot-move-card {
  background: #141d30;
  border: 0.0625rem solid #283756;
  border-radius: 0.375rem;
  padding: 0.25rem 0.4375rem;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  transition: all 0.12s ease;
  cursor: pointer;
}

.slot-move-card:hover {
  border-color: #38bdf8;
  background: #1a2742;
  box-shadow: 0 0 0.625rem rgba(56, 189, 248, 0.25);
}

.move-card-top {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.move-type-pill {
  font-size: 0.54rem;
  font-weight: 800;
  color: white;
  padding: 0.0625rem 0.3125rem;
  border-radius: 0.1875rem;
  text-transform: uppercase;
  flex-shrink: 0;
}

.btn-select-move,
.btn-cycle-move {
  background: rgba(56, 189, 248, 0.14);
  border: 0.0625rem solid #38bdf8;
  color: #38bdf8;
  border-radius: 0.25rem;
  padding: 0.125rem 0.375rem;
  display: inline-flex;
  align-items: center;
  gap: 0.1875rem;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 700;
  transition: all 0.12s;
  flex: 1;
  min-width: 0;
  justify-content: space-between;
}

.btn-select-move:hover,
.btn-cycle-move:hover {
  background: #38bdf8;
  color: #0b1120;
}

.move-name-txt {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.7rem;
}

.move-arrow-icon {
  font-size: 0.65rem;
  flex-shrink: 0;
  transition: transform 0.12s;
}

.btn-select-move:hover .move-arrow-icon,
.slot-move-card:hover .move-arrow-icon {
  transform: translateX(0.125rem);
}

.move-card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.58rem;
  color: var(--text-muted);
}

/* Modal de Seleção de Ataque (Move Picker) */
.move-picker-dialog {
  max-width: 42.5rem;
  width: 95%;
  max-height: 86dvh;
  display: flex;
  flex-direction: column;
  background: #0d1526;
  border: 0.1875rem solid #f59e0b;
  border-radius: 0.75rem;
  box-shadow: 0 0 2rem rgba(245, 158, 11, 0.35);
  overflow: hidden;
}

.move-picker-current-bar {
  background: rgba(15, 23, 42, 0.9);
  border-bottom: 0.0625rem solid #1e293b;
  padding: 0.5rem 1rem;
  font-size: 0.78rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #94a3b8;
  flex-shrink: 0;
}

.move-picker-current-bar strong {
  color: var(--color-gold);
}

.move-picker-filter-tabs {
  display: flex;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  border-bottom: 0.0625rem solid #1e293b;
  background: #0a0f1d;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.mp-tab {
  font-family: var(--font-pixel-ui);
  background: #141d30;
  border: 0.0625rem solid #283756;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.625rem;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.12s;
}

.mp-tab:hover {
  border-color: #38bdf8;
  color: #f8fafc;
}

.mp-tab.active {
  background: #2563eb;
  border-color: #60a5fa;
  color: #ffffff;
  box-shadow: 0 0 0.625rem rgba(37, 99, 235, 0.4);
}

.move-picker-body {
  padding: 0.75rem 1rem;
  overflow-y: auto;
  max-height: 56dvh;
  flex: 1;
  min-height: 0;
}

.move-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17.5rem, 1fr));
  gap: 0.5rem;
}

.move-picker-card {
  background: #121c32;
  border: 0.125rem solid #223252;
  border-radius: 0.5rem;
  padding: 0.5rem 0.625rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  cursor: pointer;
  transition: all 0.14s ease;
  position: relative;
}

.move-picker-card:hover {
  border-color: #38bdf8;
  background: #172646;
  transform: translateY(-0.0625rem);
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.4);
}

.move-picker-card.is-current {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  cursor: default;
}

.move-picker-card.is-equipped-elsewhere {
  border-color: #64748b;
  opacity: 0.8;
}

.mp-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mp-card-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.mp-move-name {
  font-family: var(--font-pixel-ui);
  font-size: 0.86rem;
  font-weight: 800;
  color: #f8fafc;
}

.mp-category-pill {
  font-size: 0.58rem;
  padding: 0.0625rem 0.3125rem;
  border-radius: 0.25rem;
  font-weight: 700;
  text-transform: uppercase;
  background: #1e293b;
  color: #94a3b8;
  border: 0.0625rem solid #334155;
}

.mp-card-stats {
  display: flex;
  gap: 0.625rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #cbd5e1;
}

.mp-stat-power {
  color: #f59e0b;
}

.mp-card-desc {
  font-size: 0.68rem;
  color: #94a3b8;
  line-height: 1.3;
}

.mp-card-action {
  margin-top: 0.125rem;
  display: flex;
  justify-content: flex-end;
}

.btn-equip-move {
  font-family: var(--font-pixel-ui);
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  border: 0.0625rem solid #60a5fa;
  color: white;
  border-radius: 0.3125rem;
  padding: 0.1875rem 0.625rem;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.12s;
}

.btn-equip-move:hover {
  filter: brightness(1.15);
  box-shadow: 0 0 0.625rem rgba(59, 130, 246, 0.5);
}

.mp-status-tag {
  font-size: 0.64rem;
  font-weight: 800;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
}

.mp-status-tag.current {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 0.0625rem solid #10b981;
}

.mp-status-tag.elsewhere {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 0.0625rem solid #f59e0b;
}

/* Sinergia do Trio - Barra Fixa e Dividida 50/50 com Navegacao por Seta e Alinhamento Perfeito */
.squad-synergy-strip {
  height: 3rem;
  min-height: 3rem;
  max-height: 3rem;
  box-sizing: border-box;
  background: rgba(11, 17, 32, 0.95);
  border: 0.0625rem solid #263554;
  border-radius: 0.625rem;
  padding: 0 0.625rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.625rem;
  flex-shrink: 0;
  overflow: hidden;
  user-select: none;
  box-shadow: inset 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.5);
}

.synergy-col {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.synergy-col-forte {
  min-width: 0;
}

.synergy-col-fraco {
  min-width: 0;
}

.synergy-divider {
  width: 0.0625rem;
  height: 1.625rem;
  background: rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
  align-self: center;
}

.synergy-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3125rem;
  height: 1.625rem;
  padding: 0 0.5rem;
  border-radius: 0.375rem;
  font-family: var(--font-pixel-ui);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.03125rem;
  line-height: 1;
  flex-shrink: 0;
  white-space: nowrap;
  box-sizing: border-box;
}

.synergy-badge-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  line-height: 1;
}

.synergy-badge-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.forte-badge {
  background: rgba(16, 185, 129, 0.15);
  border: 0.0625rem solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.fraco-badge {
  background: rgba(239, 68, 68, 0.15);
  border: 0.0625rem solid rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.fraco-badge.is-safe {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
  color: #38bdf8;
}

.synergy-icons-track {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  overflow-x: auto;
  overflow-y: hidden;
  min-width: 0;
  flex: 1;
  height: 100%;
  padding: 0 0.125rem;
  box-sizing: border-box;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.synergy-icons-track::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.synergy-emoji-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.625rem;
  height: 1.625rem;
  min-width: 1.625rem;
  border-radius: 0.375rem;
  background: rgba(255, 255, 255, 0.05);
  border: 0.0625rem solid var(--chip-color, rgba(255, 255, 255, 0.2));
  font-size: 0.85rem;
  line-height: 1;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  position: relative;
}

.synergy-emoji-chip:hover {
  transform: translateY(-0.125rem) scale(1.15);
  box-shadow: 0 0 0.5rem var(--chip-color, rgba(255, 255, 255, 0.4));
  filter: brightness(1.2);
  z-index: 2;
}

.synergy-emoji-chip.danger-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 2.625rem;
  height: 1.625rem;
  padding: 0 0.375rem;
  gap: 0.1875rem;
  box-sizing: border-box;
  background: rgba(239, 68, 68, 0.18);
  border: 0.0625rem solid #ef4444;
  animation: dangerPulse 2.5s infinite;
  cursor: pointer;
}

.danger-chip .chip-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 900;
  line-height: 1;
  color: #fca5a5;
  background: rgba(0, 0, 0, 0.45);
  padding: 0.0625rem 0.25rem;
  border-radius: 0.1875rem;
  font-family: monospace;
}

@keyframes dangerPulse {
  0%, 100% { border-color: #ef4444; box-shadow: 0 0 0 rgba(239, 68, 68, 0); }
  50% { border-color: #f87171; box-shadow: 0 0 0.375rem rgba(239, 68, 68, 0.4); }
}

.synergy-safe-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3125rem;
  height: 1.625rem;
  padding: 0 0.5rem;
  border-radius: 0.375rem;
  box-sizing: border-box;
  background: rgba(16, 185, 129, 0.12);
  border: 0.0625rem solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  font-family: var(--font-pixel-ui);
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
  letter-spacing: 0.03125rem;
  line-height: 1;
  cursor: help;
}

.synergy-safe-badge .safe-icon,
.synergy-safe-badge .safe-txt,
.synergy-safe-badge .safe-sparkle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.synergy-empty-txt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 1.625rem;
  line-height: 1;
  color: #64748b;
  font-size: 0.72rem;
  padding: 0 0.25rem;
}

.btn-synergy-scroll {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.375rem;
  height: 1.625rem;
  min-width: 1.375rem;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  border-radius: 0.375rem;
  background: rgba(30, 41, 59, 0.85);
  border: 0.0625rem solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  font-size: 0.65rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
  user-select: none;
  line-height: 1;
}

.btn-synergy-scroll:hover {
  background: rgba(51, 65, 85, 0.95);
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.08);
}

.btn-synergy-scroll:active {
  transform: scale(0.92);
}

.synergy-col-forte .btn-synergy-scroll:hover {
  border-color: #10b981;
  color: #34d399;
  box-shadow: 0 0 0.375rem rgba(16, 185, 129, 0.4);
}

.synergy-col-fraco .btn-synergy-scroll:hover {
  border-color: #ef4444;
  color: #f87171;
  box-shadow: 0 0 0.375rem rgba(239, 68, 68, 0.4);
}

/* Popup Pequeno Flutuante de Sinergia (Vantagens e Desvantagens) */
.synergy-mini-tooltip {
  position: fixed;
  z-index: 10000;
  pointer-events: none;
  width: max-content;
  max-width: 15.625rem;
  min-width: 10.625rem;
  background: rgba(10, 16, 30, 0.98);
  border: 0.0625rem solid var(--smp-border, #3b82f6);
  border-radius: 0.5rem;
  padding: 0.5rem 0.625rem;
  box-shadow: 0 0.625rem 1.5625rem rgba(0, 0, 0, 0.85), 0 0 0.75rem rgba(0, 0, 0, 0.6);
  color: #e2e8f0;
  font-family: var(--font-main, sans-serif);
  font-size: 0.74rem;
  line-height: 1.35;
  user-select: none;
  box-sizing: border-box;
  animation: smpFadeIn 0.1s ease-out;
}

@keyframes smpFadeIn {
  from { opacity: 0; transform: scale(0.95) translateY(0.125rem); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.smp-header {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-bottom: 0.3125rem;
  padding-bottom: 0.25rem;
  border-bottom: 0.0625rem solid rgba(255, 255, 255, 0.1);
}

.smp-icon {
  font-size: 1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.smp-title {
  font-family: var(--font-pixel-ui, monospace);
  font-weight: 800;
  font-size: 0.78rem;
  color: #ffffff;
  letter-spacing: 0.03125rem;
  line-height: 1;
}

.smp-badge {
  margin-left: auto;
  font-size: 0.58rem;
  font-weight: 800;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  white-space: nowrap;
  line-height: 1;
  letter-spacing: 0.01875rem;
}

.smp-badge.advantage {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 0.0625rem solid rgba(16, 185, 129, 0.45);
}

.smp-badge.danger {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 0.0625rem solid rgba(239, 68, 68, 0.45);
}

.smp-badge.safe {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border: 0.0625rem solid rgba(56, 189, 248, 0.45);
}

.smp-badge.nav {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
  border: 0.0625rem solid rgba(148, 163, 184, 0.3);
}

.smp-desc {
  color: #cbd5e1;
  font-size: 0.72rem;
  line-height: 1.35;
}

.smp-desc strong {
  color: #f8fafc;
}

.smp-extra {
  margin-top: 0.3125rem;
  padding-top: 0.25rem;
  border-top: 0.0625rem dashed rgba(255, 255, 255, 0.1);
  font-size: 0.67rem;
  color: #94a3b8;
  line-height: 1.3;
}

.smp-extra .extra-highlight {
  color: #fbbf24;
  font-weight: 700;
}

.clean-picker-panel,
.pokedex-clean-wrapper {
  padding: clamp(0.875rem, 2dvh, 1.375rem) 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: clamp(0.625rem, 1.4dvh, 1rem);
  flex: 1;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.pokedex-header-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.125rem;
  flex-shrink: 0;
}

.pokedex-title-row {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.clean-section-title {
  font-family: var(--font-pixel-ui);
  font-size: 1.65rem;
  font-weight: 900;
  color: var(--color-gold);
  margin: 0;
  letter-spacing: 0.0625rem;
  line-height: 1.1;
}

.clean-filter-bar {
  display: flex;
  gap: 0.625rem;
  flex-wrap: wrap;
  flex-shrink: 0;
  margin-bottom: 0.125rem;
}

.search-input-wrapper {
  flex: 2;
  min-width: 13.75rem;
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  font-size: 0.9rem;
  pointer-events: none;
}

.search-bar-modern {
  width: 100%;
  padding: 0.5rem 0.75rem 0.5rem 2.25rem;
  background: #0b1120;
  border: 0.125rem solid var(--border-pixel);
  border-radius: 0.4375rem;
  color: white;
  font-size: 0.84rem;
  outline: none;
}

.search-bar-modern:focus {
  border-color: var(--color-blue);
}

.select-gen-modern {
  flex: 1;
  min-width: 10.625rem;
  padding: 0.5rem 0.75rem;
  background: #0b1120;
  border: 0.125rem solid var(--border-pixel);
  border-radius: 0.4375rem;
  color: var(--color-gold);
  font-weight: 700;
  font-size: 0.8rem;
  outline: none;
  cursor: pointer;
}

.type-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3125rem;
  overflow: hidden;
  padding-bottom: 0.125rem;
  margin-bottom: 0.375rem;
  flex-shrink: 0;
  align-items: center;
}

.type-filter-pill {
  background: #0b1120;
  border: 0.0625rem solid var(--border-pixel);
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.1875rem 0.4375rem;
  border-radius: 0.25rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.12s;
}

.type-filter-pill.active {
  color: white;
  border-color: white;
  font-weight: 800;
}

#pokedexTypeFilterBar .type-filter-pill { min-height: 1.6875rem; }
#pokedexTypeFilterBar .type-filter-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.875rem;
  padding: .1875rem;
}
#pokedexTypeFilterBar .type-filter-symbol img {
  display: block;
  width: 1.25rem;
  height: .875rem;
  object-fit: contain;
}

.roster-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.74rem;
  flex-shrink: 0;
}

.pokedex-badges-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.roster-counter-badge {
  color: var(--color-blue);
  font-weight: 800;
  background: rgba(56, 189, 248, 0.12);
  padding: 0.1875rem 0.5625rem;
  border-radius: 0.3125rem;
  font-size: 0.78rem;
}

.roster-counter-badge.shiny-counter-badge {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.15);
  border: 0.0625rem solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 0 0.625rem rgba(245, 158, 11, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.scroll-helper {
  color: var(--text-muted);
}

/* Grade Clean de Pokémons (Esquadrão e Pokédex) — adapta-se à altura da janela */
.clean-poke-grid,
.pokedex-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr));
  gap: 0.4375rem;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.25rem;
  align-content: start;
}

.pokedex-cards-grid {
  grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr));
}

.pokeidle-card {
  background: var(--bg-card);
  border: 0.0625rem solid var(--border-pixel);
  border-radius: 0.5rem;
  padding: 0.375rem 0.25rem 0.4375rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  cursor: pointer;
  transition: all 0.14s;
}

.pokeidle-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--color-gold);
  transform: translateY(-0.125rem);
}

.pokeidle-card.in-squad {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.1);
}

.pokeidle-card.in-squad::after {
  content: 'TIME';
  position: absolute;
  top: 0.1875rem;
  right: 0.1875rem;
  background: #10b981;
  color: #052e16;
  font-size: 0.5rem;
  font-weight: 900;
  padding: 0.0625rem 0.25rem;
  border-radius: 0.1875rem;
  z-index: 2;
}

.card-shiny-badge {
  position: absolute;
  top: 0.1875rem;
  left: 0.1875rem;
  background: rgba(245, 158, 11, 0.22);
  border: 0.0625rem solid #f59e0b;
  border-radius: 0.25rem;
  font-size: 0.55rem;
  padding: 0 0.1875rem;
  color: #fbbf24;
  box-shadow: 0 0 0.375rem rgba(245, 158, 11, 0.4);
  z-index: 2;
  line-height: 1.2;
}

.pokeidle-card.has-shiny {
  border-color: rgba(245, 158, 11, 0.35);
}

.pokeidle-card > img {
  width: 3.375rem;
  height: 3.375rem;
  object-fit: contain;
  image-rendering: pixelated;
}

.card-num {
  font-size: 0.62rem;
  color: var(--text-muted);
  font-weight: 700;
  line-height: 1;
}

.card-title {
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: capitalize;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  margin-top: 0.0625rem;
}

.card-mini-types {
  display: flex;
  gap: 0.1875rem;
  margin-top: 0.1875rem;
}

.mini-dot {
  width: 0.4375rem;
  height: 0.4375rem;
  border-radius: 50%;
}

.type-badge-container {
  display: flex;
  gap: 0.25rem;
}

.type-badge {
  padding: 0.125rem 0.4375rem;
  border-radius: 0.25rem;
  font-size: 0.64rem;
  font-weight: 800;
  text-transform: uppercase;
  color: white;
}

/* ========================================================
   TELA 4: ARENA DE COMBATE (MEU POKÉMON NA ESQUERDA | INIMIGO NA DIREITA)
======================================================== */
.battle-arena-card {
  padding: clamp(0.5rem, 1.3dvh, 0.875rem);
  display: flex;
  flex-direction: column;
  gap: clamp(0.375rem, 1.1dvh, 0.75rem);
  flex: 1;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.arena-top-bar {
  min-height: 3.625rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  border-bottom: 0.125rem solid var(--border-pixel);
  padding-bottom: 0.375rem;
  gap: 0.625rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.arena-match-info {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-wrap: wrap;
}

.arena-badge-mode {
  font-family: var(--font-pixel-ui);
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  border: 0.0625rem solid #34d399;
  color: white;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 0.1875rem 0.5625rem;
  border-radius: 0.3125rem;
  box-shadow: 0 0 0.625rem rgba(16, 185, 129, 0.35);
}

.arena-round-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4375rem;
  font-family: var(--font-pixel-ui);
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: 0.0375rem;
  color: #fef08a;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
  border: 0.09375rem solid rgba(251, 191, 36, 0.6);
  box-shadow: 0 0 0.875rem rgba(245, 158, 11, 0.28), inset 0 0.0625rem 0 rgba(255, 255, 255, 0.15);
  padding: 0.3125rem 0.875rem;
  border-radius: 624.9375rem;
  text-shadow: 0 0.0625rem 0.125rem rgba(0, 0, 0, 0.8);
}

.arena-round-tag::before {
  content: '🗼';
  font-size: 0.95rem;
}

#battleScreen.is-connecting .arena-round-tag::after {
  content: '';
  display: inline-block;
  width: 0.75rem;
  height: 0.75rem;
  flex-shrink: 0;
  border: 0.125rem solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: battle-connection-spin .7s linear infinite;
}

@keyframes battle-connection-spin {
  to { transform: rotate(360deg); }
}

#menuBtnPlay[aria-busy="true"] .play-pokeball-svg {
  transform-origin: center;
  transform-box: view-box;
  animation: battle-connection-spin .85s linear infinite;
}
#menuBtnPlay[aria-busy="true"] .play-btn-icon-block { transform: none; }

.floor-team-pokeballs { display: inline-flex; align-items: center; gap: .25rem; }
.floor-team-pokeballs .pokeball-icon { width: .75rem; height: .75rem; border-width: .0625rem; box-shadow: none; flex-shrink: 0; }
.floor-team-pokeballs .pokeball-icon::after { width: .25rem; height: .25rem; border-width: .0625rem; }

.arena-trainer-pill {
  display: flex;
  align-items: center;
  gap: 0.4375rem;
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.95) 0%, rgba(4, 120, 87, 0.95) 100%);
  border: 0.09375rem solid #10b981;
  box-shadow: 0 0 0.75rem rgba(16, 185, 129, 0.4);
  color: #ecfdf5;
  padding: 0.1875rem 0.625rem;
  border-radius: 0.375rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.arena-trainer-pill img {
  width: 1.5rem;
  height: 1.5rem;
  object-fit: contain;
  image-rendering: pixelated;
}

.arena-quick-controls {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-speed-toggle {
  background: #0b1120;
  border: 0.0625rem solid var(--border-pixel);
  color: var(--text-muted);
  padding: 0.3125rem 0.625rem;
  border-radius: 0.375rem;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-speed-toggle strong { color: var(--color-blue); }

.btn-flee-arena {
  background: linear-gradient(180deg, #dc2626 0%, #991b1b 100%);
  border: 0.09375rem solid #ef4444;
  color: #ffffff;
  padding: 0.3125rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 0.125rem 0.5rem rgba(239, 68, 68, 0.45);
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 0.3125rem;
}

.btn-flee-arena:hover {
  background: linear-gradient(180deg, #ef4444 0%, #b91c1c 100%);
  border-color: #fca5a5;
  color: #ffffff;
  box-shadow: 0 0 0.875rem rgba(239, 68, 68, 0.75);
  transform: translateY(-0.0625rem);
}

/* PALCO DO DUELO DIVIDIDO EM: ESQUERDA (MEU POKÉMON) | CENTRO (VS) | DIREITA (INIMIGO) */
.duel-stage {
  flex: 1;
  min-height: 0;
  background-color: #0b132b;
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
  border-radius: 0.625rem;
  border: 0.125rem solid #334155;
  padding: clamp(0.625rem, 1.8dvh, 1.125rem) clamp(0.875rem, 2vw, 1.5rem);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: background-image 0.4s ease-in-out;
  contain: content;
}

.duel-sides-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 0.875rem;
  flex: 1;
  min-height: 0;
  height: 100%;
}

@media (max-width: 820px) {
  .duel-sides-grid {
    grid-template-columns: 1fr;
  }
  .battle-vs-center {
    display: none;
  }
}

.battle-side {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 0;
}

/* Lado Esquerdo: Informações do MEU Pokémon no Topo e Sprite na Base */
.player-side-left {
  align-items: flex-start;
}

/* Lado Direito: Pokémon Inimigo no Topo e Informações na Base */
.enemy-side-right {
  align-items: flex-end;
  justify-content: space-between;
}

.enemy-side-right .enemy-pedestal {
  margin-right: 1rem;
  margin-top: 0.125rem;
}

.enemy-side-right .enemy-hud {
  margin-bottom: 0.125rem;
}

.battle-vs-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.vs-pixel-badge {
  display: block;
  width: 5.25rem;
  flex-shrink: 0;
  line-height: 0;
}
.vs-pixel-badge svg { display: block; width: 100%; height: auto; }
.battle-vs-center .vs-pixel-badge { animation: battleVsFloat 3s ease-in-out infinite; }
@keyframes battleVsFloat { 0%, 100% { transform: translate3d(0, -.1875rem, 0); } 50% { transform: translate3d(0, .1875rem, 0); } }

.battle-trainer-intro[hidden] { display: none; }
.battle-trainer-intro { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; background: #05070ae8; overflow: hidden; pointer-events: auto; }
.trainer-intro-strip { position: relative; display: flex; width: 100%; height: clamp(10rem, 27dvh, 17rem); border-block: .1875rem solid #e2e8f0; background: #111; box-shadow: 0 0 3rem #000; isolation: isolate; }
.trainer-intro-side { position: relative; width: 55%; height: 100%; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.trainer-intro-side::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, transparent 0 1rem, #fff2 1rem 1.0625rem, transparent 1.0625rem 1.5rem); }
.trainer-intro-player { background: linear-gradient(0deg, #034565, #13cbeb 48%, #04739b); clip-path: polygon(0 0, 100% 0, 92% 15%, 100% 32%, 91% 50%, 99% 65%, 90% 82%, 98% 100%, 0 100%); z-index: 2; animation: trainerSlideLeft .4s cubic-bezier(.16,1,.3,1) both; }
.trainer-intro-enemy { margin-left: -10%; background: linear-gradient(0deg, #5e1008, #f65312 48%, #94170b); animation: trainerSlideRight .4s cubic-bezier(.16,1,.3,1) both; }
.trainer-intro-side img { position: relative; height: 92%; width: min(70%, 18rem); object-fit: contain; object-position: bottom; image-rendering: pixelated; filter: drop-shadow(.2rem .2rem #0008); }
.trainer-intro-side span { position: absolute; left: 1rem; right: 1rem; bottom: .375rem; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 800 .85rem var(--font-pixel-ui); color: #fff; text-shadow: 0 .125rem #000, 0 0 .375rem #000; }
#introPlayerName { text-transform: none !important; }
.trainer-intro-vs { position: absolute; left: 50%; top: 50%; z-index: 3; width: clamp(6rem, 12vw, 10rem); transform: translate(-50%, -50%); animation: trainerVsImpact .5s cubic-bezier(.16,1,.3,1) both; }
@keyframes trainerSlideLeft { from { transform: translate3d(-100%,0,0); } to { transform: translate3d(0,0,0); } }
@keyframes trainerSlideRight { from { transform: translate3d(100%,0,0); } to { transform: translate3d(0,0,0); } }
@keyframes trainerVsImpact { from { opacity: 0; scale: 1.6; } to { opacity: 1; scale: 1; } }
@media (prefers-reduced-motion: reduce) { .trainer-intro-side, .trainer-intro-vs, .battle-vs-center .vs-pixel-badge { animation: none; } }

.pokeidle-hud-card {
  background: rgba(11, 16, 28, 0.94);
  border: 0.125rem solid #334155;
  border-radius: 0.5625rem;
  padding: clamp(0.4375rem, 1.1dvh, 0.625rem) 0.75rem;
  width: 100%;
  max-width: 20rem;
  box-shadow: 0 0.375rem 0 rgba(0, 0, 0, 0.45);
}

.player-hud {
  border-left: 0.25rem solid #10b981;
}

.enemy-hud {
  border-right: 0.25rem solid #ef4444;
}

.hud-trainer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
  padding-bottom: 0.1875rem;
  border-bottom: 0.0625rem solid rgba(255, 255, 255, 0.08);
}

.hud-trainer-tag {
  font-family: var(--font-pixel-ui);
  font-size: 0.74rem;
  font-weight: 800;
  color: #fca5a5;
  text-transform: uppercase;
}

.hud-trainer-tag.player-tag {
  color: #10b981;
}

.team-pokeballs-row {
  display: flex;
  gap: 0.25rem;
}

.pokeball-dot {
  width: 0.6875rem;
  height: 0.6875rem;
  border-radius: 50%;
  background: linear-gradient(180deg, #ef4444 50%, #f8fafc 50%);
  border: 0.0625rem solid #0f172a;
}

.pokeball-dot.fainted {
  background: #334155;
  opacity: 0.4;
}

.hud-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.1875rem;
}

.hud-name-group {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.hud-pokemon-name {
  font-family: var(--font-pixel-ui);
  font-weight: 800;
  font-size: 1.02rem;
}

.status-pill {
  font-size: 0.62rem;
  font-weight: 900;
  padding: 0.125rem 0.3125rem;
  border-radius: 0.25rem;
  color: white;
}

.status-pill.brn { background: #ef4444; }
.status-pill.psn { background: #a855f7; }
.status-pill.par { background: #eab308; color: #0f172a; }

.hud-level-pill {
  font-family: var(--font-pixel-ui);
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--color-gold);
  background: rgba(251, 191, 36, 0.15);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
}

.hud-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.3125rem;
  gap: 0.375rem;
}

.buff-pills-row {
  display: flex;
  gap: 0.1875rem;
}

.buff-tag {
  font-size: 0.6rem;
  font-weight: 800;
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  padding: 0.0625rem 0.3125rem;
  border-radius: 0.1875rem;
}

.hud-hp-track {
  width: 100%;
  height: 0.625rem;
  background: #1e293b;
  border: 0.0625rem solid #0f172a;
  border-radius: 0.25rem;
  overflow: hidden;
  margin-bottom: 0.1875rem;
}

.hud-hp-progress {
  height: 100%;
  width: 100%;
  transform: scaleX(1);
  transform-origin: left center;
  background: linear-gradient(90deg, #10b981, #059669);
  transition: transform 0.35s ease-out, background 0.35s;
  will-change: transform;
}

.hud-hp-numbers {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 700;
}

.stadium-pedestal {
  width: clamp(11.25rem, 22vw, 17.5rem);
  height: clamp(11.25rem, 28dvh, 16.5rem);
  min-height: 0;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  position: relative;
}

.player-pedestal {
  margin-left: 0.875rem;
  margin-bottom: 0.5rem;
}

.enemy-pedestal {
  margin-right: 1.25rem;
  margin-top: 0.375rem;
}

/* ============================================================================
   PLATAFORMA / BASE DE BATALHA 3D (ESTILO POKÉMON OFICIAL)
============================================================================ */
.pokemon-battle-base {
  position: absolute;
  bottom: 0.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  height: 3rem;
  z-index: 1;
  pointer-events: none;
}

.player-base {
  width: 92%;
  height: 3.125rem;
}

.enemy-base {
  width: 86%;
  height: 2.875rem;
}

/* Sombra de projeção suave e centrada no chão */
.base-shadow {
  position: absolute;
  bottom: -0.375rem;
  left: 50%;
  transform: translateX(-50%);
  width: 92%;
  height: 1.5rem;
  background: radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, 0.70) 0%, rgba(0, 0, 0, 0.32) 48%, transparent 74%);
  border-radius: 50%;
  filter: blur(0.25rem);
  z-index: 1;
}

.player-base .base-shadow {
  bottom: -0.375rem;
  width: 92%;
  height: 1.5rem;
  background: radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.30) 48%, transparent 75%);
  filter: blur(0.25rem);
}

/* Borda cilíndrica 3D (espessura do bloco de chão/terreno) */
.base-cylinder-rim {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1.5rem;
  background: linear-gradient(180deg, var(--base-rim-color, #15803d) 0%, #060913 100%);
  border-radius: 50% / 100% 100% 0 0;
  transform: rotate(180deg);
  border: 0.125rem solid rgba(0, 0, 0, 0.7);
  border-top: none;
  z-index: 2;
  box-shadow: inset 0 -0.25rem 0.5rem rgba(0, 0, 0, 0.65);
}

/* Superfície elíptica superior onde o Pokémon pisa */
.base-top-surface {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2.375rem;
  background: radial-gradient(ellipse at 50% 35%, var(--base-surface, #22c55e) 0%, var(--base-surface-sub, #16a34a) 70%, var(--base-rim-color, #15803d) 100%);
  border-radius: 50%;
  border: 0.125rem solid var(--base-ring-color, #86efac);
  box-shadow: 0 0 0.875rem var(--base-glow, rgba(34, 197, 94, 0.4)), inset 0 0.1875rem 0.5rem rgba(255, 255, 255, 0.45);
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Anel concêntrico estilizado característico dos jogos Pokémon */
.base-inner-ring {
  width: 72%;
  height: 62%;
  border-radius: 50%;
  border: 0.09375rem dashed var(--base-ring-color, #86efac);
  opacity: 0.65;
}

/* Pokémon firmemente posicionado sobre a base 3D */
.duel-sprite {
  width: clamp(9.25rem, 23dvh, 14rem);
  height: clamp(9.25rem, 23dvh, 14rem);
  max-width: 100%;
  max-height: calc(100% - 2rem);
  flex-shrink: 0;
  object-fit: contain;
  object-position: center bottom;
  transform-origin: center bottom;
  image-rendering: pixelated;
  z-index: 4;
  margin-bottom: 0.625rem;
  filter: drop-shadow(0 0.3125rem 0.5rem rgba(0, 0, 0, 0.65));
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.player-sprite-pos {
  margin-bottom: clamp(1.5rem, 3.8dvh, 1.875rem);
}

.enemy-sprite-pos {
  margin-bottom: 0.5rem;
}

.trainer-stage-sprite {
  position: absolute;
  right: clamp(0.875rem, 2.2vw, 1.375rem);
  bottom: clamp(2.125rem, 4.8dvh, 2.5rem);
  width: clamp(3.25rem, 9dvh, 5rem);
  height: clamp(3.25rem, 9dvh, 5rem);
  object-fit: contain;
  image-rendering: pixelated;
  opacity: 0.92;
  z-index: 3;
  filter: drop-shadow(0 0.25rem 0.625rem rgba(0, 0, 0, 0.75));
}

/* Animações de Combate */
@keyframes lungeRight {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(2.8125rem, -0.625rem) scale(1.1); }
  100% { transform: translate(0, 0) scale(1); }
}

@keyframes lungeLeft {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-2.8125rem, 0.625rem) scale(1.1); }
  100% { transform: translate(0, 0) scale(1); }
}

@keyframes hitFlash {
  0%, 100% { transform: translateX(0); filter: brightness(1); }
  25% { transform: translateX(-0.625rem); filter: brightness(2.5) saturate(0); }
  50% { transform: translateX(0.625rem); filter: brightness(1.8); }
  75% { transform: translateX(-0.5rem); filter: brightness(2.2); }
}

.anim-attack-right { animation: lungeRight 0.34s ease-in-out; }
.anim-attack-left { animation: lungeLeft 0.34s ease-in-out; }
.anim-hit { animation: hitFlash 0.42s ease-in-out; }
.anim-faint {
  animation: pokemonFaintSoft var(--faint-duration, 650ms) cubic-bezier(.22, 1, .36, 1) both;
}
@keyframes pokemonFaintSoft {
  0% { transform: translate3d(0, 0, 0) scale(1); opacity: 1; }
  20% { transform: translate3d(0, .125rem, 0) scale(.99); opacity: 1; }
  55% { transform: translate3d(0, .75rem, 0) scale(.94); opacity: .65; }
  100% { transform: translate3d(0, 2rem, 0) scale(.8); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .anim-faint { animation-name: pokemonFaintFade; } }
@keyframes pokemonFaintFade { from { opacity: 1; } to { opacity: 0; } }

/* ============================================================================
   ANIMAÇÃO DE POKÉBOLA SENDO JOGADA & SAÍDA DO POKÉMON
============================================================================ */
.pokeball-throw-fx {
  position: absolute;
  left: 50%;
  bottom: clamp(1.625rem, 4dvh, 2rem);
  transform: translate(-50%, 0);
  width: 2.25rem;
  height: 2.25rem;
  pointer-events: none;
  z-index: 10;
}

.pokeball-throw-fx.player-throw {
  animation: pokeballPlayerArc var(--throw-dur, 0.44s) cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.pokeball-throw-fx.enemy-throw {
  animation: pokeballEnemyArc var(--throw-dur, 0.44s) cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes pokeballPlayerArc {
  0% {
    transform: translate(-9.375rem, 4.6875rem) scale(0.6);
    opacity: 0.95;
  }
  38% {
    transform: translate(-4.6875rem, -5.625rem) scale(1.1);
    opacity: 1;
  }
  75% {
    transform: translate(-1.125rem, -0.9375rem) scale(0.95);
  }
  90% {
    transform: translate(-50%, -0.375rem) scale(1.05);
  }
  100% {
    transform: translate(-50%, 0) scale(1);
    opacity: 1;
  }
}

@keyframes pokeballEnemyArc {
  0% {
    transform: translate(6.875rem, -3.125rem) scale(0.6);
    opacity: 0.95;
  }
  38% {
    transform: translate(3.125rem, -5.625rem) scale(1.05);
    opacity: 1;
  }
  75% {
    transform: translate(0.625rem, -0.9375rem) scale(0.95);
  }
  90% {
    transform: translate(-50%, -0.375rem) scale(1.05);
  }
  100% {
    transform: translate(-50%, 0) scale(1);
    opacity: 1;
  }
}

/* Rotação rápida da Pokébola enquanto viaja pelo ar */
.thrown-pokeball-spinner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pokeballSpinFlight var(--throw-dur, 0.44s) linear forwards;
}

.pokeball-throw-fx.enemy-throw .thrown-pokeball-spinner {
  animation: pokeballSpinFlightReverse var(--throw-dur, 0.44s) linear forwards;
}

@keyframes pokeballSpinFlight {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(1080deg); }
}

@keyframes pokeballSpinFlightReverse {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(-1080deg); }
}

.battle-pokeball-svg {
  width: 2.125rem;
  height: 2.125rem;
  filter: drop-shadow(0 0.25rem 0.375rem rgba(0, 0, 0, 0.65));
}

/* Sombra projetada no chão da arena conforme a Pokébola cai */
.pokeball-landing-shadow {
  position: absolute;
  bottom: -0.375rem;
  left: 50%;
  transform: translateX(-50%);
  width: 2rem;
  height: 0.75rem;
  background: radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, 0.65) 0%, transparent 75%);
  border-radius: 50%;
  animation: shadowGrow var(--throw-dur, 0.44s) ease-out forwards;
}

@keyframes shadowGrow {
  0% { opacity: 0; transform: translateX(-50%) scale(0.2); }
  80% { opacity: 0.5; transform: translateX(-50%) scale(0.7); }
  100% { opacity: 0.85; transform: translateX(-50%) scale(1); }
}

/* Flash de Energia / Feixe de Luz quando a Pokébola se abre */
.pokeball-energy-burst {
  position: absolute;
  left: 50%;
  bottom: clamp(1.625rem, 4dvh, 2rem);
  transform: translate(-50%, 50%);
  width: 5rem;
  height: 5rem;
  pointer-events: none;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: center;
}

.energy-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 0.1875rem solid #38bdf8;
  box-shadow: 0 0 1.25rem #38bdf8, inset 0 0 0.9375rem #ffffff;
  animation: energyRingPulse var(--burst-dur, 0.38s) ease-out forwards;
}

.energy-core-flash {
  position: absolute;
  width: 3.125rem;
  height: 3.125rem;
  background: radial-gradient(circle, #ffffff 20%, #38bdf8 65%, transparent 80%);
  border-radius: 50%;
  filter: drop-shadow(0 0 1rem #38bdf8);
  animation: energyCoreFade var(--burst-dur, 0.38s) ease-out forwards;
}

.energy-sparkles {
  position: absolute;
  font-size: 1.2rem;
  color: #fef08a;
  text-shadow: 0 0 0.625rem #fbbf24;
  animation: sparklesSpread var(--burst-dur, 0.38s) ease-out forwards;
}

@keyframes energyRingPulse {
  0% { transform: scale(0.1); opacity: 1; }
  100% { transform: scale(2.4); opacity: 0; }
}

@keyframes energyCoreFade {
  0% { transform: scale(0.2); opacity: 1; }
  50% { transform: scale(1.6); opacity: 0.9; }
  100% { transform: scale(2.2); opacity: 0; }
}

@keyframes sparklesSpread {
  0% { transform: scale(0.2) rotate(0deg); opacity: 1; }
  100% { transform: scale(1.8) rotate(120deg); opacity: 0; }
}

/* Animação do Pokémon saindo em silhueta de luz e materializando */
.pokemon-materializing {
  opacity: 0 !important;
  transform: scale(0.15) !important;
}

.anim-pokemon-emerge {
  animation: pokemonEmergeFx var(--emerge-dur, 0.42s) cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards !important;
}

@keyframes pokemonEmergeFx {
  0% {
    opacity: 0;
    transform: translateY(1.375rem) scale(0.15);
    filter: brightness(4.5) saturate(0) drop-shadow(0 0 1.5rem #38bdf8);
  }
  45% {
    opacity: 1;
    transform: translateY(-0.5rem) scale(1.12);
    filter: brightness(2.2) saturate(0.4) drop-shadow(0 0 1.125rem #38bdf8);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: brightness(1) saturate(1) drop-shadow(0 0.3125rem 0.5rem rgba(0, 0, 0, 0.65));
  }
}

/* ============================================================================
   BOTÃO VERMELHO DE POKÉMON DERROTADO (NO LUGAR DO POKÉMON MORTO NA ARENA)
   ============================================================================ */
.player-fainted-action-container {
  position: absolute;
  bottom: 1.5625rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 12;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 92%;
  max-width: 15.625rem;
  pointer-events: auto;
  animation: faintedFadeIn 0.35s ease-out;
}

@keyframes faintedFadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, 0.9375rem) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

.btn-pokemon-fainted-red {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #991b1b 100%);
  border: 0.125rem solid #fca5a5;
  border-radius: 0.75rem;
  padding: 0.5rem 0.875rem;
  width: 100%;
  cursor: pointer;
  box-shadow: 0 0.25rem 1.125rem rgba(239, 68, 68, 0.65), 0 0 1.5625rem rgba(185, 28, 28, 0.45);
  animation: faintedRedPulse 1.8s infinite alternate ease-in-out;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1875rem;
  user-select: none;
}

.btn-pokemon-fainted-red:hover {
  transform: scale(1.05);
  filter: brightness(1.15);
  box-shadow: 0 0.375rem 1.625rem rgba(239, 68, 68, 0.9), 0 0 2.1875rem rgba(239, 68, 68, 0.6);
  border-color: #ffffff;
}

.btn-pokemon-fainted-red:active {
  transform: scale(0.97);
}

.fainted-btn-badge {
  font-family: var(--font-pixel-title);
  font-size: 0.64rem;
  color: #fee2e2;
  letter-spacing: 0.05rem;
  text-transform: uppercase;
  text-shadow: 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.8);
}

.fainted-btn-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  font-family: var(--font-pixel-ui);
  font-size: 0.80rem;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.8);
  letter-spacing: 0.03125rem;
}

.fainted-btn-arrow {
  color: #fef08a;
  font-size: 0.72rem;
  transition: transform 0.15s ease;
}

.btn-pokemon-fainted-red:hover .fainted-btn-arrow {
  transform: translateX(0.1875rem);
}

@keyframes faintedRedPulse {
  0% {
    box-shadow: 0 0.25rem 0.875rem rgba(239, 68, 68, 0.55), 0 0 1rem rgba(185, 28, 28, 0.35);
    border-color: #fca5a5;
  }
  100% {
    box-shadow: 0 0.375rem 1.625rem rgba(239, 68, 68, 0.9), 0 0 2rem rgba(239, 68, 68, 0.65);
    border-color: #ffffff;
  }
}

/* Modal de Seleção de Próximo Pokémon */
.fainted-switch-modal-card {
  max-width: 27.5rem;
  width: 92%;
  background: #0f172a;
  border: 0.125rem solid #ef4444;
  border-radius: 0.75rem;
  box-shadow: 0 0 2.1875rem rgba(239, 68, 68, 0.35), 0 1.25rem 2.8125rem rgba(0, 0, 0, 0.85);
  overflow: hidden;
  box-sizing: border-box;
}

.fainted-modal-header {
  border-bottom: 0.0625rem solid rgba(239, 68, 68, 0.3);
  padding: 0.875rem 1.125rem;
  background: rgba(239, 68, 68, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.fainted-modal-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.fainted-modal-badge {
  font-family: var(--font-pixel-title);
  font-size: 0.65rem;
  color: #f87171;
  letter-spacing: 0.0625rem;
}

.fainted-modal-title {
  font-family: var(--font-pixel-ui);
  font-size: 1.05rem;
  font-weight: 900;
  color: #ffffff;
  margin: 0;
  letter-spacing: 0.03125rem;
}

.fainted-modal-body {
  padding: 0.875rem 1.125rem 1.125rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  box-sizing: border-box;
}

.fainted-modal-subtitle {
  font-family: var(--font-clean);
  font-size: 0.80rem;
  color: #cbd5e1;
  margin: 0;
  line-height: 1.35;
}

.fainted-party-choices-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 17.5rem;
  overflow-y: auto;
  padding: 0.125rem 0.25rem 0.125rem 0.125rem;
  box-sizing: border-box;
}

.fainted-choice-card {
  background: #141f36;
  border: 0.125rem solid #283756;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.625rem;
  cursor: pointer;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.fainted-choice-card:hover {
  background: #1e2c4c;
  border-color: var(--color-gold);
  transform: translateY(-0.0625rem);
  box-shadow: 0 0.25rem 0.875rem rgba(251, 191, 36, 0.25);
}

.fcc-left {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  border: 0.0625rem solid rgba(255, 255, 255, 0.06);
  border-radius: 0.5rem;
}

.fcc-sprite {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 0.125rem 0.25rem rgba(0, 0, 0, 0.6));
}

.fcc-middle {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.fcc-name-row {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.fcc-name {
  font-family: var(--font-pixel-ui);
  font-size: 0.88rem;
  font-weight: 900;
  text-transform: uppercase;
  color: #f8fafc;
  letter-spacing: 0.01875rem;
}

.fcc-level {
  font-size: 0.70rem;
  color: var(--color-gold);
  font-weight: 700;
}

.fcc-types {
  display: flex;
  gap: 0.25rem;
}

.type-badge-mini {
  font-size: 0.54rem;
  font-weight: 800;
  color: #ffffff;
  padding: 0.0625rem 0.3125rem;
  border-radius: 0.1875rem;
  letter-spacing: 0.025rem;
}

.fcc-hp-row {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.0625rem;
}

.fcc-hp-track {
  flex: 1;
  height: 0.3125rem;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 0.1875rem;
  overflow: hidden;
}

.fcc-hp-fill {
  height: 100%;
  border-radius: 0.1875rem;
  transition: width 0.3s;
}

.fcc-hp-text {
  font-size: 0.66rem;
  color: #94a3b8;
  font-family: monospace;
  font-weight: 700;
  white-space: nowrap;
}

.fcc-right {
  flex-shrink: 0;
}

.btn-send-pokemon {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: 0.09375rem solid #6ee7b7;
  color: #ffffff;
  border-radius: 0.375rem;
  padding: 0.375rem 0.75rem;
  font-family: var(--font-pixel-ui);
  font-size: 0.72rem;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3125rem;
  transition: all 0.14s ease;
  white-space: nowrap;
  box-shadow: 0 0.125rem 0.375rem rgba(16, 185, 129, 0.3);
}

.fainted-choice-card:hover .btn-send-pokemon {
  background: #10b981;
  filter: brightness(1.12);
  box-shadow: 0 0 0.75rem rgba(16, 185, 129, 0.55);
}

/* ========================================================
   MODAL DE SELEÇÃO DE POKÉMON PARA USO DE ITEM EM BATALHA
======================================================== */
.item-target-modal-card {
  max-width: 30rem;
  width: 92%;
  background: #0b1324;
  border: 0.125rem solid #38bdf8;
  border-radius: 0.75rem;
  box-shadow: 0 0 2.1875rem rgba(56, 189, 248, 0.35), 0 1.25rem 2.8125rem rgba(0, 0, 0, 0.85);
  overflow: hidden;
  box-sizing: border-box;
}

.item-target-modal-header {
  border-bottom: 0.0625rem solid rgba(56, 189, 248, 0.3);
  padding: 0.75rem 1.125rem;
  background: rgba(56, 189, 248, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.item-target-modal-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.item-target-modal-badge {
  font-family: var(--font-pixel-title);
  font-size: 0.65rem;
  color: #38bdf8;
  letter-spacing: 0.0625rem;
}

.item-target-modal-title {
  font-family: var(--font-pixel-ui);
  font-size: 1.05rem;
  font-weight: 900;
  color: #ffffff;
  margin: 0;
  letter-spacing: 0.03125rem;
}

.item-target-modal-body {
  padding: 0.875rem 1.125rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-sizing: border-box;
}

.item-target-info-strip {
  background: #111e38;
  border: 0.0625rem solid rgba(56, 189, 248, 0.25);
  border-radius: 0.5rem;
  padding: 0.625rem 0.75rem;
}

.item-target-item-preview {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.itip-icon-box {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  border: 0.09375rem solid var(--item-color, #38bdf8);
  box-shadow: 0 0 0.75rem rgba(56, 189, 248, 0.2);
  flex-shrink: 0;
}

.itip-icon {
  font-size: 1.5rem;
}

.itip-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.itip-name-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.itip-name {
  font-family: var(--font-pixel-ui);
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.03125rem;
}

.itip-qty-badge {
  font-size: 0.70rem;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  border: 0.0625rem solid rgba(56, 189, 248, 0.3);
  padding: 0.125rem 0.4375rem;
  border-radius: 0.25rem;
  font-weight: 700;
}

.itip-desc {
  font-size: 0.78rem;
  color: #94a3b8;
  margin: 0;
  line-height: 1.35;
}

.item-target-modal-subtitle {
  font-family: var(--font-clean);
  font-size: 0.80rem;
  color: #cbd5e1;
  margin: 0;
  line-height: 1.35;
}

.item-target-choices-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 18.125rem;
  overflow-y: auto;
  padding: 0.125rem 0.25rem 0.125rem 0.125rem;
  box-sizing: border-box;
}

.item-target-choice-card {
  background: #141f36;
  border: 0.125rem solid #283756;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.625rem;
  cursor: pointer;
  transition: all 0.15s ease;
  box-sizing: border-box;
  position: relative;
}

.item-target-choice-card:hover:not(.ineligible) {
  background: #1e2c4c;
  border-color: #38bdf8;
  transform: translateY(-0.0625rem);
  box-shadow: 0 0.25rem 0.875rem rgba(56, 189, 248, 0.25);
}

.item-target-choice-card.is-active-combatant {
  border-color: #10b981;
}

.item-target-choice-card.ineligible {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.4);
}

.target-role-badge {
  font-size: 0.58rem;
  font-weight: 800;
  padding: 0.0625rem 0.375rem;
  border-radius: 0.25rem;
  letter-spacing: 0.025rem;
}

.target-role-badge.active {
  background: rgba(16, 185, 129, 0.25);
  color: #6ee7b7;
  border: 0.0625rem solid rgba(16, 185, 129, 0.4);
}

.target-role-badge.bench {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 0.0625rem solid rgba(148, 163, 184, 0.25);
}

.itc-types-status-row {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.0625rem;
}

.target-status-badge {
  font-size: 0.56rem;
  font-weight: 800;
  padding: 0.0625rem 0.3125rem;
  border-radius: 0.1875rem;
  text-transform: uppercase;
}

.target-status-badge.fainted {
  background: rgba(239, 68, 68, 0.25);
  color: #f87171;
  border: 0.0625rem solid rgba(239, 68, 68, 0.4);
}

.target-status-badge.status-afflicted {
  background: rgba(245, 158, 11, 0.25);
  color: #fbbf24;
  border: 0.0625rem solid rgba(245, 158, 11, 0.4);
}

.btn-apply-item {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border: 0.09375rem solid #38bdf8;
  color: #ffffff;
  font-family: var(--font-pixel-ui);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.375rem 0.875rem;
  border-radius: 0.375rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  transition: all 0.15s ease;
  box-shadow: 0 0.125rem 0.375rem rgba(0, 0, 0, 0.4);
}

.btn-apply-item:hover {
  transform: scale(1.05);
  filter: brightness(1.15);
  box-shadow: 0 0 0.75rem rgba(56, 189, 248, 0.45);
}

.target-ineligible-tag {
  font-size: 0.65rem;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.7);
  border: 0.0625rem solid rgba(148, 163, 184, 0.2);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-weight: 700;
  white-space: nowrap;
}

.item-target-modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.25rem;
}

.btn-cancel-target {
  background: rgba(239, 68, 68, 0.1);
  border: 0.0625rem solid rgba(239, 68, 68, 0.35);
  color: #f87171;
  font-family: var(--font-clean);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.4375rem 0.875rem;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-cancel-target:hover {
  background: rgba(239, 68, 68, 0.22);
  border-color: #ef4444;
  color: #ffffff;
}

/* Defeat Retry Notice Card */
.defeat-retry-notice-card {
  background: rgba(239, 68, 68, 0.12);
  border: 0.09375rem solid rgba(239, 68, 68, 0.35);
  border-radius: 0.5rem;
  padding: 0.625rem 0.875rem;
  margin: 0.625rem 0;
  text-align: left;
}

.defeat-retry-notice-card.exhausted {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.4);
}

.retry-notice-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.375rem;
}

.retry-badge {
  font-family: var(--font-pixel-title);
  font-size: 0.65rem;
  letter-spacing: 0.05rem;
  color: #f87171;
  font-weight: 800;
}

.retry-badge.exhausted {
  color: #fbbf24;
}

.retry-count-tag {
  font-size: 0.68rem;
  background: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  border-radius: 0.25rem;
  padding: 0.125rem 0.4375rem;
  font-weight: 700;
}

.retry-count-tag.exhausted {
  background: rgba(245, 158, 11, 0.25);
  color: #fde68a;
}

/* ========================================================
   MODAL DE ALERTA DO JOGO / AVISO TEMÁTICO (ESQUADRÃO BLOQUEADO)
======================================================== */
.game-alert-modal-card {
  max-width: 32.5rem;
  width: 92%;
  background: linear-gradient(180deg, #111a33 0%, #090f1f 100%);
  border: 0.125rem solid #f59e0b;
  border-radius: 0.75rem;
  box-shadow:
    0 0 2.1875rem rgba(245, 158, 11, 0.28),
    0 1.5rem 3.125rem rgba(0, 0, 0, 0.9),
    inset 0 0.0625rem 0 rgba(255, 255, 255, 0.1);
  overflow: hidden;
  animation: modalPopIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalPopIn {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.game-alert-header {
  padding: 0.875rem 1.125rem;
  background: rgba(245, 158, 11, 0.08);
  border-bottom: 0.125rem solid rgba(245, 158, 11, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.game-alert-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.game-alert-icon-box {
  font-size: 1.5rem;
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 158, 11, 0.14);
  border: 0.09375rem solid rgba(245, 158, 11, 0.45);
  border-radius: 0.625rem;
  box-shadow: 0 0 1.125rem rgba(245, 158, 11, 0.25);
  flex-shrink: 0;
}

.game-alert-badge {
  display: block;
  font-family: var(--font-pixel-ui);
  font-size: 0.65rem;
  font-weight: 800;
  color: #fbbf24;
  letter-spacing: 0.09375rem;
  text-transform: uppercase;
}

.game-alert-title {
  font-family: var(--font-pixel-title);
  font-size: 1.15rem;
  color: #ffffff;
  letter-spacing: 0.0625rem;
  margin: 0.125rem 0 0;
  text-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.85);
}

.game-alert-body {
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.game-alert-banner {
  background: rgba(15, 23, 42, 0.7);
  border: 0.09375rem solid rgba(245, 158, 11, 0.3);
  border-radius: 0.5rem;
  padding: 0.75rem 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.game-alert-floor-tag {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--font-pixel-ui);
  font-size: 0.68rem;
  font-weight: 800;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.2);
  border: 0.0625rem solid rgba(245, 158, 11, 0.45);
  border-radius: 0.375rem;
  padding: 0.125rem 0.5rem;
  letter-spacing: 0.03125rem;
}

.game-alert-main-text {
  font-family: var(--font-clean);
  font-size: 0.92rem;
  color: #f8fafc;
  font-weight: 600;
  line-height: 1.45;
  margin: 0;
}

.game-alert-details-card {
  background: rgba(10, 15, 28, 0.75);
  border: 0.0625rem solid rgba(255, 255, 255, 0.08);
  border-radius: 0.5rem;
  padding: 0.75rem 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.game-alert-rule-item {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  font-size: 0.8rem;
  line-height: 1.4;
  color: #cbd5e1;
}

.game-alert-rule-item .rule-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
  margin-top: 0.0625rem;
}

.game-alert-rule-item .rule-text strong {
  color: #fbbf24;
  display: block;
  font-family: var(--font-pixel-ui);
  font-size: 0.76rem;
  letter-spacing: 0.03125rem;
  margin-bottom: 0.125rem;
}

.game-alert-rule-item .rule-text span {
  font-family: var(--font-clean);
}

.rule-item-divider {
  height: 0.0625rem;
  background: rgba(255, 255, 255, 0.06);
  width: 100%;
}

.game-alert-footer {
  padding: 0.75rem 1.25rem 1rem;
  border-top: 0.0625rem solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.4);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
}

.btn-game-alert-primary {
  font-family: var(--font-pixel-title);
  font-size: 0.88rem;
  letter-spacing: 0.0625rem;
  color: #0f172a;
  font-weight: 900;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  border: 0.125rem solid #b45309;
  border-radius: 0.5rem;
  padding: 0.5625rem 1.375rem;
  cursor: pointer;
  box-shadow: 0 0.25rem 0 #92400e, 0 0 1rem rgba(245, 158, 11, 0.35);
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

#gameAlertModal.center-confirm .game-alert-footer { justify-content: center; }

.btn-game-alert-primary:hover {
  transform: translateY(-0.125rem);
  filter: brightness(1.1);
  box-shadow: 0 0.375rem 0 #92400e, 0 0 1.5rem rgba(245, 158, 11, 0.6);
}

.btn-game-alert-primary:active {
  transform: translateY(0.125rem);
  box-shadow: 0 0.125rem 0 #92400e;
}

.btn-game-alert-secondary {
  font-family: var(--font-pixel-ui);
  font-size: 0.76rem;
  font-weight: 800;
  color: #f87171;
  background: rgba(239, 68, 68, 0.12);
  border: 0.09375rem solid rgba(239, 68, 68, 0.38);
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-game-alert-secondary:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #fca5a5;
  box-shadow: 0 0 0.875rem rgba(239, 68, 68, 0.4);
  transform: translateY(-0.0625rem);
}

.btn-game-alert-secondary:active {
  transform: translateY(0.0625rem);
}

.floating-damage {
  position: fixed;
  left: 0;
  top: 0;
  transform: translate3d(var(--float-x, 0rem), var(--float-y, 0rem), 0) translate(-50%, -50%);
  white-space: nowrap;
  font-family: var(--font-pixel-ui);
  font-size: 1.2rem;
  font-weight: 900;
  text-shadow: 0 0.1875rem 0.5rem rgba(0, 0, 0, 0.95);
  pointer-events: none;
  z-index: 300;
  animation: none;
}

.floating-damage > span { display: block; opacity: 0; font: inherit; transform-origin: center; }

.combat-log-bold { font-weight: 700; }
.combat-log-italic { font-style: italic; }

/* Painel Tático Inferior */
.battle-dashboard-controls {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 0.625rem;
  flex-shrink: 0;
  height: clamp(12.125rem, 27dvh, 14rem);
  min-height: 0;
}

@media (max-width: 780px) {
  .battle-dashboard-controls {
    grid-template-columns: 1fr;
    height: auto;
  }
}

.moves-command-panel,
.tactical-side-panel,
.combat-console-panel {
  background: var(--bg-card);
  border: 0.125rem solid var(--border-pixel);
  border-radius: 0.5rem;
  padding: clamp(0.5rem, 1.2dvh, 0.75rem);
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.command-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.375rem;
  flex-shrink: 0;
}

.command-title {
  font-family: var(--font-pixel-ui);
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--color-gold);
}

.command-hint {
  font-size: 0.66rem;
  color: var(--color-blue);
}

.moves-grid-modern {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.375rem;
  flex: 1;
  min-height: 0;
}

.battle-move-effects { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 6; pointer-events: none; contain: strict; }
.battle-move-effects[hidden] { display: none; }
.move-name-group { display: flex; flex-direction: column; min-width: 0; gap: .1rem; }
.move-pp-tag { color: #cbd5e1; font-size: .58rem; font-weight: 700; white-space: nowrap; }
.move-card-btn[data-no-pp="true"] .move-pp-tag { color: #fda4af; }
#battlePhaseLabel { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.buff-pills-row { flex-wrap: wrap; }
.buff-tag.is-negative { color: #fda4af; background: #88133755; }
.status-pill.slp { background: #64748b; color: white; }
.status-pill.frz { background: #67e8f9; color: #083344; }

.move-card-btn {
  background: #0b1120;
  border: 0.125rem solid #334155;
  border-radius: 0.5rem;
  padding: .25rem .5rem;
  color: white;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.1875rem;
  transition: all 0.14s;
  min-height: 0;
  min-width: 0;
}

.move-card-btn:hover:not(:disabled) {
  transform: translateY(-0.125rem);
  background: #162238;
}

.move-card-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.m-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.25rem;
  min-width: 0;
  width: 100%;
}

.m-name {
  font-weight: 800;
  font-size: 0.84rem;
  line-height: 1.1;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.m-eff-badge {
  font-size: 0.56rem;
  font-weight: 900;
  padding: 0.125rem 0.3125rem;
  border-radius: 0.1875rem;
  flex-shrink: 0;
  white-space: nowrap;
}

.m-eff-badge.eff-ultra,
.m-eff-badge.eff-super {
  background: rgba(16, 185, 129, 0.22);
  color: #34d399;
  border: 0.0625rem solid #10b981;
}



.m-eff-badge.eff-normal {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
}

.m-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.68rem;
  color: var(--text-muted);
  gap: 0.375rem;
}

.m-type-category-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .1rem .2rem;
  min-width: 0;
}

@media (max-width: 1100px) {
  .m-name { display: block; white-space: nowrap; text-overflow: ellipsis; }
}

.m-type-pill {
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  color: white;
  font-weight: 800;
  font-size: 0.58rem;
  letter-spacing: 0.025rem;
  flex-shrink: 0;
}

.m-cat-tag {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.0125rem;
  white-space: nowrap;
}

.m-cat-tag.physical {
  color: #fca5a5;
}

.m-cat-tag.special {
  color: #93c5fd;
}

.m-cat-tag.status {
  color: #86efac;
}

.m-power-text {
  font-size: 0.64rem;
  font-weight: 800;
  color: #f1f5f9;
  white-space: nowrap;
  flex-shrink: 0;
}

.tactical-side-panel {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 0.375rem;
  overflow: visible;
  padding: clamp(0.375rem, 1dvh, 0.625rem);
}

@media (max-width: 780px) {
  .tactical-side-panel {
    min-height: 12.125rem;
  }
}

.tactical-section {
  display: flex;
  flex-direction: column;
  gap: 0.1875rem;
  min-width: 0;
  min-height: 0;
}

.tactical-section .command-title {
  font-size: 0.70rem;
  line-height: 1.15;
  flex-shrink: 0;
}

.battle-party-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.25rem;
  flex: 1;
  min-height: 0;
}

.party-switch-btn {
  background: #0b1120;
  border: 0.0625rem solid var(--border-pixel);
  border-radius: 0.375rem;
  padding: 1.125rem 0.25rem 0.625rem;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  cursor: pointer;
  min-width: 0;
  min-height: 0;
  transition: all 0.15s ease;
  box-sizing: border-box;
  position: relative;
}

.party-switch-btn:hover:not(:disabled):not(.active-member) {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.16);
  box-shadow: 0 0 0.625rem rgba(56, 189, 248, 0.35);
  transform: translateY(-0.125rem);
}

.party-switch-btn.active-member {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.15);
  box-shadow: 0 0 0.5rem rgba(16, 185, 129, 0.3);
  cursor: default;
}

.party-switch-btn.fainted-member {
  opacity: 0.38;
  filter: grayscale(0.85);
  cursor: not-allowed;
  border-color: #475569;
}

.party-switch-btn:disabled:not(.active-member):not(.fainted-member) {
  opacity: 0.5;
  cursor: not-allowed;
}

.psb-status-tag {
  font-size: 0.52rem;
  font-weight: 800;
  border-radius: 0.1875rem;
  padding: 0.0625rem 0.25rem;
  margin-top: 0.25rem;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.01875rem;
  flex-shrink: 0;
}

.psb-status-tag.current {
  color: #34d399;
  background: rgba(16, 185, 129, 0.22);
}

.psb-status-tag.fainted {
  color: #f87171;
  background: rgba(239, 68, 68, 0.22);
}

.psb-status-tag.ready,
.psb-status-tag.switch {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.22);
  border: 0.0625rem solid rgba(56, 189, 248, 0.4);
}

.party-switch-btn img {
  width: clamp(2.25rem, 5.5dvh, 3rem);
  height: clamp(2.25rem, 5.5dvh, 3rem);
  max-width: 100%;
  min-height: 0;
  object-fit: contain;
  image-rendering: pixelated;
  flex-shrink: 1;
}

.psb-name {
  font-size: 0.70rem;
  font-weight: 800;
  text-transform: capitalize;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.1;
  margin-top: 0.0625rem;
  flex-shrink: 0;
}

.psb-hp {
  position: absolute;
  top: 0.25rem;
  left: 0.25rem;
  max-width: calc(100% - 0.5rem);
  padding: 0.125rem 0.3125rem;
  border: 0.0625rem solid rgba(52, 211, 153, 0.28);
  border-radius: 62.4375rem;
  background: #102b2a;
  color: #a7f3d0;
  font-size: 0.50rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  white-space: nowrap;
  z-index: 1;
}

.battle-bag-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.1875rem;
}

.bag-item-btn {
  background: #0b1120;
  border: 0.0625rem solid var(--border-pixel);
  border-radius: 0.3125rem;
  padding: 0.125rem 0.25rem;
  color: #e2e8f0;
  font-size: 0.58rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.125rem;
  white-space: nowrap;
  overflow: hidden;
  transition: all 0.12s ease;
  min-height: 1.375rem;
  box-sizing: border-box;
}

.bag-item-btn:hover:not(:disabled) {
  border-color: var(--color-gold);
  background: #182236;
}

.bag-item-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.bag-item-btn span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bag-item-btn strong {
  color: var(--color-gold);
  font-size: 0.56rem;
  flex-shrink: 0;
}

.combat-console-panel {
  height: 100%;
  min-height: 0;
}

.console-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-pixel-ui);
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--color-gold);
  border-bottom: 0.0625rem solid var(--border-pixel);
  padding-bottom: 0.3125rem;
  margin-bottom: 0.3125rem;
}

.console-dot.green {
  width: 0.5rem;
  height: 0.5rem;
  background: #10b981;
  border-radius: 50%;
}

.console-body {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.8rem;
  line-height: 1.4;
}

.log-entry {
  padding-bottom: 0.1875rem;
  border-bottom: 0.0625rem solid rgba(255, 255, 255, 0.04);
}

/* ========================================================
   MODAIS
======================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(0.3125rem);
  z-index: 100;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 1.25rem;
}

.modal-backdrop.active { display: flex; }
.modal-backdrop.active:not(.modal-closing) { animation: modalBackdropIn .2s ease-out both; }
.modal-backdrop.modal-closing { animation: modalBackdropOut .18s ease-in both; }
.modal-backdrop.active:not(.modal-closing) > .modal-card { animation: modalCardIn .22s cubic-bezier(.2,.8,.2,1) both; }
.modal-backdrop.modal-closing > .modal-card { animation: modalCardOut .18s ease-in both; }

@keyframes modalBackdropIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalBackdropOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes modalCardIn { from { opacity: 0; transform: translateY(0.625rem) scale(.975); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes modalCardOut { from { opacity: 1; transform: translateY(0) scale(1); } to { opacity: 0; transform: translateY(0.5rem) scale(.985); } }

.modal-card {
  max-width: 35rem;
  width: 100%;
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 1rem 1.25rem;
  border-bottom: 0.125rem solid var(--border-pixel);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-header h2 {
  font-family: var(--font-pixel-ui);
  font-size: 1.15rem;
  color: var(--color-gold);
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  border-radius: 0.375rem;
  transition: color .18s ease, background .18s ease, box-shadow .18s ease, text-shadow .18s ease;
}

.btn-close-modal:hover, .btn-close-modal:focus-visible,
.trainer-profile-close:hover, .trainer-profile-close:focus-visible {
  color: #fff;
  background: #173451;
  box-shadow: 0 0 .75rem #38bdf877, inset 0 0 .35rem #38bdf833;
  text-shadow: 0 0 .4rem #7dd3fc;
}

.modal-body-scroll {
  padding: 1rem 1.25rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
}

.section-label {
  font-family: var(--font-pixel-ui);
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--color-blue);
  margin-bottom: 0.5rem;
}

.settings-help-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.pokeapi-sync-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.625rem;
  background: #0b1120;
  border: 0.0625rem solid var(--border-pixel);
  padding: 0.625rem;
  border-radius: 0.5rem;
  flex-wrap: wrap;
}

.btn-sync-api {
  font-family: var(--font-pixel-ui);
  padding: 0.4375rem 0.875rem;
  border-radius: 0.375rem;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4375rem;
  transition: all 0.15s ease;
  line-height: 1.2;
}

.btn-sync-api:active {
  transform: translateY(0.0625rem);
}

/* 1. Botão PokéAPI: ROXO */
#btnSyncPokeApiJs,
.btn-purple {
  background: rgba(168, 85, 247, 0.2) !important;
  border: 0.09375rem solid #a855f7 !important;
  color: #c084fc !important;
}

#btnSyncPokeApiJs:hover,
.btn-purple:hover {
  background: rgba(168, 85, 247, 0.36) !important;
  border-color: #c084fc !important;
  color: #f3e8ff !important;
  box-shadow: 0 0 0.75rem rgba(168, 85, 247, 0.5) !important;
}

.sync-status-label {
  font-family: var(--font-clean);
  font-size: 0.75rem;
  color: #34d399;
  font-weight: 700;
}

.music-categories-container {
  display: flex;
  flex-direction: column;
  gap: 0.4375rem;
  max-height: 18.125rem;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.music-category-group {
  background: rgba(15, 23, 42, 0.65);
  border: 0.0625rem solid rgba(255, 255, 255, 0.08);
  border-radius: 0.375rem;
  overflow: hidden;
}

.music-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.3125rem 0.5625rem;
  background: rgba(255, 255, 255, 0.04);
  font-family: var(--font-pixel-ui);
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.01875rem;
  border-bottom: 0.0625rem solid rgba(255, 255, 255, 0.05);
}

.music-category-header .cat-count {
  font-size: 0.63rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.0625rem 0.375rem;
  border-radius: 0.5rem;
  color: #cbd5e1;
  font-weight: 600;
}

.music-track-list {
  display: flex;
  flex-direction: column;
}

.music-track-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.625rem;
  cursor: pointer;
  transition: all 0.12s ease;
  border-bottom: 0.0625rem solid rgba(255, 255, 255, 0.03);
  font-size: 0.76rem;
  color: #cbd5e1;
  user-select: none;
}

.music-track-item:last-child {
  border-bottom: none;
}

.music-track-item:hover {
  background: rgba(56, 189, 248, 0.09);
  color: #fff;
}

.music-track-item input[type="radio"] {
  accent-color: #38bdf8;
  cursor: pointer;
  width: 0.8125rem;
  height: 0.8125rem;
  margin: 0;
  flex-shrink: 0;
}

.music-track-item.selected {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  font-weight: 700;
}

.music-track-item .track-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--font-pixel-ui);
  font-size: 0.74rem;
}

.music-track-item .track-indicator {
  font-size: 0.62rem;
  opacity: 0;
  color: #38bdf8;
  transition: opacity 0.12s ease;
  flex-shrink: 0;
}

.music-track-item.selected .track-indicator {
  opacity: 1;
}

.slider-group { margin-bottom: 0.625rem; }
.slider-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.3125rem;
  font-size: 0.82rem;
}
.slider-pct { font-weight: 800; color: var(--color-blue); }
.range-modern { width: 100%; accent-color: var(--color-blue); cursor: pointer; }
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  cursor: pointer;
  color: #cbd5e1;
}

.modal-footer {
  padding: 0.75rem 1.25rem;
  border-top: 0.125rem solid var(--border-pixel);
  display: flex;
  justify-content: space-between;
}

.btn-modal-test {
  background: #1f2937;
  border: 0.0625rem solid var(--border-pixel);
  color: white;
  padding: 0.5rem 0.875rem;
  border-radius: 0.375rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-modal-apply {
  background: var(--color-gold);
  border: none;
  color: #090d18;
  padding: 0.5rem 1.25rem;
  border-radius: 0.375rem;
  font-weight: 800;
  cursor: pointer;
}

/* ============================================================================
   TELA DE FIM DE BATALHA (RESULTADOS DO DUELO)
============================================================================ */
#battleModal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(0.5rem);
  -webkit-backdrop-filter: blur(0.5rem);
  z-index: 100;
  display: flex !important;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  padding: 1rem;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.45s ease, backdrop-filter 0.45s ease;
}

#battleModal.active {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

#battleModal .battle-end-screen {
  box-sizing: border-box;
  max-width: 36.25rem;
  width: 100%;
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  padding: 1.375rem 1.5rem;
  background: linear-gradient(180deg, #101935 0%, #080d1b 100%);
  border: 0.125rem solid #3b82f6;
  border-radius: 0.875rem;
  box-shadow: 0 0.75rem 3rem rgba(0, 0, 0, 0.85), 0 0 1.75rem rgba(59, 130, 246, 0.25);
  transform: translateY(1.875rem) scale(0.92);
  opacity: 0;
  transition: transform 0.48s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.42s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

#battleModal.active .battle-end-screen {
  transform: translateY(0) scale(1);
  opacity: 1;
}

#battleModal .battle-end-screen.defeat-mode {
  border-color: #ef4444;
  box-shadow: 0 0.75rem 3rem rgba(0, 0, 0, 0.85), 0 0 1.75rem rgba(239, 68, 68, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: clamp(0.5rem, 1.5dvh, 0.875rem) clamp(0.75rem, 2.2vw, 1.25rem);
}

#battleModal .battle-end-screen.defeat-mode .battle-end-header {
  flex: 0 0 auto;
  margin-bottom: 0.375rem;
}

#battleModal .battle-end-screen.defeat-mode .battle-end-title {
  margin: 0 0 0.3125rem;
  font-size: clamp(1.2rem, 3.2dvh, 1.65rem);
}

#battleModal .battle-end-screen.defeat-mode .battle-end-trainer-avatar {
  width: 2.125rem;
  height: 2.125rem;
}

#battleModal .battle-end-screen.defeat-mode .battle-end-opponent-row {
  padding: 0.25rem 0.625rem;
}

#battleModal .battle-end-screen.defeat-mode .battle-end-summary {
  flex: 0 0 auto;
  min-height: 0;
  margin: 0.25rem 0;
}

#battleModal .battle-end-screen.defeat-mode .battle-end-stats-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.3125rem;
  margin-bottom: 0.375rem;
}

#battleModal .battle-end-screen.defeat-mode .battle-end-stat-pill {
  min-width: 0;
  padding: 0.3125rem 0.25rem;
}

#battleModal .battle-end-screen.defeat-mode .battle-end-stat-pill .stat-icon {
  font-size: 1rem;
}

#battleModal .battle-end-screen.defeat-mode .battle-end-stat-pill .stat-value {
  font-size: .84rem;
  line-height: 1.1;
}

#battleModal .battle-end-screen.defeat-mode .battle-end-stat-pill .stat-label {
  font-size: .56rem;
}

#battleModal .battle-end-screen.defeat-mode .defeat-retry-notice-card {
  margin: 0.3125rem 0;
  padding: 0.375rem 0.5625rem;
}

#battleModal .battle-end-screen.defeat-mode .defeat-retry-notice-card p {
  font-size: .72rem !important;
  line-height: 1.25 !important;
}

#battleModal .battle-end-screen.defeat-mode #modalBody > p {
  margin: 0.3125rem 0;
  font-size: .74rem !important;
  line-height: 1.25;
}

#battleModal .battle-end-screen.defeat-mode .battle-end-squad-section {
  flex: 0 0 auto;
  margin-bottom: 0.3125rem;
  padding: 0.375rem 0.5rem;
}

#battleModal .battle-end-screen.defeat-mode .battle-end-section-label {
  margin-bottom: 0.25rem;
  font-size: .62rem;
}

#battleModal .battle-end-screen.defeat-mode .end-poke-card {
  gap: 0.125rem;
  padding: 0.25rem 0.1875rem;
}

#battleModal .battle-end-screen.defeat-mode .end-poke-sprite {
  width: 2.125rem;
  height: 2.125rem;
}

#battleModal .battle-end-screen.defeat-mode .battle-end-actions {
  flex: 0 0 auto;
  gap: 0.5rem;
  margin-top: 0.3125rem;
}

#battleModal .battle-end-screen.defeat-mode .btn-battle-end {
  min-height: 2.375rem;
  padding: 0.4375rem 0.625rem;
  font-size: .82rem;
}

@media (max-height: 620px) {
  #battleModal { padding: 0.5rem; }
  #battleModal .battle-end-screen.defeat-mode {
    max-height: calc(100dvh - 1rem);
    padding: 0.375rem 0.75rem;
  }
  #battleModal .battle-end-screen.defeat-mode .battle-end-badge { margin-bottom: 0.125rem; padding: 0.1875rem 0.5625rem; font-size: .62rem; }
  #battleModal .battle-end-screen.defeat-mode .battle-end-title { font-size: 1.15rem; }
  #battleModal .battle-end-screen.defeat-mode .battle-end-squad-section { padding: 0.25rem 0.375rem; }
  #battleModal .battle-end-screen.defeat-mode .end-poke-sprite { width: 1.75rem; height: 1.75rem; }
  #battleModal .battle-end-screen.defeat-mode .end-poke-xp-tag { font-size: .55rem; }
  #battleModal .battle-end-screen.defeat-mode .battle-end-stat-pill { padding: 0.1875rem 0.125rem; }
  #battleModal .battle-end-screen.defeat-mode .battle-end-stat-pill .stat-icon { font-size: .85rem; }
  #battleModal .battle-end-screen.defeat-mode .battle-end-stat-pill .stat-value { font-size: .74rem; }
  #battleModal .battle-end-screen.defeat-mode .battle-end-trainer-avatar { width: 1.75rem; height: 1.75rem; }
}

@media (max-height: 460px) {
  #battleModal .battle-end-screen.defeat-mode .battle-end-squad-section { display: none; }
  #battleModal .battle-end-screen.defeat-mode .battle-end-trainer-sub { display: none; }
  #battleModal .battle-end-screen.defeat-mode .battle-end-summary { margin: 0.125rem 0; }
}

.battle-end-header {
  text-align: center;
  margin-bottom: 0.75rem;
}

.battle-end-badge {
  display: inline-block;
  margin: 0 auto 0.375rem;
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 0.0625rem solid rgba(52, 211, 153, 0.4);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.03125rem;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: 1.25rem;
}

.battle-end-badge.defeat {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.4);
}

.battle-end-title {
  font-family: var(--font-pixel-ui);
  font-size: 1.85rem;
  font-weight: 900;
  margin: 0.125rem 0 0.625rem;
  color: var(--color-gold);
  text-shadow: 0 0 1rem rgba(251, 191, 36, 0.45);
}

.battle-end-title.defeat {
  color: #ef4444;
  text-shadow: 0 0 1rem rgba(239, 68, 68, 0.45);
}

.battle-end-opponent-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: rgba(15, 23, 42, 0.65);
  border: 0.0625rem solid rgba(255, 255, 255, 0.08);
  border-radius: 0.625rem;
  padding: 0.375rem 0.875rem;
  margin: 0 auto;
  max-width: 27.5rem;
}

.battle-end-trainer-avatar {
  width: 2.75rem;
  height: 2.75rem;
  object-fit: contain;
  background: rgba(2, 6, 23, 0.5);
  border-radius: 0.5rem;
  border: 0.0625rem solid rgba(255, 255, 255, 0.1);
}

.battle-end-opponent-info {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.battle-end-trainer-name {
  font-size: 0.88rem;
  font-weight: 800;
  color: #f1f5f9;
}

.battle-end-trainer-sub {
  font-size: 0.74rem;
  color: #94a3b8;
  font-style: italic;
  max-width: 20rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.battle-end-summary {
  margin: 0.75rem 0;
}

.battle-end-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.125rem, 1fr));
  gap: 0.625rem;
  margin-bottom: 0.75rem;
}

.battle-end-stat-pill {
  background: rgba(15, 23, 42, 0.85);
  border: 0.0625rem solid #334155;
  border-radius: 0.5625rem;
  padding: 0.5rem 0.625rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.125rem;
}

.battle-end-stat-pill .stat-icon {
  font-size: 1.3rem;
}

.battle-end-stat-pill .stat-value {
  font-size: 1.05rem;
  font-weight: 900;
  color: #fbbf24;
  font-family: var(--font-clean);
}

.battle-end-stat-pill .stat-label {
  font-size: 0.68rem;
  color: #94a3b8;
  font-weight: 800;
  text-transform: uppercase;
}

.battle-end-squad-section {
  background: rgba(10, 15, 29, 0.75);
  border: 0.0625rem solid rgba(255, 255, 255, 0.08);
  border-radius: 0.625rem;
  padding: 0.625rem 0.75rem;
  margin-bottom: 0.75rem;
}

.battle-end-section-label {
  font-size: 0.72rem;
  font-weight: 900;
  color: var(--color-blue);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  text-align: left;
  letter-spacing: 0.03125rem;
}

.battle-end-squad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.end-poke-card {
  background: rgba(15, 23, 42, 0.85);
  border: 0.0625rem solid #334155;
  border-radius: 0.5rem;
  padding: 0.5rem 0.375rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.end-poke-sprite {
  width: 3rem;
  height: 3rem;
  object-fit: contain;
  filter: drop-shadow(0 0.125rem 0.25rem rgba(0, 0, 0, 0.5));
}

.end-poke-info {
  width: 100%;
}

.end-poke-name-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 800;
  margin-bottom: 0.1875rem;
}

.end-poke-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 4.0625rem;
  color: #f1f5f9;
}

.end-poke-level {
  color: #38bdf8;
  font-weight: 900;
  font-family: var(--font-clean);
}

.end-poke-hp-track {
  width: 100%;
  height: 0.3125rem;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 0.1875rem;
  overflow: hidden;
  margin-bottom: 0.1875rem;
}

.end-poke-hp-bar {
  height: 100%;
  width: 100%;
  transform-origin: left center;
  transition: transform 0.4s ease;
}

.end-poke-xp-tag {
  font-size: 0.65rem;
  font-weight: 800;
  color: #34d399;
  display: block;
}

.modal-perks-section {
  margin-bottom: 0.75rem;
  text-align: left;
}

.perk-prompt-title {
  font-size: 0.72rem;
  font-weight: 900;
  color: var(--color-blue);
  margin-bottom: 0.5rem;
  text-align: center;
}

.modal-perks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.125rem, 1fr));
  gap: 0.5rem;
}

.perk-choice-card {
  background: var(--bg-card);
  border: 0.125rem solid var(--border-pixel);
  border-radius: 0.5rem;
  padding: 0.5625rem 0.375rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.perk-choice-card:hover {
  transform: translateY(-0.125rem);
  border-color: #60a5fa;
}

.perk-choice-card.selected-perk {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.2);
  box-shadow: 0 0 0.75rem rgba(16, 185, 129, 0.3);
}

.perk-icon { font-size: 1.3rem; margin-bottom: 0.1875rem; }
.perk-title { font-size: 0.75rem; font-weight: 800; color: white; }
.perk-desc { font-size: 0.65rem; color: var(--text-muted); }

.battle-end-actions {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 0.75rem;
  margin-top: 0.625rem;
  min-width: 0;
}

.btn-battle-end {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: 0.75rem 1rem;
  font-size: 0.92rem;
  font-weight: 800;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
}

.btn-battle-end.secondary {
  background: rgba(30, 41, 59, 0.85);
  border: 0.125rem solid #475569;
  color: #cbd5e1;
}

.btn-battle-end.secondary:hover {
  background: rgba(51, 65, 85, 0.95);
  border-color: #94a3b8;
  color: white;
}

.btn-battle-end.primary {
  background: linear-gradient(180deg, #10b981 0%, #047857 100%);
  color: white;
  border: 0.125rem solid #34d399;
  box-shadow: 0 0.25rem 0.875rem rgba(16, 185, 129, 0.35);
}

.btn-battle-end.primary:hover {
  background: linear-gradient(180deg, #34d399 0%, #059669 100%);
  transform: translateY(-0.125rem);
  box-shadow: 0 0.375rem 1.125rem rgba(16, 185, 129, 0.5);
}

/* Loading Overlay */
.pokeball-spinner {
  width:3.5rem; height:3.5rem; display:grid; place-items:center;
  border:1px solid #fbbf24; border-radius:.75rem;
  background:#f59e0b1f; box-shadow:0 0 1rem #f59e0b40;
}
.loading-pokeball-svg { width:82%; height:82%; filter:drop-shadow(0 .125rem .375rem #0009); animation:spinBall 1s cubic-bezier(.68,-.55,.27,1.55) infinite; }
@media(prefers-reduced-motion:reduce){.loading-pokeball-svg{animation:none}}

@keyframes spinBall {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

#loadingOverlay {
  position: fixed;
  inset: 0;
  background: var(--bg-main);
  z-index: 200;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.875rem;
}

.loading-text {
  font-family: var(--font-pixel-ui);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-gold);
}

/* ========================================================
   ÍCONES VETORIAIS (SVG) MODERNOS E NÍTIDOS
======================================================== */
.ui-svg-icon {
  width: 1.125rem;
  height: 1.125rem;
  stroke: currentColor;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.panel-header-svg {
  width: 1.25rem;
  height: 1.25rem;
  stroke: var(--color-gold);
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.25rem;
}

.coin-icon {
  width: 1.25rem;
  height: 1.25rem;
}

.coin-icon.inline {
  width: 1rem;
  height: 1rem;
  margin-right: 0.25rem;
}

.trophy-icon {
  width: 1.125rem;
  height: 1.125rem;
}

/* Barra Superior no Modo Jogo */
.nav-btn-home {
  position: fixed;
  left: .625rem;
  bottom: .5rem;
  z-index: 81;
  width: 2.125rem;
  height: 2.125rem;
  justify-content: center;
  font-family: var(--font-pixel-ui);
  background: linear-gradient(180deg, #dc2626 0%, #991b1b 100%);
  border: 0.0625rem solid #f87171;
  color: #ffffff;
  padding: .375rem;
  border-radius: 0.4375rem;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4375rem;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .15s;
  box-shadow: 0 0 .625rem rgba(239, 68, 68, .3);
}

.in-home-screen .nav-btn-home { display: none; }
.nav-btn-home .ui-svg-icon { width: 1.125rem; height: 1.125rem; }
.nav-btn-home:focus-visible { outline: .125rem solid #fecaca; outline-offset: .1875rem; }

.nav-btn-home:hover {
  background: linear-gradient(180deg, #ef4444 0%, #b91c1c 100%);
  border-color: #fca5a5;
  box-shadow: 0 0 1rem rgba(239, 68, 68, .6);
  transform: translateY(-0.0625rem);
}

.brand-ingame {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-ingame-logo { flex-direction: column; justify-content: center; gap: .25rem; height: 2.375rem; padding: .25rem .625rem; overflow: clip; contain: paint; }
.navbar .brand-ingame-logo .battlemon-pixel-logo { font-size: .9rem; line-height: 1.1; letter-spacing: .04rem; white-space: nowrap; text-shadow: 0 .0625rem 0 #b45309, 0 .125rem 0 #78350f, 0 0 .25rem rgba(251, 191, 36, .8), 0 0 .5rem rgba(245, 158, 11, .45); filter: none; }
.brand-ingame-logo .battlemon-random-sublogo { font-size: .35rem; line-height: 1.2; letter-spacing: .16rem; padding: .125rem .625rem; border-width: .0625rem; border-radius: .25rem; box-shadow: 0 .0625rem 0 #7c2d12, 0 0 .25rem rgba(249, 115, 22, .25); }
.brand-ingame-logo .sublogo-text, .brand-ingame-logo .brand-wave-letter { font-family: var(--font-pixel-title); }
.brand-wave-letter { display: inline-block; animation: brandLetterWave 3.6s ease-in-out infinite; animation-delay: var(--wave-delay); }
@keyframes brandLetterWave { 0%, 65%, 100% { transform: translate3d(0, 0, 0); } 18% { transform: translate3d(0, -.08rem, 0); } 38% { transform: translate3d(0, .04rem, 0); } }
@media (prefers-reduced-motion: reduce) { .brand-wave-letter { animation: none; } }

.currency-sub {
  font-size: 0.68rem;
  color: var(--color-gold);
  opacity: 0.8;
  margin-left: 0.125rem;
}

/* ========================================================
   BARRA DE NAVEGAÇÃO NA PARTE DE BAIXO (BOTTOM GAME NAV)
   Aba da Torre fica no meio e destacada!
======================================================== */
.bottom-game-nav {
  width: 100%;
  background: #090e1c;
  border-top: 0.1875rem solid #1e293b;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(0.375rem, 1.4vw, 1.125rem);
  padding: 0.375rem 0.875rem;
  flex-shrink: 0;
  z-index: 80;
  box-shadow: 0 -0.5rem 1.5rem rgba(0, 0, 0, 0.65);
}

.bottom-nav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1875rem;
  background: #111a2e;
  border: 0.125rem solid #243555;
  border-radius: 0.5rem;
  padding: 0.375rem 0.875rem;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.14s ease;
  min-width: 5.625rem;
  position: relative;
}

.bottom-nav-tab .tab-icon {
  width: 1.25rem;
  height: 1.25rem;
  stroke: currentColor;
}

.bottom-nav-tab .tab-label {
  font-family: var(--font-pixel-ui);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.025rem;
}

.bottom-nav-tab .tab-lock-indicator {
  position: absolute;
  top: 0.25rem;
  right: 0.375rem;
  font-size: 0.65rem;
}

.bottom-nav-tab:hover {
  background: #1b2945;
  color: #f8fafc;
  border-color: #38bdf8;
  transform: translateY(-0.125rem);
}

.bottom-nav-tab.active {
  background: #172554;
  border-color: #38bdf8;
  color: #38bdf8;
  box-shadow: 0 0 0.75rem rgba(56, 189, 248, 0.3);
}

/* ABA DA TORRE NO MEIO — DESTACADA */
.bottom-nav-tab.center-tower-tab {
  background: linear-gradient(180deg, #991b1b 0%, #450a0a 100%);
  border: 0.125rem solid #f59e0b;
  color: #fbbf24;
  min-width: 8.4375rem;
  padding: 0.375rem 1rem;
  transform: translateY(-0.0625rem);
  box-shadow:
    0 0 0.875rem rgba(245, 158, 11, 0.35),
    0 0.125rem 0.5rem rgba(0, 0, 0, 0.5);
}

.bottom-nav-tab.center-tower-tab .center-icon {
  width: 1.25rem;
  height: 1.25rem;
  stroke: #fbbf24;
}

.bottom-nav-tab.center-tower-tab:hover {
  transform: translateY(-0.1875rem);
  box-shadow:
    0 0 1.25rem rgba(245, 158, 11, 0.55),
    0 0.125rem 0.625rem rgba(0, 0, 0, 0.6);
}

.bottom-nav-tab.center-tower-tab.active {
  background: linear-gradient(180deg, #b91c1c 0%, #7f1d1d 100%);
  border-color: #fef08a;
  box-shadow:
    0 0 1.25rem rgba(251, 191, 36, 0.55),
    0 0.125rem 0.625rem rgba(0, 0, 0, 0.6);
}

.center-tab-content {
  display: flex;
  align-items: center;
  gap: 0.4375rem;
}

.center-tab-label {
  font-family: var(--font-pixel-title);
  font-size: 0.78rem;
  letter-spacing: 0.0625rem;
}

.center-tab-badge {
  background: #fbbf24;
  color: #450a0a;
  font-family: var(--font-pixel-ui);
  font-size: 0.68rem;
  font-weight: 900;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
}

/* ========================================================
   SISTEMA DE TIME LOCKADO NA TORRE (#squadScreen)
======================================================== */
.squad-lock-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5625rem 0.875rem;
  border-radius: 0.5rem;
  margin-bottom: 0.375rem;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.squad-lock-banner.locked {
  background: rgba(185, 28, 28, 0.22);
  border: 0.125rem solid #ef4444;
  color: #fecaca;
}

.squad-lock-banner.unlocked {
  background: rgba(16, 185, 129, 0.18);
  border: 0.125rem solid #10b981;
  color: #a7f3d0;
}

.squad-lock-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.lock-status-badge {
  font-family: var(--font-pixel-title);
  font-size: 0.68rem;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  letter-spacing: 0.05rem;
  padding: 0.1875rem 0.5rem;
  border-radius: 0.3125rem;
  background: rgba(0, 0, 0, 0.4);
}

.squad-lock-info {
  font-family: var(--font-pixel-ui);
  font-size: 0.78rem;
  font-weight: 600;
}

.btn-forfeit-run {
  font-family: var(--font-pixel-ui);
  background: #7f1d1d;
  border: 0.0625rem solid #fca5a5;
  color: white;
  padding: 0.3125rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.14s;
}

.btn-forfeit-run:hover {
  background: #991b1b;
  border-color: #f87171;
}

.clean-slot-card.locked-slot {
  border-color: #475569;
  cursor: not-allowed;
}

.clean-slot-card.locked-slot:hover {
  border-color: #ef4444;
}

/* ========================================================
   TELA DEDICADA: LOJA DE ITENS E RELÍQUIAS (#shopScreen)
======================================================== */
.dedicated-shop-wrapper {
  padding: clamp(0.625rem, 1.4dvh, 1rem) 1.125rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.shop-hero-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.625rem;
  flex-shrink: 0;
  border-bottom: 0.125rem solid var(--border-pixel);
  padding-bottom: 0.5rem;
}

.shop-balance-pill {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  background: #141e33;
  border: 0.125rem solid var(--color-gold);
  padding: 0.375rem 0.875rem;
  border-radius: 0.5rem;
  font-family: var(--font-pixel-ui);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--color-gold);
}

.dedicated-shop-grid {
  display: flex;
  justify-content: center;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

@media (max-width: 900px) {
  .dedicated-shop-grid {
    overflow-y: auto;
  }
}

.shop-category-col {
  max-width: 42.5rem;
  width: 100%;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.category-header {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  flex-shrink: 0;
  border-bottom: 0.0625rem dashed var(--border-pixel);
  padding-bottom: 0.375rem;
}

.category-header h3 {
  font-family: var(--font-pixel-ui);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--color-gold);
}

.category-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.shop-items-vertical-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.25rem;
}

/* ========================================================
   TELA DEDICADA: BATALHA CASUAL (#casualScreen)
======================================================== */
.casual-hub-wrapper {
  padding: clamp(0.625rem, 1.4dvh, 1rem) 1.125rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.casual-hero-header {
  flex-shrink: 0;
  border-bottom: 0.125rem solid var(--border-pixel);
  padding-bottom: 0.5rem;
}

.casual-options-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 1rem;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

@media (max-width: 900px) {
  .casual-options-grid {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
}

.casual-card {
  padding: 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  height: 100%;
  min-height: 0;
}

.casual-diff-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.casual-diff-btn {
  background: var(--bg-card);
  border: 0.125rem solid var(--border-pixel);
  border-radius: 0.5rem;
  padding: 0.625rem 0.875rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: all 0.14s;
  box-sizing: border-box;
  width: 100%;
}

.casual-diff-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--color-blue);
  box-shadow: 0 0 0.75rem rgba(56, 189, 248, 0.35);
}

.casual-diff-btn.active {
  border-color: var(--color-gold);
  background: rgba(251, 191, 36, 0.12);
  box-shadow: 0 0 0.875rem rgba(251, 191, 36, 0.2);
}

.diff-title {
  font-family: var(--font-pixel-ui);
  font-size: 0.95rem;
  font-weight: 800;
  color: #f8fafc;
}

.diff-desc {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.btn-launch-casual {
  font-family: var(--font-pixel-ui);
  background: linear-gradient(180deg, #ef4444 0%, #b91c1c 100%);
  border: 0.125rem solid #fca5a5;
  color: white;
  padding: 0.75rem;
  border-radius: 0.5rem;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 0.25rem 0 #7f1d1d;
  flex-shrink: 0;
}

.btn-launch-casual:hover {
  transform: translateY(-0.125rem);
  filter: brightness(1.1);
}

.casual-tips-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  font-size: 0.8rem;
  line-height: 1.45;
  color: #cbd5e1;
}

.casual-tips-list li {
  background: rgba(255, 255, 255, 0.03);
  padding: 0.625rem;
  border-radius: 0.375rem;
  border-left: 0.1875rem solid var(--color-blue);
}

/* ==========================================================================
   SHINY POKÉMON - NOME DOURADO CHAMATIVO COM LEVE GLOW ANIMADO DISCRETO
   ========================================================================== */
.shiny-name-gold {
  color: #fde047 !important;
  font-weight: 800;
  display: inline;
  letter-spacing: 0.03125rem;
  text-shadow: 0 0 0.1875rem rgba(251, 191, 36, 0.65);
  animation: shinyGoldPulse 2.2s ease-in-out infinite alternate;
}

@keyframes shinyGoldPulse {
  0% {
    color: #fde047;
    text-shadow: 0 0 0.125rem rgba(251, 191, 36, 0.6);
  }
  100% {
    color: #fef08a;
    text-shadow: 0 0 0.5rem rgba(251, 191, 36, 0.95);
  }
}

/* ========================================================
   PAINEL DE ATUALIZAÇÕES AUTOMÁTICAS & ZONA DE PERIGO
======================================================== */
.danger-section-label {
  color: #f87171 !important;
}

.danger-sync-box {
  background: rgba(136, 19, 55, 0.12) !important;
  border-color: rgba(244, 63, 94, 0.3) !important;
}

.updater-status-inline {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-wrap: wrap;
}

.updater-badge {
  font-family: var(--font-clean) !important;
  font-size: 0.75rem !important;
  color: #34d399 !important;
  font-weight: 700 !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
}

/* 2. Botão de Atualizações: VERDE */
#btnCheckUpdates,
.btn-check-updates,
.btn-green {
  font-family: var(--font-pixel-ui);
  background: rgba(16, 185, 129, 0.2) !important;
  border: 0.09375rem solid #10b981 !important;
  color: #34d399 !important;
  padding: 0.4375rem 0.875rem;
  border-radius: 0.375rem;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4375rem;
  transition: all 0.15s ease;
  line-height: 1.2;
}

#btnCheckUpdates:hover,
.btn-check-updates:hover,
.btn-green:hover {
  background: rgba(16, 185, 129, 0.36) !important;
  border-color: #34d399 !important;
  color: #ecfdf5 !important;
  box-shadow: 0 0 0.75rem rgba(16, 185, 129, 0.5) !important;
}

#btnCheckUpdates:active,
.btn-check-updates:active,
.btn-green:active {
  transform: translateY(0.0625rem);
}

.update-icon-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.875rem;
  height: 0.875rem;
}

.update-icon-wrapper svg {
  width: 100%;
  height: 100%;
}

.update-icon-wrapper.spinning {
  animation: spinIcon 0.8s linear infinite;
}

@keyframes spinIcon {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.update-status-box {
  display: inline-flex;
  align-items: center;
  background: transparent;
  border: none;
  padding: 0;
}

.update-status-text {
  font-family: var(--font-clean) !important;
  font-size: 0.75rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}

.text-sky { color: #38bdf8; }
.text-emerald { color: #34d399; }
.text-gold { color: #fbbf24; }
.text-rose { color: #f87171; }

/* 3. Zona de Perigo: Botão de Reset Vermelho Estilizado */
#btnHardReset,
.btn-danger-reset,
.btn-sync-danger,
.btn-red {
  font-family: var(--font-pixel-ui);
  background: rgba(239, 68, 68, 0.2) !important;
  border: 0.09375rem solid #ef4444 !important;
  color: #fca5a5 !important;
  padding: 0.4375rem 0.875rem;
  border-radius: 0.375rem;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4375rem;
  transition: all 0.15s ease;
  line-height: 1.2;
}

#btnHardReset:hover,
.btn-danger-reset:hover,
.btn-sync-danger:hover,
.btn-red:hover {
  background: rgba(239, 68, 68, 0.36) !important;
  border-color: #f87171 !important;
  color: #ffffff !important;
  box-shadow: 0 0 0.75rem rgba(239, 68, 68, 0.55) !important;
}

#btnHardReset:active,
.btn-danger-reset:active,
.btn-sync-danger:active,
.btn-red:active {
  transform: translateY(0.0625rem);
}

#btnHardReset.confirming,
.btn-danger-reset.confirming,
.btn-sync-danger.confirming,
.btn-red.confirming {
  background: #dc2626 !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
  box-shadow: 0 0 1rem rgba(239, 68, 68, 0.9) !important;
  animation: pulseDanger 1s infinite alternate;
}

@keyframes pulseDanger {
  from { box-shadow: 0 0 0.25rem rgba(239, 68, 68, 0.4); }
  to { box-shadow: 0 0 0.875rem rgba(239, 68, 68, 0.9); }
}

/* 5. Drop de Shiny em Batalha (0.01%) */
.shiny-drop-celebration-card {
  margin-top: 0.875rem;
  padding: 1rem;
  background: linear-gradient(135deg, rgba(120, 53, 15, 0.6) 0%, rgba(30, 27, 75, 0.8) 100%);
  border: 0.125rem solid #fbbf24;
  border-radius: 0.625rem;
  text-align: center;
  box-shadow: 0 0 1.5rem rgba(251, 191, 36, 0.45);
  animation: shinyBannerPulse 2.2s infinite alternate;
}

@keyframes shinyBannerPulse {
  0% { border-color: #f59e0b; box-shadow: 0 0 1rem rgba(245, 158, 11, 0.4); }
  100% { border-color: #fef08a; box-shadow: 0 0 2rem rgba(251, 191, 36, 0.85); }
}

.shiny-drop-sparkles {
  font-size: 1.4rem;
  letter-spacing: 0.25rem;
  color: #fde047;
}

.shiny-drop-tag {
  font-family: var(--font-pixel-ui);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.125rem;
  color: #fef08a;
  text-transform: uppercase;
  margin: 0.25rem 0 0.5rem;
}

.shiny-drop-sprite {
  width: 5.625rem;
  height: 5.625rem;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 0.75rem rgba(251, 191, 36, 0.9));
}

.shiny-drop-name {
  font-family: var(--font-pixel-ui);
  font-size: 1.25rem;
  font-weight: 800;
  color: #fbbf24;
  text-shadow: 0 0 0.625rem rgba(251, 191, 36, 0.9);
  margin-top: 0.25rem;
}

.shiny-drop-desc {
  font-size: 0.82rem;
  color: #e2e8f0;
  margin-top: 0.25rem;
}

/* 6. Botão de Shiny Bloqueado no Esquadrão */
.btn-slot-mini.shiny-locked {
  opacity: 0.55 !important;
  filter: grayscale(0.5);
  background: rgba(15, 23, 42, 0.6) !important;
  border-color: #475569 !important;
  cursor: pointer !important;
}

.btn-slot-mini.shiny-locked:hover {
  opacity: 0.9 !important;
  border-color: #f59e0b !important;
  box-shadow: 0 0 0.5rem rgba(245, 158, 11, 0.4);
}

/* 7. Card de Drop Raro de Item de Treinador (10% Chance) */
.item-drop-reward-card {
  margin-top: 0.625rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  border: 0.09375rem solid var(--item-drop-border, #10b981);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(15, 23, 42, 0.92) 100%);
  box-shadow: 0 0 0.875rem var(--item-drop-shadow, rgba(16, 185, 129, 0.25));
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-align: left;
  animation: itemDropPop 0.35s ease-out;
}

@keyframes itemDropPop {
  0% { transform: scale(0.96); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.item-drop-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  border: 0.09375rem solid #10b981;
  background: rgba(16, 185, 129, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
  box-shadow: 0 0.125rem 0.375rem rgba(0, 0, 0, 0.35);
}

.item-drop-info {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.item-drop-tag {
  font-family: var(--font-pixel-ui);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.0625rem;
  color: #a7f3d0;
  text-transform: uppercase;
}

.item-drop-name {
  font-family: var(--font-pixel-ui);
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
}

.item-drop-desc {
  font-size: 0.78rem;
  color: #cbd5e1;
}

/* ========================================================
   MODAL DE ATUALIZAÇÃO DO JOGO (GITHUB AUTO-UPDATE)
======================================================== */
.update-modal-card {
  max-width: 32.5rem;
  width: 92%;
  background: linear-gradient(180deg, #0d1527 0%, #060b17 100%);
  border: 0.125rem solid #38bdf8;
  border-radius: 0.75rem;
  box-shadow: 0 0 2.1875rem rgba(56, 189, 248, 0.35), 0 1.25rem 2.8125rem rgba(0, 0, 0, 0.9);
  overflow: hidden;
  box-sizing: border-box;
}

.update-modal-header {
  border-bottom: 0.0625rem solid rgba(56, 189, 248, 0.3);
  padding: 0.75rem 1.125rem;
  background: rgba(56, 189, 248, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.update-modal-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.update-modal-icon-box {
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(56, 189, 248, 0.15);
  border: 0.09375rem solid #38bdf8;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 0 0.625rem rgba(56, 189, 248, 0.25);
}

.update-modal-badge {
  font-family: var(--font-pixel-title);
  font-size: 0.65rem;
  color: #38bdf8;
  letter-spacing: 0.0625rem;
}

.update-modal-title {
  font-family: var(--font-pixel-ui);
  font-size: 1.05rem;
  font-weight: 900;
  color: #ffffff;
  margin: 0;
  letter-spacing: 0.03125rem;
}

.update-modal-body {
  padding: 1rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.update-version-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: #111d33;
  border: 0.0625rem solid rgba(56, 189, 248, 0.25);
  border-radius: 0.5rem;
  padding: 0.625rem 0.875rem;
}

.update-ver-tag {
  font-size: 0.82rem;
  color: #94a3b8;
}

.update-ver-tag strong {
  color: #f8fafc;
}

.update-ver-tag.latest strong {
  color: #38bdf8;
}

.update-ver-arrow {
  color: #38bdf8;
  font-size: 1rem;
}

.update-notes-container {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.update-notes-label {
  font-family: var(--font-pixel-title);
  font-size: 0.65rem;
  color: #94a3b8;
  letter-spacing: 0.05rem;
}

.update-notes-content {
  background: #090f1f;
  border: 0.0625rem solid rgba(255, 255, 255, 0.08);
  border-radius: 0.5rem;
  padding: 0.75rem 0.875rem;
  max-height: 10rem;
  overflow-y: auto;
  font-size: 0.82rem;
  color: #cbd5e1;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.update-progress-container {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  background: #111d33;
  border: 0.0625rem solid rgba(56, 189, 248, 0.3);
  border-radius: 0.5rem;
  padding: 0.625rem 0.875rem;
}

.update-progress-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: #cbd5e1;
}

.update-progress-pct {
  font-family: monospace;
  font-weight: 700;
  color: #38bdf8;
}

.update-progress-track {
  width: 100%;
  height: 0.5rem;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 0.25rem;
  overflow: hidden;
}

.update-progress-fill {
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, #0284c7, #38bdf8);
  border-radius: 0.25rem;
  transition: transform 0.2s ease;
}

.update-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.625rem;
  margin-top: 0.375rem;
}





/* ========================================================
   NOVO: PERFIL DO TREINADOR NO HEADER SUPERIOR
======================================================== */
.trainer-header-pill {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(15, 23, 42, 0.85);
  border: 0.09375rem solid rgba(56, 189, 248, 0.4);
  padding: 0.1875rem 0.75rem 0.1875rem 0.25rem;
  border-radius: 624.9375rem;
  box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.4);
  color: #e2e8f0;
  font: inherit;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.trainer-header-pill:hover {
  border-color: #38bdf8;
}

.trainer-header-pill img {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: #1e293b;
  border: 0.0625rem solid #38bdf8;
  object-fit: cover;
  image-rendering: pixelated;
}
.trainer-header-pill span { max-width: 7.875rem; overflow: hidden; text-overflow: ellipsis; }

.trainer-profile-anchor { position: relative; }
.nav-left .trainer-profile-popover { left: 0; right: auto; }
.home-profile-anchor { position: absolute; top: 1rem; left: 1rem; z-index: 10; max-width: calc(100vw - 2rem); }
.home-profile-button { display: flex; align-items: center; gap: .65rem; min-width: 12.5rem; max-width: 100%; min-height: 3.5rem; padding: .375rem .8rem .375rem .45rem; border: .09375rem solid #38bdf877; border-radius: 1rem; background: linear-gradient(135deg, #1b2b43f5, #0b1426f5); color: #f8fafc; box-shadow: 0 .35rem 1.5rem #0006, inset 0 .0625rem #ffffff15; cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.home-profile-button:hover, .home-profile-button[aria-expanded="true"] { border-color: #7dd3fc; box-shadow: 0 .35rem 1.5rem #0006, 0 0 1rem #38bdf830; }
.home-profile-button:focus-visible { outline: .125rem solid #fbbf24; outline-offset: .25rem; }
.home-profile-button > img { width: 2.5rem; height: 2.5rem; flex-shrink: 0; object-fit: contain; image-rendering: pixelated; border: .0625rem solid #38bdf866; border-radius: .75rem; background: #111d30; }
.home-profile-text { display: flex; flex-direction: column; align-items: flex-start; gap: .3rem; min-width: 0; }
.home-profile-text small { color: #7dd3fc; font: 700 .65rem var(--font-pixel-ui); letter-spacing: .08em; }
.home-profile-text strong { max-width: 11rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 800 .95rem var(--font-pixel-ui); }
.home-profile-button > svg { width: 1.1rem; height: 1.1rem; margin-left: auto; flex-shrink: 0; color: #7dd3fc; }
#homeTrainerProfileAnchor .trainer-profile-popover { position: absolute; top: calc(100% + .65rem); left: 0; right: auto; max-height: calc(100dvh - 9rem); overflow-y: auto; }
.trainer-profile-popover[hidden] { display: none; }
.trainer-profile-popover.profile-opening { animation: profilePopoverIn .2s cubic-bezier(.2,.8,.2,1) both; }
.trainer-profile-popover.profile-closing { animation: profilePopoverOut .17s ease-in both; pointer-events: none; }
@keyframes profilePopoverIn { from { opacity: 0; transform: translateY(-0.4375rem) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes profilePopoverOut { from { opacity: 1; transform: translateY(0) scale(1); } to { opacity: 0; transform: translateY(-0.3125rem) scale(.985); } }
.trainer-profile-popover {
  position: absolute;
  z-index: 1200;
  top: calc(100% + 0.5625rem);
  right: 0;
  width: min(20.625rem, calc(100vw - 1.5rem));
  box-sizing: border-box;
  padding: 0.875rem;
  color: #e2e8f0;
  background: linear-gradient(145deg, rgba(15, 23, 42, .99), rgba(7, 12, 24, .99));
  border: 0.0625rem solid rgba(56, 189, 248, .45);
  border-radius: 0.875rem;
  box-shadow: 0 1rem 2.625rem rgba(0, 0, 0, .62), 0 0 1.375rem rgba(56, 189, 248, .12);
  backdrop-filter: blur(0.875rem);
}
.trainer-profile-heading { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .5rem; }
.trainer-profile-section-label { color: #7dd3fc; font: 700 .57rem var(--font-pixel-title); letter-spacing: .04em; }
.trainer-profile-close { width: 1.75rem; height: 1.75rem; flex: 0 0 1.75rem; border: 0.0625rem solid #334155; border-radius: 0.5rem; color: #cbd5e1; background: #111a2c; font-size: 1rem; cursor: pointer; transition: color .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease, text-shadow .18s ease; }
.trainer-profile-close:hover, .trainer-profile-close:focus-visible { color: #fff; border-color: #7dd3fc; background: #173451; box-shadow: 0 0 .75rem #38bdf877, inset 0 0 .35rem #38bdf833; text-shadow: 0 0 .4rem #7dd3fc; }
.trainer-profile-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.4375rem; }
.trainer-profile-stat { display: flex; min-width: 0; flex-direction: column; align-items: center; gap: 0.25rem; padding: 0.5625rem 0.25rem; border: 0.0625rem solid rgba(148, 163, 184, .16); border-radius: 0.5625rem; background: rgba(30, 41, 59, .56); text-align: center; }
.trainer-profile-stat span { color: #94a3b8; font-size: .53rem; font-weight: 800; letter-spacing: .04em; }
.trainer-profile-stat strong { color: #fbbf24; font: 800 .88rem var(--font-pixel-ui); white-space: nowrap; }
.trainer-profile-stat small { color: #94a3b8; font-size: .58rem; white-space: nowrap; }
.trainer-profile-team-section { margin-top: 0.75rem; }
.trainer-profile-team { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.375rem; margin-top: 0.4375rem; }
.profile-team-pokemon { display: flex; min-width: 0; align-items: center; gap: 0.1875rem; padding: 0.3125rem 0.1875rem; border: 0.0625rem solid rgba(56, 189, 248, .2); border-radius: 0.5rem; background: rgba(15, 23, 42, .78); }
.profile-team-pokemon img { width: 2.375rem; height: 2.375rem; flex: 0 0 2.375rem; object-fit: contain; }
.profile-team-pokemon span { display: flex; min-width: 0; flex-direction: column; gap: 0.1875rem; }
.profile-team-pokemon strong { overflow: hidden; color: #f8fafc; font-size: .56rem; text-overflow: ellipsis; white-space: nowrap; }
.profile-team-pokemon small { color: #94a3b8; font-size: .55rem; }
.profile-team-empty { grid-column: 1 / -1; margin: 0; padding: 0.625rem; color: #94a3b8; font-size: .72rem; text-align: center; }

.trainer-header-pill span {
  font-family: var(--font-pixel-ui);
  font-weight: 700;
  font-size: 0.82rem;
  color: #f8fafc;
  max-width: 6.875rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ========================================================
   NOVO: BOTÕES SOCIAIS RÁPIDOS NA TELA INICIAL
======================================================== */
.title-quick-social-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.875rem;
  margin-top: 0.875rem;
  position: relative;
  z-index: 5;
}

.btn-title-aux {
  display: inline-flex;
  align-items: center;
  gap: 0.4375rem;
  background: rgba(15, 23, 42, 0.8);
  border: 0.09375rem solid rgba(56, 189, 248, 0.35);
  color: #e2e8f0;
  font-family: var(--font-pixel-ui);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(0.5rem);
}

.btn-title-aux:hover {
  background: rgba(30, 41, 59, 0.95);
  border-color: #38bdf8;
  color: #ffffff;
  transform: translateY(-0.125rem);
  box-shadow: 0 0.375rem 1rem rgba(56, 189, 248, 0.3);
}

.btn-title-aux .aux-icon {
  font-size: 1.05rem;
}

/* ========================================================
   NOVO: MODAL DE CRIAÇÃO DE PERSONAGEM
======================================================== */
.char-create-card {
  max-width: 41.25rem;
  width: 95vw;
  background: linear-gradient(180deg, #0d1527 0%, #080d19 100%);
  border: 0.125rem solid #38bdf8;
  box-shadow: 0 0 2.1875rem rgba(56, 189, 248, 0.25), 0 1.25rem 2.5rem rgba(0, 0, 0, 0.7);
  border-radius: 0.75rem;
  overflow: hidden;
}

.char-create-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: rgba(30, 41, 59, 0.6);
  border-bottom: 0.09375rem solid rgba(56, 189, 248, 0.3);
}

.char-create-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.char-create-icon-badge {
  width: 2.625rem;
  height: 2.625rem;
  border-radius: 0.625rem;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border: 0.09375rem solid #38bdf8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 0 0.75rem rgba(56, 189, 248, 0.4);
}

.char-create-badge {
  font-family: var(--font-pixel-title);
  font-size: 0.58rem;
  color: #38bdf8;
  letter-spacing: 0.0625rem;
}

.char-create-title {
  font-family: var(--font-pixel-ui);
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  margin-top: 0.125rem;
  letter-spacing: 0.03125rem;
}

.char-create-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.char-field-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.char-field-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-pixel-ui);
  font-size: 0.76rem;
  font-weight: 800;
  color: #94a3b8;
  letter-spacing: 0.03125rem;
}

.char-validation-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 0.0625rem solid rgba(239, 68, 68, 0.4);
}

.char-validation-badge.valid {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.4);
}

.char-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.char-input-icon {
  position: absolute;
  left: 0.875rem;
  font-size: 1.1rem;
  pointer-events: none;
}

.char-text-input {
  width: 100%;
  padding: 0.75rem 0.875rem 0.75rem 2.75rem;
  background: #0f172a;
  border: 0.09375rem solid #334155;
  border-radius: 0.5rem;
  color: #ffffff;
  font-family: var(--font-pixel-ui);
  font-size: 1.05rem;
  font-weight: 700;
  outline: none;
  transition: all 0.2s ease;
}

.char-text-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0.9375rem rgba(56, 189, 248, 0.35);
}

.char-field-hint {
  font-size: 0.72rem;
  color: #64748b;
}

.char-avatars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(4.875rem, 1fr));
  gap: 0.625rem;
  max-height: 13.75rem;
  overflow-y: auto;
  padding: 0.375rem;
  background: #070b14;
  border: 0.0625rem solid #1e293b;
  border-radius: 0.5rem;
}

.trainer-avatar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.25rem;
  background: #0f172a;
  border: 0.09375rem solid #1e293b;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.18s ease;
}

.trainer-avatar-item:hover {
  transform: translateY(-0.125rem);
  border-color: #38bdf8;
  background: #1e293b;
}

.trainer-avatar-item.selected {
  border-color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  box-shadow: 0 0 0.75rem rgba(251, 191, 36, 0.35);
}

.trainer-avatar-item img {
  width: 2.75rem;
  height: 2.75rem;
  object-fit: contain;
  image-rendering: pixelated;
}

.trainer-avatar-item span {
  font-size: 0.65rem;
  font-family: var(--font-pixel-ui);
  font-weight: 700;
  color: #94a3b8;
  margin-top: 0.25rem;
  text-transform: capitalize;
}

.trainer-avatar-item.selected span {
  color: #fbbf24;
}

.char-create-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.375rem;
}

.btn-char-next {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.8125rem 1.75rem;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border: 0.125rem solid #38bdf8;
  color: #ffffff;
  font-family: var(--font-pixel-ui);
  font-size: 0.95rem;
  font-weight: 800;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0.25rem 0.875rem rgba(2, 132, 199, 0.4);
}

.btn-char-next:hover:not(:disabled) {
  transform: translateY(-0.125rem) scale(1.02);
  box-shadow: 0 0.375rem 1.25rem rgba(56, 189, 248, 0.55);
}

.btn-char-next:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(1);
}

/* ========================================================
   NOVO: MODAL DE SELEÇÃO DOS 3 INICIAIS ULTRA ESTILIZADO
======================================================== */
.starter-select-card {
  max-width: 63.75rem;
  width: 96vw;
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #0b1120 0%, #070a13 100%);
  border: 0.125rem solid #f59e0b;
  box-shadow: 0 0 2.5rem rgba(245, 158, 11, 0.2), 0 1.5625rem 3.125rem rgba(0, 0, 0, 0.85);
  border-radius: 0.75rem;
  overflow: hidden;
}

.starter-select-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: rgba(15, 23, 42, 0.7);
  border-bottom: 0.09375rem solid rgba(245, 158, 11, 0.3);
}

.starter-hero-badge {
  font-family: var(--font-pixel-title);
  font-size: 0.58rem;
  color: #fbbf24;
  letter-spacing: 0.0625rem;
}

.starter-hero-title {
  font-family: var(--font-pixel-ui);
  font-size: 1.35rem;
  font-weight: 900;
  color: #ffffff;
  margin-top: 0.125rem;
  letter-spacing: 0.03125rem;
}

.starter-hero-subtitle {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-top: 0.1875rem;
  max-width: 38.75rem;
  line-height: 1.35;
}

.starter-counter-podium {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.125rem;
  background: rgba(245, 158, 11, 0.15);
  border: 0.09375rem solid #fbbf24;
  border-radius: 0.625rem;
  box-shadow: 0 0 0.9375rem rgba(251, 191, 36, 0.25);
}

.podium-count {
  font-family: var(--font-pixel-ui);
  font-size: 1.4rem;
  font-weight: 900;
  color: #fbbf24;
}

.podium-sub {
  font-size: 0.64rem;
  font-weight: 700;
  color: #cbd5e1;
  text-transform: uppercase;
}

.starter-select-body {
  padding: 1.125rem 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Vitrine de 3 Slots no Topo */
.starter-slots-showcase {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.starter-podium-slot {
  min-height: 9.625rem;
  background: #0f172a;
  border: 0.125rem dashed #334155;
  border-radius: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.starter-podium-slot.filled {
  border-style: solid;
  border-color: #fbbf24;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.95) 100%);
  box-shadow: 0 0 1.25rem rgba(251, 191, 36, 0.2);
}

.slot-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  color: #64748b;
}

.slot-num-badge {
  font-family: var(--font-pixel-title);
  font-size: 0.54rem;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
}

.slot-pokeball-hologram {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 0.125rem solid rgba(100, 116, 139, 0.4);
  position: relative;
}

.slot-pokeball-hologram::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 0.125rem;
  background: rgba(100, 116, 139, 0.4);
}

.slot-empty-label {
  font-family: var(--font-pixel-ui);
  font-size: 0.78rem;
  font-weight: 700;
}

.slot-filled-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.625rem 0.875rem;
}

.slot-filled-card img {
  width: 4.25rem;
  height: 4.25rem;
  object-fit: contain;
  filter: drop-shadow(0 0.25rem 0.5rem rgba(0, 0, 0, 0.6));
  animation: floatMascot 3s ease-in-out infinite;
}

.slot-filled-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.1875rem;
}

.slot-filled-name {
  font-family: var(--font-pixel-ui);
  font-size: 1rem;
  font-weight: 900;
  color: #ffffff;
}

.slot-filled-lvl {
  font-size: 0.68rem;
  font-weight: 700;
  color: #38bdf8;
}

.slot-btn-remove {
  background: rgba(239, 68, 68, 0.2);
  border: 0.0625rem solid rgba(239, 68, 68, 0.5);
  color: #f87171;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.375rem;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.slot-btn-remove:hover {
  background: #ef4444;
  color: #ffffff;
  transform: scale(1.1);
}

/* Filtros */
.starter-filter-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.3125rem;
  flex-wrap: wrap;
  overflow: visible;
  min-height: 1.75rem;
  padding: 0.125rem 0;
}

.starter-filter-btn {
  flex: 0 0 1.875rem;
  width: 1.875rem;
  height: 1.6875rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.1875rem;
  background: #0f172a;
  border: 0.09375rem solid #1e293b;
  border-radius: 0.375rem;
  color: #94a3b8;
  font-family: var(--font-pixel-ui);
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.starter-filter-btn.starter-filter-all {
  flex-basis: 3.375rem;
  width: 3.375rem;
  color: #cbd5e1;
}

.starter-filter-btn.starter-type-filter img {
  display: block;
  width: 1.25rem;
  height: 0.875rem;
  object-fit: contain;
  image-rendering: auto;
}

.starter-filter-btn:hover {
  border-color: #38bdf8;
  color: #ffffff;
}

.starter-filter-btn.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #38bdf8;
}

/* Grade de Iniciais */
.starter-grid-scroll {
  position: relative;
  max-height: min(48dvh, 28.75rem);
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.starter-grid-scroll::after {
  position: sticky;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  display: block;
  height: 1.625rem;
  margin-top: -1.625rem;
  background: linear-gradient(to bottom, rgba(7, 10, 19, 0), rgba(7, 10, 19, .94));
  content: '';
  pointer-events: none;
}

.starters-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(5.625rem, 1fr));
  gap: 0.5rem;
  padding: 0.1875rem 0.1875rem 1.5rem;
}

.starter-card {
  background: #0f172a;
  border: 0.09375rem solid #1e293b;
  border-radius: 0.5rem;
  padding: 0.625rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.starter-card:hover {
  transform: translateY(-0.1875rem);
  border-color: #38bdf8;
  box-shadow: 0 0.25rem 0.875rem rgba(56, 189, 248, 0.25);
}

.starter-card.selected {
  border-color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
  box-shadow: 0 0 1rem rgba(251, 191, 36, 0.35);
}

.starter-card-num {
  font-family: monospace;
  font-size: 0.65rem;
  color: #64748b;
  align-self: flex-start;
}

.starter-card img {
  width: 3.75rem;
  height: 3.75rem;
  object-fit: contain;
  margin: 0.25rem 0;
  filter: drop-shadow(0 0.125rem 0.25rem rgba(0, 0, 0, 0.5));
}

.starter-card-name {
  font-family: var(--font-pixel-ui);
  font-size: 0.84rem;
  font-weight: 800;
  color: #ffffff;
  margin-top: 0.125rem;
}

.starter-card-gen {
  font-size: 0.64rem;
  color: #94a3b8;
  margin-bottom: 0.25rem;
}

.starter-card-check-tag {
  position: absolute;
  top: 0.375rem;
  right: 0.375rem;
  background: #fbbf24;
  color: #000000;
  font-size: 0.72rem;
  font-weight: 900;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.starter-actions-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding-top: 0.5rem;
  border-top: 0.0625rem solid #1e293b;
}

#btnBackToCharModal {
  flex: 0 0 auto;
  width: auto;
  padding: 0.5rem 0.875rem;
  font-size: 0.78rem;
  white-space: nowrap;
}

.btn-start-adventure {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4375rem;
  flex: 0 1 17.5rem;
  min-width: 0;
  width: min(17.5rem, 100%);
  max-width: 17.5rem;
  box-sizing: border-box;
  padding: 0.5rem 0.75rem;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border: 0.125rem solid #fbbf24;
  color: #ffffff;
  font-family: var(--font-pixel-ui);
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0.25rem 1rem rgba(245, 158, 11, 0.4);
}

.btn-start-adventure:hover:not(:disabled) {
  transform: translateY(-0.125rem) scale(1.02);
  box-shadow: 0 0.375rem 1.5rem rgba(251, 191, 36, 0.6);
}

.btn-start-adventure:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(1);
}

.starter-journey-spinner {
  display: none;
  width: 1.125rem;
  height: 1.125rem;
  flex: 0 0 1.125rem;
  box-sizing: border-box;
  border: 0.125rem solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
}

.btn-start-adventure.is-loading .starter-journey-spinner {
  display: inline-block;
  animation: starterJourneySpin 0.7s linear infinite;
}

.btn-start-adventure.is-loading .start-btn-spark {
  display: none;
}

.btn-start-adventure.is-loading:disabled {
  opacity: 1;
  cursor: progress;
  filter: none;
}

@keyframes starterJourneySpin {
  to { transform: rotate(360deg); }
}

/* ========================================================
   NOVO: POKÉMONS BLOQUEADOS COM SILHUETA E CADEADO (MEU TIME)
======================================================== */
.pokeidle-card.pokemon-locked {
  background: #090d16 !important;
  border-color: #1e293b !important;
  opacity: 0.75;
  cursor: not-allowed;
}

.pokeidle-card.pokemon-locked:hover {
  border-color: #475569 !important;
  transform: none !important;
  box-shadow: none !important;
}

.pokeidle-card.pokemon-locked img {
  filter: grayscale(1) brightness(0) drop-shadow(0 0 0.5rem rgba(0,0,0,.8));
}

.pokemon-lock-icon {
  position: absolute;
  right: 0.5rem;
  bottom: 0.5rem;
  font-size: 1rem;
  filter: none;
}

.char-avatar-option, .starter-choice-card {
  color: #e2e8f0;
  background: linear-gradient(145deg, #111827, #0b1220);
  border: 0.0625rem solid #334155;
  border-radius: 0.625rem;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.char-avatar-option { display:flex; flex-direction:column; align-items:center; gap:0.25rem; padding:0.4375rem; font-size:.6rem; }
.char-avatar-option img { width:3.375rem; height:3.625rem; object-fit:contain; }
.char-avatar-option:hover, .starter-choice-card:hover { transform:translateY(-0.1875rem); border-color:#38bdf8; }
.char-avatar-option.selected, .starter-choice-card.selected { border-color:#fbbf24; box-shadow:0 0 1rem #f59e0b55; background:linear-gradient(145deg,#3b2d12,#111827); }
.starter-choice-card { position:relative; min-width:0; min-height:6.25rem; overflow:hidden; display:flex; flex-direction:column; align-items:center; gap:0.125rem; padding:0.375rem 0.25rem; text-transform:capitalize; }
.starter-choice-card img { width:3.25rem; height:3.125rem; object-fit:contain; image-rendering:auto; }
.starter-choice-card>span { color:#94a3b8; font-size:.56rem; line-height:1; }
.starter-choice-card small { display:block; width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#94a3b8; font-size:.52rem; line-height:1.1; }
.starter-choice-card strong { display:block; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#f8fafc; font-size:.67rem; line-height:1.1; }
.starter-picked { position:relative; width:100%; height:100%; min-height:9.375rem; padding:0.5rem 0.75rem 0.4375rem; box-sizing:border-box; display:flex; flex-direction:column; justify-content:center; align-items:center; gap:0; color:#fde68a; }
.starter-picked img { width:6.375rem; height:6.25rem; object-fit:contain; filter:drop-shadow(0 0.3125rem 0.625rem rgba(0,0,0,.48)); }
.starter-picked-footer { width:100%; min-width:0; display:flex; align-items:center; justify-content:center; gap:0.5rem; margin-top:0.0625rem; }
.starter-picked-footer strong { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; text-transform:capitalize; color:#f8fafc; font-size:.82rem; }
.starter-picked button { position:absolute; top:0.5625rem; left:0.5625rem; margin:0; flex:0 0 1.75rem; border:0.0625rem solid rgba(248,113,113,.65); border-radius:0.4375rem; width:1.75rem; height:1.75rem; color:#fecaca; background:rgba(127,29,29,.92); cursor:pointer; font-size:.95rem; line-height:1; box-shadow:0 0.125rem 0.375rem #0008; }
.starter-picked button:hover { background:#dc2626; border-color:#fca5a5; }
.starter-creation-status { flex:1; min-width:7.5rem; margin:0; color:#fbbf24; text-align:center; font-size:.75rem; line-height:1.35; }
.starter-creation-status:empty { display:none; }
.community-captcha-row { display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:0.75rem; margin:0.5rem 0 0; padding:0.5625rem 0.75rem; border:0.0625rem solid #334155; border-radius:0.625rem; background:rgba(15,23,42,.88); }
.community-captcha-row[hidden] { display:none; }
.community-captcha-copy { display:flex; flex-direction:column; gap:0.1875rem; color:#cbd5e1; font-size:.72rem; }
.community-captcha-copy strong { color:#7dd3fc; font-size:.65rem; letter-spacing:.06em; }
.community-captcha-widget { min-height:0; }
.char-validation-badge.valid { color:#4ade80; }
.community-loading { padding:1.75rem; color:#94a3b8; text-align:center; line-height:1.7; }
.lb-trainer-cell { display:flex; align-items:center; gap:0.5625rem; }
.lb-trainer-cell img { width:2.375rem; height:2.375rem; object-fit:contain; }
.lb-team-cell { font-size:.78rem; color:#cbd5e1; }
.chat-hidden { display:none !important; }


.locked-silhouette-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.locked-silhouette {
  filter: brightness(0) opacity(0.35) !important;
  user-select: none;
  pointer-events: none;
}

.lock-icon-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.25rem;
  filter: drop-shadow(0 0.125rem 0.375rem rgba(0, 0, 0, 0.9));
  animation: pulseLock 2.5s infinite ease-in-out;
}

@keyframes pulseLock {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.15); }
}

/* ========================================================
   NOVO: MODAL DE RANKING GLOBAL DOS TREINADORES
======================================================== */
.leaderboard-card {
  max-width: 45rem;
  width: 95vw;
  background: linear-gradient(180deg, #0d1527 0%, #070d18 100%);
  border: 0.125rem solid #fbbf24;
  border-radius: 0.75rem;
  box-shadow: 0 0 2.1875rem rgba(251, 191, 36, 0.25), 0 1.25rem 2.5rem rgba(0, 0, 0, 0.85);
  overflow: hidden;
}

.leaderboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  background: rgba(30, 41, 59, 0.6);
  border-bottom: 0.09375rem solid rgba(251, 191, 36, 0.3);
}

.leaderboard-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.leaderboard-icon-box {
  width: 2.625rem;
  height: 2.625rem;
  border-radius: 0.625rem;
  background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
  border: 0.09375rem solid #fbbf24;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 0 0.75rem rgba(251, 191, 36, 0.4);
}

.leaderboard-badge {
  font-family: var(--font-pixel-title);
  font-size: 0.58rem;
  color: #fbbf24;
  letter-spacing: 0.0625rem;
}

.leaderboard-title {
  font-family: var(--font-pixel-ui);
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  margin-top: 0.125rem;
}

.leaderboard-body {
  padding: 1.125rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.leaderboard-user-hero {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.75rem 1rem;
  background: rgba(56, 189, 248, 0.08);
  border: 0.09375rem solid #38bdf8;
  border-radius: 0.625rem;
}

.lb-user-img {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: #1e293b;
  border: 0.125rem solid #38bdf8;
  object-fit: cover;
  image-rendering: pixelated;
}

.lb-user-info {
  flex: 1;
}

.lb-user-tag {
  font-family: var(--font-pixel-title);
  font-size: 0.54rem;
  color: #38bdf8;
}

.lb-user-name {
  font-family: var(--font-pixel-ui);
  font-size: 1.1rem;
  font-weight: 800;
  color: #ffffff;
}

.lb-user-details {
  display: flex;
  gap: 0.625rem;
  font-size: 0.76rem;
  color: #94a3b8;
  margin-top: 0.125rem;
}

.lb-user-details strong {
  color: #f8fafc;
}

.lb-user-rank-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.375rem 0.875rem;
  background: #0f172a;
  border: 0.0625rem solid #38bdf8;
  border-radius: 0.5rem;
}

.rank-title {
  font-size: 0.55rem;
  font-weight: 800;
  color: #64748b;
}

.rank-number {
  font-family: var(--font-pixel-ui);
  font-size: 1.25rem;
  font-weight: 900;
  color: #38bdf8;
}

.leaderboard-table-container {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.leaderboard-table-header {
  display: grid;
  grid-template-columns: 4.375rem 1fr 8.75rem 6.875rem;
  padding: 0.375rem 0.75rem;
  font-family: var(--font-pixel-ui);
  font-size: 0.68rem;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
}

.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  max-height: 17.5rem;
  overflow-y: auto;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 4.375rem 1fr 8.75rem 6.875rem;
  align-items: center;
  padding: 0.5rem 0.75rem;
  background: #0c1220;
  border: 0.0625rem solid #1e293b;
  border-radius: 0.5rem;
  font-size: 0.84rem;
  transition: all 0.15s ease;
}

.leaderboard-row:hover {
  background: #141e33;
  border-color: #38bdf8;
}

.leaderboard-row.gold {
  border-color: #fbbf24;
  background: rgba(251, 191, 36, 0.08);
}

.leaderboard-row.silver {
  border-color: #cbd5e1;
  background: rgba(203, 213, 225, 0.08);
}

.leaderboard-row.bronze {
  border-color: #d97706;
  background: rgba(217, 119, 6, 0.08);
}

.leaderboard-row.self {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
}

.lb-rank-badge {
  font-family: var(--font-pixel-ui);
  font-weight: 900;
  font-size: 0.95rem;
}

.lb-trainer-col {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lb-trainer-col img {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: #1e293b;
  object-fit: cover;
  image-rendering: pixelated;
}

.lb-trainer-name {
  font-family: var(--font-pixel-ui);
  font-weight: 700;
  color: #f8fafc;
}

.lb-floor-badge {
  font-family: var(--font-pixel-ui);
  font-weight: 800;
  color: #34d399;
}

.lb-team-col {
  display: flex;
  gap: 0.25rem;
}

.lb-team-col img {
  width: 1.5rem;
  height: 1.5rem;
  object-fit: contain;
}

/* Ranking compacto com equipe exibida ao passar o mouse em VER TIME. */
.leaderboard-table-header,
.leaderboard-row {
  grid-template-columns: 3.25rem minmax(0, 1fr) 7rem 6.25rem;
}

.leaderboard-table-header .col-floor,
.leaderboard-row > .lb-floor-badge {
  text-align: center;
}

.leaderboard-table-header .col-team,
.leaderboard-row > .lb-team-cell {
  text-align: center;
}

.leaderboard-row {
  min-height: 3rem;
  padding: 0.25rem 0.625rem;
}

.lb-rank-badge {
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 0.0625rem solid rgba(148, 163, 184, 0.32);
}

.lb-trainer-cell img {
  width: 1.875rem;
  height: 1.875rem;
  transform: translateX(0.25rem);
}

.lb-team-cell {
  overflow: visible;
}

.lb-team-tooltip-wrap {
  position: relative;
  display: inline-flex;
}

.lb-team-tooltip-trigger {
  padding: 0.3125rem 0.5625rem;
  color: #bae6fd;
  background: rgba(14, 116, 144, 0.22);
  border: 0.0625rem solid rgba(56, 189, 248, 0.55);
  border-radius: 0.375rem;
  font: 700 0.65rem var(--font-pixel-ui);
  white-space: nowrap;
  cursor: help;
}

.lb-team-tooltip-trigger:hover,
.lb-team-tooltip-trigger:focus-visible {
  color: #fff;
  background: rgba(14, 116, 144, 0.55);
  outline: none;
}

.lb-team-tooltip {
  position: fixed;
  inset: auto;
  z-index: 2147483647;
  margin: 0;
  display: flex;
  gap: 0.5rem;
  min-width: max-content;
  padding: 0.5rem 0.625rem;
  color: #f8fafc;
  background: #080f1d;
  border: 0.0625rem solid rgba(56, 189, 248, 0.7);
  border-radius: 0.5625rem;
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.25rem);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
  pointer-events: none;
}

.lb-team-tooltip:popover-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lb-team-tooltip-member {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.125rem;
  font-size: 0.65rem;
  text-transform: capitalize;
}

.lb-team-tooltip-member img {
  width: 2.375rem;
  height: 2.375rem;
  object-fit: contain;
}

@media (max-width: 620px) {
  .leaderboard-table-header,
  .leaderboard-row {
    grid-template-columns: 2.625rem minmax(0, 1fr) 3.875rem 4.875rem;
  }

  .leaderboard-row { padding: 0.25rem 0.375rem; }
  .leaderboard-table-header { padding-inline: 0.375rem; font-size: 0.55rem; }
  .lb-trainer-cell { gap: 0.3125rem; }
  .lb-trainer-cell img { width: 1.625rem; height: 1.625rem; }
}

/* ========================================================
   CHAT GLOBAL (PAINEL ACESSADO PELA ABA INFERIOR)
======================================================== */


.global-chat-widget {
  --chat-edge: 1.375rem;
  --chat-usable-width: calc(100vw - 2.75rem);
  position: fixed;
  right: var(--chat-edge);
  bottom: 0.5rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  pointer-events: none;
}

.global-chat-widget > * { pointer-events: auto; }

@media (max-width: 480px) {
  .global-chat-widget { --chat-edge: 0.75rem; --chat-usable-width: calc(100vw - 1.5rem); }
}

@keyframes slideChatIn {
  from { opacity: 0; transform: translateY(0.75rem); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideChatOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(0.75rem) scale(.985); }
}

@media (prefers-reduced-motion: reduce) {
  .modal-backdrop.active,
  .modal-backdrop.modal-closing,
  .modal-backdrop > .modal-card,
  .trainer-profile-popover.profile-opening,
  .trainer-profile-popover.profile-closing { animation-duration: .01ms !important; }
}

.chat-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.625rem 0.875rem;
  background: #0f172a;
  border-bottom: 0.0625rem solid #1e293b;
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chat-online-dot {
  width: 0.4375rem;
  height: 0.4375rem;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0.375rem #34d399;
}

.chat-title-text {
  font-family: var(--font-pixel-ui);
  font-size: 0.8rem;
  font-weight: 800;
  color: #ffffff;
}

.chat-online-counter {
  font-size: 0.68rem;
  color: #64748b;
}



.chat-messages-container {
  flex: 1;
  padding: 0.75rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.chat-msg-row {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}

.chat-msg-row.self {
  flex-direction: row-reverse;
}

.chat-msg-avatar {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: #1e293b;
  border: 0.0625rem solid #38bdf8;
  object-fit: cover;
  image-rendering: pixelated;
  flex-shrink: 0;
}

.chat-msg-content {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  max-width: 75%;
}

.chat-msg-header {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.68rem;
}

.chat-msg-row.self .chat-msg-header {
  justify-content: flex-end;
}

.chat-msg-sender {
  font-weight: 800;
  color: #38bdf8;
  font-family: var(--font-pixel-ui);
}

.chat-msg-time {
  color: #64748b;
}

.chat-msg-bubble {
  padding: 0.4375rem 0.6875rem;
  background: #1e293b;
  border: 0.0625rem solid #334155;
  border-radius: 0.5rem;
  color: #f1f5f9;
  font-size: 0.78rem;
  line-height: 1.35;
  word-break: break-word;
}

.chat-msg-row.self .chat-msg-bubble {
  background: #0369a1;
  border-color: #38bdf8;
  color: #ffffff;
}

.chat-input-bar {
  display: flex;
  padding: 0.5rem;
  background: #0f172a;
  border-top: 0.0625rem solid #1e293b;
  gap: 0.375rem;
}

.chat-input-field {
  flex: 1;
  padding: 0.5rem 0.75rem;
  background: #070b14;
  border: 0.0625rem solid #334155;
  border-radius: 0.375rem;
  color: #ffffff;
  font-family: var(--font-clean);
  font-size: 0.8rem;
  outline: none;
}

.chat-input-field:focus {
  border-color: #38bdf8;
}

.btn-chat-send {
  background: #0284c7;
  border: 0.0625rem solid #38bdf8;
  color: #ffffff;
  border-radius: 0.375rem;
  width: 2.125rem;
  height: 2.125rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-chat-send:hover {
  background: #0369a1;
}

.send-svg {
  width: 1rem;
  height: 1rem;
}

/* ========================================================
   NOVO: TOAST DE DESBLOQUEIO DE POKÉMON NA BATALHA
======================================================== */
.pokemon-unlock-toast[hidden] { display: none; }
.arena-unlock-slot {
  position: relative;
  grid-column: 2;
  grid-row: 1;
  align-self: stretch;
  min-width: 0;
  container-type: inline-size;
}
.pokemon-unlock-toast {
  position: absolute;
  inset: 0;
  height: 2.625rem;
  max-height: calc(100% - .375rem);
  margin: auto;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 0.4375rem;
  width: min(24rem, 100%);
  min-width: 0;
  max-width: 24rem;
  box-sizing: border-box;
  padding: .25rem .75rem .25rem .5rem;
  overflow: hidden;
  border: 0.0625rem solid rgba(250, 204, 21, 0.72);
  border-radius: 62.4375rem;
  background: linear-gradient(135deg, rgba(18, 27, 50, .97), rgba(9, 15, 31, .97));
  box-shadow: 0 0 0.8125rem rgba(250, 204, 21, .22), inset 0 0 0.75rem rgba(250, 204, 21, .06);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-0.5rem) scale(.97);
  transition: opacity .58s cubic-bezier(.22,1,.36,1), transform .72s cubic-bezier(.22,1,.36,1), visibility .58s;
}
.pokemon-unlock-toast::before {
  content: '';
  position: absolute;
  inset: 0.0625rem;
  border: 0.0625rem solid rgba(250, 204, 21, .35);
  border-radius: inherit;
  animation: unlockSparkleRing 2.2s ease-in-out infinite;
}
.pokemon-unlock-toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  animation: unlockToastFloat 2.7s ease-in-out .55s infinite;
}
.pokemon-unlock-toast.is-leaving {
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.5rem) scale(.98);
  transition-duration: .62s;
}
.unlock-toast-sparkle {
  position: absolute;
  color: #fef08a;
  text-shadow: 0 0 0.5rem #facc15;
  animation: unlockSparkle 1.8s ease-in-out infinite;
}
.sparkle-one { top: -0.5rem; left: 20%; font-size: 0.75rem; }
.sparkle-two { right: 17%; bottom: -0.4375rem; font-size: 0.625rem; animation-delay: .7s; }
.unlock-toast-sprite {
  flex: 0 0 2rem;
  width: 2rem;
  height: 2rem;
  object-fit: contain;
  filter: drop-shadow(0 0 0.4375rem rgba(250, 204, 21, .4));
  animation: unlockSpriteFloat 2.1s ease-in-out infinite;
}
.unlock-toast-text { display: flex; min-width: 0; flex-direction: column; justify-content: center; gap: .1875rem; }
.unlock-toast-badge {
  color: #facc15;
  font-family: var(--font-pixel-title);
  font-size: min(.55rem, 2.7cqw);
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.021875rem;
  white-space: nowrap;
}
.unlock-toast-title {
  overflow: hidden;
  color: #fff;
  font-family: var(--font-pixel-ui);
  font-size: min(.82rem, 5cqw);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: 0.025rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@keyframes unlockToastFloat { 0%,100% { translate: 0 0; } 50% { translate: 0 -0.1875rem; } }
@keyframes unlockSpriteFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-0.1875rem); } }
@keyframes unlockSparkle { 0%,100% { opacity: .35; transform: scale(.75) rotate(0); } 50% { opacity: 1; transform: scale(1.12) rotate(25deg); } }
@keyframes unlockSparkleRing { 0%,100% { opacity: .2; transform: scale(1); } 50% { opacity: .7; transform: scale(1.025); } }
@media (max-width: 760px) {
  .arena-top-bar { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; row-gap: 0.5rem; }
  .arena-match-info { grid-column: 1; grid-row: 1; }
  .arena-quick-controls { grid-column: 2; grid-row: 1; }
  .arena-unlock-slot { grid-column: 1 / -1; grid-row: 2; height: 3rem; }
  .battle-end-actions { grid-template-columns: 1fr; gap: 0.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .pokemon-unlock-toast, .pokemon-unlock-toast::before, .unlock-toast-sparkle, .unlock-toast-sprite { animation: none !important; transition-duration: .01ms !important; }
}

.hunts-screen { padding: clamp(1.125rem, 4dvh, 2.875rem) clamp(1rem, 5vw, 4.5rem); overflow-y: auto; }
.hunts-hub { width: min(57.5rem, 100%); margin: 0 auto; }
.hunts-heading { margin-bottom: 1.375rem; padding: 0.25rem 0.125rem 1rem; border-bottom: 0.0625rem solid rgba(71,85,105,.55); }
.hunts-kicker, .hunts-mode-tag { color: #38bdf8; font: 700 .62rem var(--font-pixel-title); letter-spacing: .09em; }
.hunts-heading h2 { margin: 0.5625rem 0 0.375rem; color: #f8fafc; font: 800 clamp(1.35rem, 2.4vw, 2rem) var(--font-pixel-ui); }
.hunts-heading h2 span { color: #fbbf24; }
.hunts-heading p, .hunts-mode-card p { color: #94a3b8; line-height: 1.55; margin: 0; }
.hunts-mode-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.875rem; }
.hunts-mode-card { position: relative; display: grid; grid-template-columns: 2.875rem 1fr auto; align-items: center; gap: 0.875rem; min-height: 9.375rem; padding: 1.375rem; overflow: hidden; border: 0.0625rem solid rgba(56,189,248,.24); border-radius: 1rem; background: linear-gradient(145deg, rgba(17,28,49,.96), rgba(10,16,30,.96)); box-shadow: 0 0.75rem 1.75rem rgba(0,0,0,.2); }
.hunts-mode-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 0.1875rem; background: linear-gradient(#38bdf8, transparent); }
.hunts-mode-card.pvp { border-color: rgba(168,85,247,.25); }
.hunts-mode-card.pvp::before { background: linear-gradient(#a855f7, transparent); }
.hunts-mode-icon { display: grid; place-items: center; width: 2.625rem; height: 2.625rem; border: 0.0625rem solid rgba(56,189,248,.25); border-radius: 0.75rem; color: #7dd3fc; background: rgba(14,165,233,.09); }
.hunts-mode-icon svg { width: 1.4375rem; height: 1.4375rem; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hunts-mode-card.pvp .hunts-mode-icon { color: #d8b4fe; border-color: rgba(168,85,247,.28); background: rgba(168,85,247,.09); }
.hunts-mode-card h3 { color: #f8fafc; margin: 0.375rem 0; font: 800 1.12rem var(--font-pixel-ui); }
.hunts-mode-card p { font-size: .82rem; max-width: 19.375rem; }
.hunts-coming-soon { align-self: start; padding: 0.3125rem 0.4375rem; border: 0.0625rem solid rgba(148,163,184,.22); border-radius: 0.375rem; color: #94a3b8; background: rgba(15,23,42,.68); font: 700 .52rem var(--font-pixel-title); white-space: nowrap; }

@media (max-width: 700px) { .hunts-mode-grid { grid-template-columns: 1fr; } .hunts-mode-card { grid-template-columns: 2.5rem 1fr; padding: 1rem; } .hunts-coming-soon { grid-column: 2; justify-self: start; } }

/* Compact Pokémon-inspired navigation: enamel colors, gold trim and tactile edges. */
.bottom-game-nav { gap: 0.4375rem; padding: 0.3125rem 3.25rem; border-top: 0.0625rem solid #334565; background: linear-gradient(#152039, #090e1c); }
.bottom-nav-tab { --tab-color: #67d4ff; --tab-tint: #133754; flex: 0 1 6.75rem; min-width: 0; max-width: 6.75rem; height: 2.125rem; min-height: 2.125rem; padding: 0.3125rem 0.5rem; flex-direction: row; gap: 0.375rem; border: 0.0625rem solid var(--tab-color); border-radius: 0.5rem; background: linear-gradient(155deg, var(--tab-tint), #101a30); color: #f0f5ff; box-shadow: inset 0 0.0625rem rgba(255,255,255,.16), 0 0.1875rem 0 #050914; transition: transform .15s, box-shadow .15s, filter .15s; }
#tabNavPokedex { --tab-color: #fb7185; --tab-tint: #64273e; }
#tabNavShop { --tab-color: #fbbf24; --tab-tint: #564016; }
#tabNavSquad { --tab-color: #4ade80; --tab-tint: #164a3d; }
#tabNavCasual { --tab-color: #fb923c; --tab-tint: #613121; }
#tabNavHunts { --tab-color: #c084fc; --tab-tint: #42286b; }
.bottom-nav-tab .tab-icon { width: 1.0625rem; height: 1.0625rem; flex-shrink: 0; color: var(--tab-color); }
.bottom-nav-tab .tab-label { font: 800 .67rem var(--font-pixel-ui); letter-spacing: 0; white-space: nowrap; }
.bottom-nav-tab .tab-lock-indicator { top: .1875rem; right: .1875rem; bottom: auto; width: .625rem; height: .625rem; display: inline-flex; align-items: center; justify-content: center; color: #a7f3d0; pointer-events: none; }
.bottom-nav-tab .tab-lock-indicator svg { width: 100%; height: 100%; display: block; }
.bottom-nav-tab:hover, .bottom-nav-tab.active { background: linear-gradient(155deg, var(--tab-tint), #1b2944); color: white; border-color: var(--tab-color); box-shadow: inset 0 0.0625rem rgba(255,255,255,.22), 0 0.1875rem 0 #050914, 0 0 0.625rem color-mix(in srgb, var(--tab-color) 25%, transparent); }
.bottom-nav-tab:hover { transform: translateY(-0.125rem); filter: brightness(1.18); }
.bottom-nav-tab:active { transform: translateY(0.0625rem); }
.bottom-nav-tab:focus-visible { outline: 0.125rem solid white; outline-offset: 0.1875rem; }
.bottom-nav-tab.center-tower-tab, .bottom-nav-tab.center-tower-tab.active { flex: 0 0 9.3125rem; min-width: 9.3125rem; max-width: 9.3125rem; height: 2.375rem; min-height: 2.375rem; padding: 0.3125rem 0.625rem; border: 0.125rem solid #ffd65b; border-radius: 0.625rem; color: #fff6c7; background: linear-gradient(160deg, #ef4545 0%, #bf1c32 52%, #7c1730 100%); transform: translateY(-0.0625rem); box-shadow: inset 0 0.0625rem rgba(255,255,255,.35), 0 0.1875rem 0 #631122, 0 0 0.8125rem rgba(251,191,36,.26); }
.bottom-nav-tab.center-tower-tab:hover { transform: translateY(-0.1875rem); box-shadow: inset 0 0.0625rem rgba(255,255,255,.35), 0 0.1875rem 0 #631122, 0 0 1.125rem rgba(251,191,36,.45); }
.center-tab-glow { display: none; }
.center-tab-content { gap: 0.3125rem; }
.bottom-nav-tab.center-tower-tab .center-icon { width: 1.125rem; height: 1.125rem; stroke: #ffe58b; }
.bottom-nav-tab.center-tower-tab .center-tab-label { font: 900 .68rem var(--font-pixel-ui); letter-spacing: 0.021875rem; text-shadow: 0 0.0625rem 0.125rem #65051a; }
.center-tab-badge { padding: 0.125rem 0.25rem; font-size: .57rem; background: #ffe58b; color: #7f1d1d; }
#tabNavChat.has-unread::after { content: ''; position: absolute; top: 0.1875rem; right: 0.3125rem; width: 0.5625rem; height: 0.5625rem; background: #ff455b; border: 0.125rem solid #172238; border-radius: 50%; box-shadow: 0 0 0.4375rem rgba(255, 69, 91, .45); pointer-events: none; }

/* Dedicated global chat page. */
.chat-screen { padding: clamp(0rem, 1dvh, 0.625rem) 0; }
.chat-room { display: flex; flex-direction: column; flex: 1; min-height: 0; width: min(66.25rem, 100%); margin: 0 auto; overflow: hidden; border: 0.0625rem solid #42577b; border-radius: 1rem; background: #0b1426; box-shadow: 0 0.75rem 2.1875rem #0005; }
.chat-room-header { display: flex; align-items: center; justify-content: center; gap: 1rem; padding: 1.125rem 1.5rem; border-bottom: 0.1875rem solid #f4c84b; background: radial-gradient(ellipse at top right, #376caa77, transparent 65%), linear-gradient(110deg, #183c68, #101c34); }
.chat-room-heading { text-align: center; }
.chat-room-heading h2 { margin: 0 0 0.25rem; font: 900 1.3rem var(--font-pixel-ui); color: white; }
.chat-room-heading p { margin: 0; color: #b6cae5; font-size: .78rem; }
.chat-pokeball { width: 2.6875rem; height: 2.6875rem; flex-shrink: 0; position: relative; border: 0.1875rem solid #081222; border-radius: 50%; background: linear-gradient(#ff5757 0 44%, #101a2c 44% 56%, #eef5ff 56%); box-shadow: 0 0 0 0.125rem #ffffff30, 0 0.25rem 0.75rem #0005; transform: rotate(-16deg); }
.chat-pokeball::after { content: ''; position: absolute; width: 0.875rem; height: 0.875rem; border: 0.1875rem solid #101a2c; border-radius: 50%; background: white; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.chat-room-presence { margin-left: 0; display: flex; align-items: center; gap: 0.4375rem; padding: 0.4375rem 0.6875rem; border: 0.0625rem solid #4ade8050; background: #163c3b; color: #9df3c6; border-radius: 1.25rem; font-size: .72rem; white-space: nowrap; }
.chat-room-channel { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.625rem 1.5rem; background: #152239; border-bottom: 0.0625rem solid #2b3c57; }
.chat-room-channel > span { font-weight: 800; color: #7dd3fc; font-size: .85rem; }
.chat-room-channel small { font-size: .68rem; color: #91a8c7; }
.chat-room .chat-messages-container { min-height: 0; padding: 1.25rem 1.5rem; gap: 1rem; background: radial-gradient(circle at 50% 50%, #162b4544, transparent 70%), #0b1426; }
.chat-room .chat-messages-container:empty::before { content: 'Comece uma conversa com outros treinadores!'; margin: auto; color: #829bbf; text-align: center; font-size: .85rem; }
.chat-room .chat-msg-avatar { width: 2.375rem; height: 2.375rem; border-radius: 0.625rem; background: #1a2d48; object-fit: contain; }
.chat-room .chat-msg-content { max-width: min(75%, 40.625rem); gap: 0.3125rem; }
.chat-room .chat-msg-bubble { padding: 0.625rem 0.875rem; font-size: .86rem; line-height: 1.5; border-radius: 0.1875rem 0.75rem 0.75rem; background: #1a2a42; border-color: #30486a; }
.chat-room .chat-msg-row.self .chat-msg-bubble { background: #164e72; border-color: #3487ae; border-radius: 0.75rem 0.1875rem 0.75rem 0.75rem; }
.chat-room .chat-input-bar { padding: 0.875rem 1.25rem; gap: 0.625rem; border-top-color: #344a69; background: #142239; }
.chat-room .chat-input-field { min-width: 0; border-radius: 0.5625rem; padding: 0.6875rem 0.875rem; font-size: .86rem; }
.chat-room .btn-chat-send { width: auto; height: auto; gap: 0.5rem; padding: 0 1.0625rem; border: 0.0625rem solid #ffd454; border-radius: 0.5625rem; color: #492b08; background: linear-gradient(#ffe377, #f8b92e); box-shadow: inset 0 0.0625rem #fff7, 0 0.1875rem #8b581c; font: 800 .8rem var(--font-pixel-ui); }
.chat-room .btn-chat-send:hover { filter: brightness(1.12); }
.global-chat-widget { bottom: 3.75rem; }
@media (max-width: 700px) {
  .bottom-game-nav { gap: 0.25rem; padding: 0.3125rem 3rem; }
  .nav-btn-home { left: .3125rem; bottom: .4375rem; width: 2.4375rem; height: 2.4375rem; }
  .bottom-nav-tab { flex: 1 1 0; height: 2.4375rem; min-height: 2.4375rem; padding: 0.1875rem; gap: 0.125rem; flex-direction: column; }
  .bottom-nav-tab .tab-label { font-size: .51rem; }
  .bottom-nav-tab .tab-icon { width: 0.875rem; height: 0.875rem; }
  .bottom-nav-tab.center-tower-tab, .bottom-nav-tab.center-tower-tab.active { flex: 1.35 1 0; min-width: 0; max-width: none; height: 2.6875rem; min-height: 2.6875rem; padding: 0.1875rem; }
  .center-tab-content { flex-direction: column; gap: 0.125rem; }
  .bottom-nav-tab.center-tower-tab .center-tab-label { font-size: .53rem; letter-spacing: 0; }
  .bottom-nav-tab.center-tower-tab .center-icon { width: 0.9375rem; height: 0.9375rem; }
  .center-tab-badge { display: none; }
  .chat-room-header { padding: 0.8125rem; gap: 0.625rem; }
  .chat-room-heading h2 { font-size: 1rem; }
  .chat-room-heading p { font-size: .7rem; }
  .chat-room-presence { padding: 0.3125rem 0.4375rem; font-size: .61rem; }
  .chat-room-channel { padding: 0.5625rem 0.75rem; }
  .chat-room-channel small { font-size: .57rem; }
  .chat-room .chat-messages-container { padding: 0.75rem; }
  .chat-room .chat-input-bar { padding: 0.625rem; gap: 0.4375rem; }
  .chat-room .btn-chat-send { padding-inline: 0.625rem; }
}

/* Versão centralizada no rodapé das configurações. */
#settingsModal .modal-footer { justify-content: center; }
.settings-version-footer { display: flex; justify-content: center; padding: 0 1rem 0.875rem; flex-shrink: 0; }
.settings-version-button { display: inline-flex; align-items: center; gap: 0.4375rem; padding: 0.4375rem 0.8125rem; border: 0.0625rem solid #fbbf2455; border-radius: 1.25rem; background: linear-gradient(135deg, #23314a, #111b2d); color: #a9bad2; font: 700 .7rem var(--font-pixel-ui); box-shadow: inset 0 0.0625rem #ffffff0d; }
.settings-version-button span { color: #ffe086; font-weight: 900; }
.settings-version-button:focus-visible { outline: 0.125rem solid #fbbf24; outline-offset: 0.1875rem; }

/* Training laboratory and independent team builder. */
.training-hub { border-color: #465a7d; background: radial-gradient(ellipse at top right, #12344f66, transparent 60%), #0d1526; }
.training-hero { display: flex; align-items: center; gap: 0.9375rem; padding: 0.375rem 0 1rem; border-bottom: 0.0625rem solid #384967; }
.training-emblem { display: grid; place-items: center; width: 3.125rem; height: 3.125rem; border: 0.0625rem solid #fbbf2470; border-radius: 0.875rem; color: #ffda68; background: linear-gradient(145deg, #5b3e1d, #221e27); }
.training-emblem svg { width: 1.6875rem; height: 1.6875rem; }
.training-eyebrow { color: #fbd46b; font: 800 .59rem var(--font-pixel-title); letter-spacing: 0.0625rem; }
.training-hero h2, .training-builder-header h2 { margin: 0.375rem 0; color: #f8fafc; font: 900 clamp(1rem, 1.8vw, 1.6rem) var(--font-pixel-ui); }
.training-hero p, .training-builder-header p { margin: 0; color: #9eafc8; font-size: .8rem; line-height: 1.45; }

.training-hub .casual-options-grid { grid-template-columns: 1.1fr 1fr; gap: 1rem; }
.training-difficulty-panel, .training-guide { padding: 0.875rem; border: 0.0625rem solid #33445f; border-radius: 0.75rem; background: #111d30; }
.training-hub .category-header { padding-bottom: 0.5rem; min-height: 2.875rem; justify-content: flex-start; }
.training-hub .category-header h3 { color: #e3edff; font-size: .8rem; line-height: 1.3; margin: 0; }
.training-hub .casual-diff-buttons { padding: .75rem; margin: -.75rem; }
.training-hub .casual-diff-btn { flex: 1; min-height: 4.1875rem; flex-direction: row; align-items: center; gap: 0.75rem; padding: 0.6875rem 0.875rem; background: #101a2b; border-width: 0.0625rem; border-color: #334561; }
.training-hub .casual-diff-btn > span:nth-child(2) { display: flex; flex-direction: column; gap: 0.1875rem; flex: 1; }
.training-diff-icon { display: grid; place-items: center; width: 2.1875rem; height: 2.1875rem; flex-shrink: 0; border-radius: 0.5625rem; background: #233a57; color: #91c8fb; }
.training-diff-icon svg { width: 1.3125rem; height: 1.3125rem; }
.training-hub .casual-diff-btn[data-diff="facil"] .training-diff-icon { color: #6ee7b7; background: #103b33; }
.training-hub .casual-diff-btn[data-diff="dificil"] .training-diff-icon { color: #ffb783; background: #4b2b24; }
.training-hub .casual-diff-btn[data-diff="extremo"] .training-diff-icon { color: #d8b4fe; background: #372552; }
.training-hub .casual-diff-btn.active { border-color: #fbd46b; background: linear-gradient(110deg, #57441d38, #142239); box-shadow: inset 0 0 0 0.0625rem #fbd46b26, 0 0 .75rem #fbbf2459; }
.training-diff-check { width: 0.6875rem; height: 0.6875rem; border: 0.0625rem solid #637490; border-radius: 50%; }
.casual-diff-btn.active .training-diff-check { border-color: #ffe17b; background: #fbd46b; box-shadow: 0 0 0.5625rem #fbbf2444; }
.training-guide { justify-content: flex-start; gap: .5rem; }
.training-guide article { display: flex; align-items: center; flex: 1; gap: 1rem; padding: 1rem .25rem; border-bottom: 0.0625rem solid #33415577; }
.training-guide article:last-child { border-bottom: 0; }
.training-guide article > span { color: #69d6fa; flex: 0 0 1.6875rem; }
.training-guide article svg { width: 1.625rem; height: 1.625rem; }
.training-guide h3 { color: #eef4ff; font-size: .93rem; margin-bottom: 0.3125rem; }
.training-guide p { color: #9fb0ca; font-size: .8rem; line-height: 1.6; }
.training-hub .btn-launch-casual, .training-builder .btn-launch-casual { padding: 0.625rem 1rem; font-size: .86rem; border: 0.0625rem solid #ffb2a2; background: linear-gradient(#ef4b51, #b82036); box-shadow: 0 0.1875rem #77152c; }
.btn-launch-casual > svg, .training-builder-footer svg, #battleModal .btn-battle-end > svg { width: 1.25rem; height: 1.25rem; vertical-align: middle; flex-shrink: 0; }
.training-builder { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 1rem; gap: 0.75rem; background: #0e1829; border-color: #426087; }
.training-builder-header { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding-bottom: 0.625rem; border-bottom: 0.0625rem solid #334967; flex-shrink: 0; }
.training-builder-header .btn-sub-tower { flex: 0 0 auto; padding-inline: 1.0625rem; }
.training-builder-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(23.75rem, 1fr); gap: 0.875rem; flex: 1; min-height: 0; }
.training-catalog-panel { display: flex; flex-direction: column; gap: 0.5625rem; min-height: 0; }
.training-catalog-tools { display: grid; grid-template-columns: 1fr 9.375rem; gap: 0.3125rem 0.625rem; }
.training-catalog-tools > label { color: #a9bbd7; font-size: .61rem; font-weight: 800; }
.training-catalog-tools label:first-child { grid-column: 1; grid-row: 1; }
.training-catalog-tools input { grid-column: 1; grid-row: 2; }
.training-type-label { grid-column: 2; grid-row: 1; }
.training-catalog-tools select { grid-column: 2; grid-row: 2; }
.training-catalog-tools input, .training-catalog-tools select, .training-move-field select, .training-member-level input[type="number"] { min-width: 0; width: 100%; padding: 0.5rem; border: 0.0625rem solid #415675; border-radius: 0.4375rem; color: #edf4ff; background: #0a1425; font: 500 .76rem var(--font-pixel-ui); }
.training-catalog-tools :is(input,select):focus, .training-move-field select:focus { outline: 0.0625rem solid #38bdf8; }
.training-catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.25rem, 1fr)); align-content: start; gap: 0.4375rem; overflow-y: auto; min-height: 0; flex: 1; padding: 0.1875rem 0.3125rem 0.1875rem 0.0625rem; }
.training-pokemon-card { display: flex; flex-direction: column; align-items: center; min-width: 0; padding: 0.4375rem 0.3125rem; border: 0.0625rem solid #354b69; border-radius: 0.5625rem; color: #edf4ff; background: linear-gradient(145deg, #1a2a41, #101c2f); cursor: pointer; }
.training-pokemon-card:hover, .training-pokemon-card[aria-pressed="true"] { border-color: #fbd46b; background: linear-gradient(145deg, #3b3825, #15283b); }
.training-pokemon-card > img { width: 4.375rem; height: 4.375rem; object-fit: contain; image-rendering: pixelated; }
.training-pokemon-card strong { font-size: .73rem; text-transform: capitalize; text-align: center; overflow-wrap: anywhere; }
.training-pokemon-card small { margin-top: 0.1875rem; color: #9ab0cd; font-size: .56rem; text-align: center; }
.training-catalog-pagination { display: flex; align-items: center; justify-content: space-between; gap: 0.375rem; flex-shrink: 0; font-size: .65rem; color: #b4c4dc; }
.training-catalog-pagination button { border: 0.0625rem solid #3a587b; border-radius: 0.375rem; padding: 0.375rem 0.625rem; color: #c7e5ff; background: #1b324b; cursor: pointer; }
.training-catalog-pagination button:disabled { opacity: .35; cursor: default; }
.training-team-editor { display: grid; grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 0.5rem; overflow: visible; min-height: 0; }
.training-member { display: grid; grid-template-rows: minmax(3.125rem, 1fr) auto; gap: 0.3125rem; min-height: 0; padding: 0.5rem 0.625rem; border: 0.0625rem solid #3c506e; border-radius: 0.6875rem; background: linear-gradient(140deg, #1b2b41, #111d30); transition: border-color .18s, background .18s, box-shadow .18s; }
.training-member.is-selected { border-color: #5bc5f4; box-shadow: inset 0.1875rem 0 #38bdf8; }
.training-member-header { display: flex; align-items: center; gap: 0.625rem; min-height: 0; }
.training-slot-select > img { width: clamp(3rem, 7dvh, 4.5rem); height: clamp(3rem, 7dvh, 4.5rem); flex-shrink: 0; object-fit: contain; image-rendering: pixelated; }
.training-member-level { display: flex; flex-direction: column; align-items: stretch; gap: 0.375rem; flex: 0 0 5.3125rem; color: #acc1dc; font-size: .65rem; }
.training-member-level input[type="number"] { width: 2.9375rem; height: 1.5625rem; padding: 0.1875rem 0.25rem; margin: 0; text-align: center; }
.training-member-moves { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.3125rem 0.4375rem; }
.training-move-field { position: relative; min-width: 0; display: flex; align-items: center; }
.training-move-field select { height: 1.75rem; padding: 0.25rem 0.3125rem 0.25rem 0.9375rem; font-size: .7rem; border-color: #314662; background: #101c2d; }
.training-builder-footer { display: flex; align-items: center; justify-content: space-between; gap: 0.9375rem; border-top: 0.0625rem solid #334967; padding-top: 0.625rem; flex-shrink: 0; }
.training-builder-footer > span { color: #b6c7df; font-size: .74rem; }
.training-builder-footer .btn-launch-casual { min-width: 13.125rem; }
.training-result-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.625rem; }
.training-result-stats > div { display: flex; flex-direction: column; align-items: center; gap: 0.3125rem; padding: 0.75rem; border: 0.0625rem solid #3c5579; border-radius: 0.625rem; background: #17263b; }
.training-result-stats svg { width: 1.375rem; height: 1.375rem; color: #7dd3fc; }
.training-result-stats strong { color: #fcd875; font-size: 1.1rem; }
.training-result-stats span { color: #a9bad3; font-size: .66rem; text-align: center; }
.training-result-note { color: #acbdd5; text-align: center; margin-top: 0.75rem; font-size: .77rem; }
.training-empty { grid-column: 1 / -1; text-align: center; padding: 1.25rem; color: #a6b7ce; }
@media(max-width: 900px) { .training-hub .casual-options-grid { grid-template-columns: 1fr; overflow-y: auto; } .training-guide, .training-difficulty-panel { height: auto; } .training-guide article { padding: 0.5rem 0; } .training-builder-layout { grid-template-columns: minmax(0,1fr) minmax(19.375rem,1fr); } .training-slot-select > img { width: 3.25rem; height: 3.25rem; } }
@media(max-width: 680px) { .training-builder { padding: 0.625rem; } .training-builder-layout { display: flex; flex-direction: column; overflow-y: auto; } .training-catalog-panel { flex: 0 0 19.375rem; } .training-team-editor { overflow: visible; flex: 0 0 auto; min-height: 26.25rem; grid-template-rows: repeat(3, minmax(8.125rem, 1fr)); } .training-catalog-grid { grid-template-columns: repeat(auto-fill, minmax(5.3125rem,1fr)); } .training-builder-footer { flex-direction: column; align-items: stretch; gap: 0.5rem; } .training-builder-footer .btn-launch-casual { min-width: 0; }  .training-hero { gap: 0.625rem; } .training-hero p, .training-builder-header p { font-size: .7rem; } .training-catalog-tools { grid-template-columns: 1fr 7.5rem; } }

/* Compact trio: all three slots stay visible; details live in game tooltips. */
.training-slot-select { display: flex; align-items: center; flex: 1; min-width: 0; gap: 0.5rem; padding: 0; border: 0; background: transparent; color: #f4f7ff; text-align: left; }
.training-slot-select:focus-visible { outline: 0.0625rem solid #67d4ff; outline-offset: 0.1875rem; border-radius: 0.4375rem; }
.training-member-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 800 .92rem var(--font-pixel-ui); text-transform: uppercase; transition: color .2s, text-shadow .2s; }
.training-member-name.is-shiny { color: #ffe394; text-shadow: 0 0 0.5625rem #fbbf2455; }
.training-member-level > label { display: flex; align-items: center; justify-content: space-between; gap: 0.25rem; }
.training-pokemon-card.is-dragging { opacity: .45; }
.training-builder.is-dragging-pokemon .training-member { border-style: dashed; border-color: #59b5db; background: linear-gradient(140deg, #1a354b, #122437); }
.training-builder .training-member.is-drop-target { border-color: #ffdc70; background: linear-gradient(140deg, #524526, #20313f); box-shadow: inset 0 0 0 0.0625rem #ffe08a66, 0 0 1.0625rem #fbbf2422; }
.training-shiny-pill { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 0.4375rem; width: 5.3125rem; height: 1.4375rem; padding: 0.125rem 0.5rem; border: 0.0625rem solid #475466; border-radius: 1.25rem; background: linear-gradient(#343d4a, #252d38); color: #8491a2; box-shadow: inset 0 0.0625rem #ffffff09; font: 700 .64rem var(--font-pixel-ui); isolation: isolate; transition: color .2s, border-color .2s, background .2s, box-shadow .2s; }
.training-shiny-pill { cursor: pointer; }
.training-catalog-pagination button { display: inline-flex; align-items: center; justify-content: center; }
.training-catalog-pagination button svg { width: 1.125rem; height: 1.125rem; }
.training-shiny-pill.is-on { color: #ffe7a2; border-color: #e7bc55; background: linear-gradient(135deg, #62512e, #3e2e36); box-shadow: inset 0 0.0625rem #fff3bc25, 0 0 0.6875rem #fbbf243d; }
.training-shiny-pill.is-on .training-shiny-label { animation: trainingShinyGlow 2.6s ease-in-out infinite; }
.training-shiny-sparkles { position: absolute; inset: 0; pointer-events: none; overflow: visible; opacity: 0; transition: opacity .2s; }
.training-shiny-pill.is-on .training-shiny-sparkles { opacity: 1; }
.training-shiny-sparkles svg { position: absolute; width: 0.4375rem; height: 0.4375rem; fill: #fff0bc; opacity: 0; }
.training-shiny-sparkles svg:nth-child(1) { left: 0.5rem; top: -0.1875rem; }
.training-shiny-sparkles svg:nth-child(2) { left: 2.5rem; bottom: -0.1875rem; }
.training-shiny-sparkles svg:nth-child(3) { right: 0.625rem; top: 0.0625rem; }
.training-shiny-pill.is-on .training-shiny-sparkles svg { animation: trainingShinySparkle 2.6s ease-in-out infinite; }
.training-shiny-pill.is-on .training-shiny-sparkles svg:nth-child(2) { animation-delay: .8s; }
.training-shiny-pill.is-on .training-shiny-sparkles svg:nth-child(3) { animation-delay: 1.6s; }
.training-shiny-pill:focus-visible { outline: 0.125rem solid #ffe094; outline-offset: 0.1875rem; }
@keyframes trainingShinyGlow { 0%,100% { text-shadow: 0 0 0.1875rem #ffdc8944; } 50% { text-shadow: 0 0 0.4375rem #ffe2a1cc, 0 0 0.75rem #ffd55866; } }
@keyframes trainingShinySparkle { 0%,65%,100% { opacity: 0; transform: translateY(0.125rem) scale(.3) rotate(0); } 25%,40% { opacity: .95; transform: translateY(-0.125rem) scale(1) rotate(35deg); } }
@media (max-height: 740px) and (min-width: 681px) {
  .training-builder { padding: 0.625rem; gap: 0.5rem; }
  .training-builder-header { padding-bottom: 0.375rem; }
  .training-builder-header h2 { margin: 0.1875rem 0; font-size: 1.1rem; }
  .training-builder-header p { font-size: .7rem; }
  .training-builder-footer { padding-top: 0.4375rem; }
  .training-member { padding: 0.375rem 0.5625rem; gap: 0.25rem; }
  .training-member-header { gap: 0.375rem; }
  .training-slot-select > img { width: 3rem; height: 3rem; }
  .training-member-name { font-size: .8rem; }
  .training-member-moves { gap: 0.25rem 0.375rem; }
  .training-move-field select { height: 1.5625rem; font-size: .66rem; }
  .training-member-level { gap: 0.25rem; }
  .training-builder-footer > span { font-size: .67rem; }
}
@media (prefers-reduced-motion: reduce) { .training-shiny-pill.is-on .training-shiny-label, .training-shiny-pill.is-on .training-shiny-sparkles svg { animation: none; } .training-shiny-pill.is-on .training-shiny-sparkles svg { opacity: .65; } }

@media (max-height: 650px) and (min-width: 681px) {
  .training-hub .casual-options-grid { overflow-y: auto; grid-auto-rows: min-content; }
  .training-guide, .training-difficulty-panel { height: auto; min-height: min-content; }
  .training-member { grid-template-rows: minmax(2rem, 1fr) auto; padding: .25rem .5rem; gap: .2rem; }
  .training-member-level { flex: 0 0 auto; flex-direction: row; align-items: center; gap: .35rem; }
  .training-member-level input[type="number"] { width: 2.5rem; height: 1.4rem; }
  .training-member-level .training-shiny-pill { width: 3.5rem; height: 1.4rem; }
  .training-slot-select > img { width: 2rem; height: 2rem; }
  .training-move-field select { height: 1.4rem; }
}

@media (max-width: 900px) {
  .training-hub .casual-options-grid { grid-auto-rows: min-content; align-content: start; }
  .training-guide, .training-difficulty-panel { min-height: min-content; }
}

.heal-team-confirm-card { max-width: 26rem; }
.heal-team-confirm-card p { color: var(--text-muted); font-size: .9rem; line-height: 1.6; }
.heal-team-confirm-card p strong { color: var(--color-gold); }
.heal-team-confirm-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.heal-team-confirm-actions .btn-battle-end { min-width: 0; font-size: .8rem; padding: .7rem .5rem; }

/* Shared scaling above handles monitor size; reflow handles narrow aspect ratios.
   Keep viewport coordinates in CSS pixels so tooltips and battle effects stay aligned. */
.navbar, .bottom-game-nav, .modal-header, .modal-footer,
.starter-select-header, .starter-filter-bar, .starter-actions-footer {
  flex-shrink: 0;
}

.tower-hub-layout > *, .squad-split-layout > *, .battle-dashboard-controls > *,
.training-builder-layout > *, .dedicated-shop-grid > * { min-width: 0; }

.modal-card, .char-create-card, .starter-select-card, .leaderboard-card {
  max-height: calc(100dvh - 2.5rem);
  min-height: 0;
  min-width: 0;
}

.modal-body-scroll, .char-create-body, .leaderboard-body {
  min-height: 0;
  overflow-y: auto;
}

.starter-select-body { min-height: 0; flex: 1; overflow: hidden; }
.starter-grid-scroll { flex: 1 1 auto; min-height: 5rem; }
.starter-slots-showcase { flex-shrink: 0; }
.poke-tooltip, .generic-tooltip, .synergy-mini-tooltip {
  max-width: calc(100vw - 1.25rem);
  max-height: calc(100dvh - 1.25rem);
  overflow-y: auto;
}

@media (min-width: 901px) and (max-width: 1080px) {
  .tower-hub-layout { grid-template-columns: minmax(15rem, 28%) minmax(0, 1fr) minmax(14rem, 26%); overflow: hidden; }
  .tower-squad-shop-panel { grid-column: auto; }
}

@media (max-width: 900px) {
  .tower-hub-layout { grid-template-columns: minmax(0, 1fr); grid-auto-rows: min-content; overflow-y: auto; }
  .tower-squad-shop-panel { grid-column: auto; height: auto; }
  .tower-map-panel, .tower-challenger-panel { min-height: 22rem; }
}

@media (max-width: 960px) {
  .squad-split-layout { grid-auto-rows: minmax(24rem, auto); }
}

@media (max-width: 820px) {
  #battleScreen { overflow-y: auto; }
  .battle-arena-card { flex: 0 0 auto; height: auto; overflow: visible; }
  .duel-stage { flex: 0 0 auto; height: max(21rem, 48dvh); }
  .duel-sides-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .75rem; }
  .battle-vs-center { display: none; }
  .pokeidle-hud-card { max-width: 100%; padding: .45rem; }
  .stadium-pedestal { width: 100%; max-width: 13rem; height: 12rem; }
  .player-pedestal, .enemy-side-right .enemy-pedestal { margin-inline: 0; }
  .battle-dashboard-controls { height: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .moves-command-panel, .tactical-side-panel { min-height: 13rem; }
  .combat-console-panel { grid-column: 1 / -1; height: 10rem; }
}

@media (max-width: 700px) {
  :root { font-size: 16px; }
  .battlemon-pixel-logo { font-size: clamp(1.5rem, 7.5vw, 3.2rem); }
  .navbar { flex-wrap: wrap; gap: .5rem; padding: .5rem .65rem; }
  .nav-left { order: 1; }
  .nav-left .trainer-profile-popover { left: .75rem; right: auto; }
  .nav-center { position: static; transform: none; order: 2; margin-left: auto; justify-content: flex-end; }
  .nav-right { order: 3; flex: 0 0 100%; justify-content: center; flex-wrap: wrap; gap: .4rem; }
  .navbar .brand-title { font-size: .75rem; }
  .trainer-profile-popover { position: fixed; top: 7.5rem; right: .75rem; width: min(24rem, calc(100vw - 1.5rem)); }
  .main-container { padding: .5rem; }
  .modal-backdrop { padding: .5rem; }
  .modal-card, .char-create-card, .starter-select-card, .leaderboard-card { width: 100%; max-height: calc(100dvh - 1rem); }
  .starter-select-header, .starter-select-body { padding: .75rem; }
  .starter-select-body { gap: .65rem; }
  .starter-slots-showcase { gap: .4rem; }
  .starter-podium-slot, .starter-picked { min-height: 7rem; }
  .starter-picked { padding: .4rem; }
  .starter-picked img { width: 4.5rem; height: 4.5rem; }
  .starter-picked-footer strong { font-size: .7rem; }
  .starter-picked button { width: 1.45rem; height: 1.45rem; top: .25rem; left: .25rem; }
  .starter-counter-podium { padding: .4rem .65rem; }
  .starter-hero-title { font-size: 1.1rem; }
  .starter-actions-footer { gap: .5rem; }
  .btn-start-adventure { flex: 1; }
  .starters-cards-grid { grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr)); }
  .pokedex-title-row, .pokedex-badges-row, .shop-hero-header { flex-wrap: wrap; gap: .5rem; }
  .leaderboard-title { font-size: .95rem; }
  .leaderboard-header, .leaderboard-body { padding: .75rem; }
}

@media (max-width: 480px) {
  .battle-dashboard-controls { grid-template-columns: minmax(0, 1fr); }
  .combat-console-panel { grid-column: auto; }
  .arena-top-bar { grid-template-columns: minmax(0, 1fr); }
  .arena-match-info, .arena-quick-controls { grid-column: 1; grid-row: auto; }
  .arena-match-info { grid-row: 1; }
  .arena-quick-controls { grid-row: 2; }
  .arena-unlock-slot { grid-row: 3; }
  .pokeidle-hud-card .hud-trainer-row { flex-wrap: wrap; }
  .starter-hero-badge { font-size: .5rem; }
}

.char-validation-badge.checking { color: #94a3b8; background: #1e293b; border-color: #475569; }
.starter-filter-bar { flex-wrap: wrap; gap: 0.3125rem; overflow: visible; padding-block: 0.125rem; }
.starter-filter-btn { flex: 0 0 1.875rem; padding: 0.1875rem; white-space: nowrap; border-width: 0.0625rem; border-radius: 0.375rem; font-size: .62rem; }
.starter-filter-btn.starter-filter-all { flex-basis: 3.375rem; }
.starter-filter-btn.starter-type-filter img { width: 1.1875rem; height: 0.8125rem; }

/* Fit every result, including bonus drops, without creating a scroll container. */
#battleModal { overflow: hidden; padding: clamp(.375rem, 1.5dvh, 1rem); }
.battle-end-fit-frame { position: relative; width: min(44rem, 100%); flex: 0 0 auto; }
#battleModal .battle-end-fit-frame .battle-end-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  max-width: none;
  height: auto;
  max-height: none;
  overflow: visible;
  transform-origin: top center;
  transform: translateY(.75rem) scale(calc(var(--battle-end-fit, 1) * .96));
}
#battleModal.active .battle-end-fit-frame .battle-end-screen { transform: scale(var(--battle-end-fit, 1)); }
#battleModal .battle-end-fit-frame .battle-end-screen > * { flex-shrink: 0; }
#battleModal .battle-end-screen:not(.defeat-mode) { padding: .75rem 1rem; }
#battleModal .battle-end-screen:not(.defeat-mode) .battle-end-header { margin-bottom: .375rem; }
#battleModal .battle-end-screen:not(.defeat-mode) .battle-end-title { margin: .125rem 0 .375rem; font-size: 1.5rem; }
#battleModal .battle-end-screen:not(.defeat-mode) .battle-end-trainer-avatar { width: 2rem; height: 2rem; }
#battleModal .battle-end-screen:not(.defeat-mode) .battle-end-summary { margin: .375rem 0; }
#battleModal .battle-end-screen:not(.defeat-mode) .battle-end-stats-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .375rem; margin-bottom: .375rem; }
#battleModal .battle-end-screen:not(.defeat-mode) .battle-end-stat-pill { min-width: 0; padding: .25rem; }
#battleModal .battle-end-screen:not(.defeat-mode) .battle-end-stat-pill .stat-icon { font-size: 1rem; }
#battleModal .battle-end-screen:not(.defeat-mode) .battle-end-squad-section { padding: .375rem; margin-bottom: .375rem; }
#battleModal .battle-end-screen:not(.defeat-mode) .end-poke-card { padding: .25rem; gap: .125rem; min-width: 0; }
#battleModal .battle-end-screen:not(.defeat-mode) .end-poke-sprite { width: 2.25rem; height: 2.25rem; }
#battleModal .battle-end-screen:not(.defeat-mode) .modal-perks-section { margin-bottom: .375rem; }
#battleModal .battle-end-screen:not(.defeat-mode) .modal-perks-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#battleModal .battle-end-screen:not(.defeat-mode) .perk-choice-card { min-width: 0; padding: .375rem .25rem; overflow-wrap: anywhere; }
#battleModal .battle-end-screen:not(.defeat-mode) .battle-end-actions { grid-template-columns: 1fr 1.35fr; margin-top: .375rem; gap: .5rem; }
#battleModal .battle-end-screen:not(.defeat-mode) .btn-battle-end { font-size: .82rem; padding: .625rem .5rem; }

/* Consistent feedback for the tower's secondary actions and header shortcuts. */
:is(#btnHeaderLeaderboard, #btnHomeLeaderboard, #btnPokeCenterHeal, #btnGoEditSquad, #btnResetTowerRun, #sectorFilterSelect, #btnOpenSettings, #btnHomeSettings) {
  --action-glow: #38bdf8;
  transition: transform .18s ease, border-color .18s ease, box-shadow .2s ease, filter .18s ease;
}
:is(#btnHeaderLeaderboard, #btnHomeLeaderboard) { --action-glow: #fbbf24; }
#btnPokeCenterHeal { --action-glow: #34d399; }
#btnResetTowerRun { --action-glow: #fb7185; }
:is(#btnHeaderLeaderboard, #btnHomeLeaderboard, #btnPokeCenterHeal, #btnGoEditSquad, #btnResetTowerRun, #sectorFilterSelect, #btnOpenSettings, #btnHomeSettings):hover:not(:disabled) {
  border-color: var(--action-glow);
  box-shadow: 0 0 .875rem color-mix(in srgb, var(--action-glow) 40%, transparent), inset 0 0 .625rem color-mix(in srgb, var(--action-glow) 12%, transparent);
  filter: brightness(1.15);
}
:is(#btnHeaderLeaderboard, #btnHomeLeaderboard, #btnPokeCenterHeal, #btnGoEditSquad, #btnResetTowerRun, #btnOpenSettings, #btnHomeSettings):hover:not(:disabled) { transform: translateY(-.125rem); }
:is(#btnHeaderLeaderboard, #btnHomeLeaderboard, #btnPokeCenterHeal, #btnGoEditSquad, #btnResetTowerRun, #btnOpenSettings, #btnHomeSettings):active:not(:disabled) { transform: translateY(.0625rem) scale(.97); }
:is(#btnHeaderLeaderboard, #btnHomeLeaderboard, #btnPokeCenterHeal, #btnGoEditSquad, #btnResetTowerRun, #sectorFilterSelect, #btnOpenSettings, #btnHomeSettings):focus-visible { outline: .125rem solid var(--action-glow); outline-offset: .1875rem; }
@media (prefers-reduced-motion: reduce) {
  :is(#btnHeaderLeaderboard, #btnHomeLeaderboard, #btnPokeCenterHeal, #btnGoEditSquad, #btnResetTowerRun, #sectorFilterSelect, #btnOpenSettings, #btnHomeSettings) { transition: none; }
}

#squadTypeFilterBar .type-filter-symbol { display: inline-flex; justify-content: center; align-items: center; width: 1.875rem; min-height: 1.6875rem; padding: .1875rem; }
#squadTypeFilterBar .type-filter-symbol img, .game-type-symbol { display: inline-block; width: 1.25rem; height: .875rem; object-fit: contain; vertical-align: middle; }
.synergy-direction { width: 1rem; height: 1rem; }
.synergy-emoji-chip .game-type-symbol { width: 1.1875rem; height: 1rem; }
.smp-icon .game-type-symbol { width: 1.5rem; height: 1.125rem; }
#squadGenSelect { flex: 1 1 12.75rem; min-width: min(12.75rem, 100%); padding-right: 1.75rem; text-overflow: clip; }
.squad-right-header .pixel-tag { font: 800 .78rem/1.3 var(--font-clean); }
.slot-move-card, .move-card-top { min-width: 0; }
.move-type-pill { display: inline-flex; align-items: center; justify-content: center; width: 2.125rem; min-width: 2.125rem; height: 1.25rem; flex: 0 0 2.125rem; padding: .125rem; }
.move-type-pill .game-type-symbol { width: 1.375rem; height: .9375rem; }
.move-card-meta { flex-wrap: wrap; gap: .125rem .25rem; }
.squad-move-pp { color: #b8e6fa; font-weight: 800; white-space: nowrap; }
.slot-shiny-toggle { width: 4.375rem; flex-shrink: 0; }
.training-level-caption { text-align: center; font-size: .6rem; line-height: 1; }
.training-level-control { display: flex; align-items: center; justify-content: center; border: .0625rem solid #415675; border-radius: .4375rem; background: #0a1425; overflow: hidden; }
.training-member-level .training-level-control input[type="number"] { appearance: textfield; -moz-appearance: textfield; width: 2.125rem; min-width: 0; flex: 1; height: 1.5625rem; padding: .125rem; border: 0; border-radius: 0; font-variant-numeric: tabular-nums; }
.training-level-control input::-webkit-inner-spin-button, .training-level-control input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.training-level-control button { display: grid; place-items: center; width: 1.375rem; height: 1.5625rem; padding: .1875rem; flex-shrink: 0; border: 0; color: #8bd5f7; background: #192d44; cursor: pointer; transition: background .15s, color .15s; }
.training-level-control button svg { width: .75rem; height: .75rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.training-level-control button:hover:not(:disabled) { color: #fff; background: #25618a; }
.training-level-control button:disabled { opacity: .3; cursor: default; }
.training-level-control button:focus-visible { outline: .125rem solid #fbbf24; outline-offset: -.125rem; }

#towerScreen .special-challenge, #towerScreen .boss-challenge {
  --challenge-color: #38bdf8;
  --challenge-glow: #38bdf866;
  border-color: var(--challenge-color);
  background: linear-gradient(125deg, #07598566, #0c1830 65%, #38bdf821);
  box-shadow: inset 0 0 1rem #38bdf819, 0 0 .875rem var(--challenge-glow);
}
#towerScreen .boss-challenge {
  --challenge-color: #d69bff;
  --challenge-glow: #b957ffbb;
  background: linear-gradient(125deg, #7e22ce80, #25113f 60%, #a855f744);
  box-shadow: inset 0 0 1.25rem #d8b4fe33, 0 0 1.25rem var(--challenge-glow), 0 0 2rem #a855f755;
}
#towerScreen .floor-node-item:is(.special-challenge, .boss-challenge) { position: relative; overflow: hidden; isolation: isolate; }
#towerScreen .floor-node-item:is(.special-challenge, .boss-challenge)::before {
  content: ''; position: absolute; inset: -80% 0; width: 35%; pointer-events: none;
  background: linear-gradient(90deg, transparent, #ffffff26, transparent);
  transform: translate3d(-250%, 0, 0) rotate(22deg);
  animation: challengeCardShimmer 4.5s ease-in-out infinite;
}
#towerScreen .boss-challenge::before { animation-duration: 3.2s; }
#towerScreen .floor-node-item:is(.special-challenge, .boss-challenge) > * { position: relative; z-index: 1; }
#towerScreen :is(.special-challenge, .boss-challenge) .floor-trainer-name { color: #ecf7ff; text-shadow: 0 0 .5rem var(--challenge-color); }
#towerScreen :is(.special-challenge, .boss-challenge) .floor-status-tag.boss { color: var(--challenge-color); border-color: var(--challenge-color); }
#towerScreen .floor-node-item:is(.special-challenge, .boss-challenge):hover { filter: brightness(1.2); border-color: #fff; }
#towerScreen .floor-node-item.cleared-floor:is(.special-challenge, .boss-challenge) { filter: none; opacity: .72; }
#towerScreen .tower-challenger-panel:is(.special-challenge, .boss-challenge) .trainer-avatar-frame { border-color: var(--challenge-color); box-shadow: 0 0 1rem var(--challenge-glow); }
@keyframes challengeCardShimmer { 0%, 50% { opacity: 0; transform: translate3d(-250%, 0, 0) rotate(22deg); } 58% { opacity: .8; } 90%, 100% { opacity: 0; transform: translate3d(450%, 0, 0) rotate(22deg); } }
@media (prefers-reduced-motion: reduce) { #towerScreen .floor-node-item:is(.special-challenge, .boss-challenge)::before { animation: none; } }

#towerScreen .final-challenge {
  --challenge-color: #ff7979;
  --challenge-glow: #ef4444cc;
  position: relative;
  background: linear-gradient(125deg, #991b1ba6, #2d0b18 60%, #ef44444d);
  border-color: #ff7979;
  box-shadow: inset 0 0 1.25rem #f8717133, 0 0 1.25rem #ef4444bb, 0 0 2.125rem #dc262655;
}
#towerScreen .floor-node-item.final-challenge { overflow: visible; }
#towerScreen .floor-node-item.final-challenge::before { display: none; }
#towerScreen .final-challenge .floor-trainer-level { color: #fecaca; border-color: #f87171; background: #7f1d1d88; }
.red-challenge-sparks[hidden] { display: none; }
#towerScreen .final-challenge > .red-challenge-sparks { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.red-challenge-sparks i { position: absolute; width: .1875rem; height: .375rem; border-radius: .0625rem; background: #ffdc9b; box-shadow: 0 0 .3125rem #fb923c, 0 0 .625rem #ef4444; opacity: 0; animation: redChallengeSpark 2.2s ease-out infinite; animation-delay: var(--red-delay); }
.red-challenge-sparks i:nth-child(1) { left: 8%; top: 0; --red-dx: -.75rem; --red-dy: -1.625rem; --red-delay: 0s; }
.red-challenge-sparks i:nth-child(2) { left: 38%; top: 0; --red-dx: .5rem; --red-dy: -1.875rem; --red-delay: -.8s; }
.red-challenge-sparks i:nth-child(3) { right: 12%; top: 0; --red-dx: .875rem; --red-dy: -1.5rem; --red-delay: -1.6s; }
.red-challenge-sparks i:nth-child(4) { right: 0; top: 50%; --red-dx: 1.25rem; --red-dy: -.875rem; --red-delay: -.4s; }
.red-challenge-sparks i:nth-child(5) { left: 0; top: 60%; --red-dx: -1.125rem; --red-dy: -.75rem; --red-delay: -1.2s; }
.red-challenge-sparks i:nth-child(6) { left: 70%; bottom: 0; --red-dx: .75rem; --red-dy: 1rem; --red-delay: -1.9s; }
@keyframes redChallengeSpark { 0%, 12% { opacity: 0; transform: translate3d(0, 0, 0) rotate(0) scale(.5); } 25% { opacity: 1; } 85%, 100% { opacity: 0; transform: translate3d(var(--red-dx), var(--red-dy), 0) rotate(140deg) scale(.1); } }
@media (prefers-reduced-motion: reduce) { .red-challenge-sparks i { animation: none; } }

.starter-lab-card { width: min(70rem, 96vw); background: radial-gradient(ellipse at top, #1a355377, transparent 65%), #0b1222; }
.starter-lab-card .starter-select-body { gap: .875rem; }
.starter-lab-card .starter-hero-title { font: 900 clamp(.95rem, 2vw, 1.4rem)/1.3 var(--font-pixel-ui); }
.starter-lab-caption { color: #9bb3cd; text-align: center; font-size: .65rem; font-weight: 800; letter-spacing: .12em; }
.starter-lab-card .starter-slots-showcase { gap: .625rem; }
.starter-lab-card .starter-podium-slot, .starter-lab-card .starter-picked { min-height: 5rem; height: 5rem; }
.starter-lab-card .starter-picked { padding: .25rem .5rem; display: flex; flex-direction: row; justify-content: center; gap: .5rem; }
.starter-lab-card .starter-picked > img { width: 3.5rem; height: 3.5rem; }
.starter-lab-card .starter-picked-footer { position: static; width: auto; padding: 0; background: none; }
.starter-lab-card .starter-picked-footer strong { font-size: .75rem; }
.starter-lab-card .starter-picked button { position: absolute; top: .375rem; left: .375rem; right: auto; margin: 0; }
.starter-lab-card .starter-grid-scroll { flex: 0 1 auto; min-height: 0; padding: .25rem; mask-image: none; }
.starter-lab-card .starters-cards-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .75rem; }
.starter-lab-card .starter-choice-card { position: relative; display: flex; flex-direction: column; align-items: center; min-width: 0; min-height: 11.5rem; gap: .375rem; padding: .875rem .375rem .75rem; border: .0625rem solid color-mix(in srgb, var(--starter-accent) 55%, #334155); border-radius: 1rem; background: radial-gradient(ellipse at 50% 40%, color-mix(in srgb, var(--starter-accent) 20%, transparent), transparent 65%), #101b2c; transition: transform .2s, box-shadow .2s, border-color .2s, background .2s; }
.starter-lab-card .starter-choice-card > img { width: clamp(4.5rem, 12dvh, 7rem); height: clamp(4.5rem, 12dvh, 7rem); image-rendering: pixelated; filter: drop-shadow(0 .375rem .5rem #0008); }
.starter-lab-card .starter-choice-card > strong { font: 800 .85rem var(--font-pixel-ui); }
.starter-lab-card .starter-choice-card:hover { transform: translateY(-.25rem); border-color: var(--starter-accent); box-shadow: 0 0 1.25rem color-mix(in srgb, var(--starter-accent) 30%, transparent); }
.starter-lab-card .starter-choice-card.selected { border: .125rem solid #fbbf24; background: radial-gradient(ellipse at 50% 30%, #fbbf242e, transparent 70%), #172235; box-shadow: 0 0 1rem #fbbf243d, inset 0 0 .75rem #fbbf2412; }
.starter-choice-check { position: absolute; right: .5rem; top: .5rem; display: grid; place-items: center; width: 1.125rem; height: 1.125rem; border-radius: 50%; background: #fbbf24; color: #422006; font-weight: 900; opacity: 0; }
.starter-choice-card.selected .starter-choice-check { opacity: 1; }
.starter-choice-level { position: absolute; left: .5rem; top: .5rem; color: #9db2c9; font-size: .55rem; font-weight: 800; }
.starter-choice-types { display: flex; gap: .25rem; }
.starter-lab-card .starter-choice-types .game-type-symbol { width: 1.75rem; height: 1.25rem; object-fit: contain; }
.starter-lab-card .starter-choice-card > img { transform: scale(1.6); }
.starter-lab-card .starter-picked > img { width: 5rem; height: 5rem; transform: scale(1.5); }
.starter-lab-card .starter-actions-footer { margin-top: .25rem; }
@media (max-width: 700px) {
  .starter-lab-card .starters-cards-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .375rem; }
  .starter-lab-card .starter-choice-card { min-height: 8.5rem; padding: .75rem .25rem .5rem; }
  .starter-lab-card .starter-choice-card > strong { font-size: .7rem; }
  .starter-lab-card .starter-picked { flex-direction: column; gap: 0; }
  .starter-lab-card .starter-picked > img { width: 2.75rem; height: 2.75rem; }
  .starter-lab-card .starter-picked-footer strong { font-size: .6rem; }
}

.title-quick-social-row { display: flex; justify-content: center; gap: .75rem; }
.title-quick-social-row .btn-title-aux { flex: 0 1 13rem; width: 13rem; min-width: 0; min-height: 2.75rem; justify-content: center; }
#starterSelectionModal { overflow: hidden; padding: .5rem; }
.starter-lab-fit-frame { position: relative; width: min(70rem, 100%); flex-shrink: 0; }
#starterSelectionModal .starter-lab-fit-frame .starter-lab-card { position: absolute; top: 0; left: 0; width: 100%; height: auto; max-height: none; overflow: visible; transform: scale(var(--starter-fit, 1)); transform-origin: top center; }
.starter-lab-card .starter-select-body { flex: 0 0 auto; overflow: visible; }
.starter-lab-card .starter-slots-showcase { grid-template-columns: 1fr; width: min(20rem, 100%); align-self: center; margin-inline: auto; }
.starter-lab-card .starter-grid-scroll { overflow: visible; max-height: none; }
.starter-lab-card .starter-grid-scroll::after { display: none; }
#characterCreationModal { overflow: hidden; padding: .5rem; }
#characterCreationModal .char-create-card { display: flex; flex-direction: column; height: min(38rem, calc(100dvh - 1rem)); max-height: calc(100dvh - 1rem); overflow: hidden; }
#characterCreationModal .char-create-body { flex: 1; min-height: 0; overflow: hidden; gap: .75rem; padding: 1rem; }
#characterCreationModal .char-field-group, #characterCreationModal .char-create-actions { flex-shrink: 0; }
#characterCreationModal .char-field-group:has(#charAvatarsGrid) { flex: 1; min-height: 0; overflow: hidden; }
#characterCreationModal #charAvatarsGrid { flex: 1; min-height: 0; max-height: none; overflow-y: auto; overscroll-behavior: contain; }
.btn-swapper { display: inline-flex; align-items: center; justify-content: center; gap: .25rem; min-width: 2.75rem; padding: .375rem .5rem; border: .0625rem solid #2dd4bf; border-radius: .5rem; color: #99f6e4; background: linear-gradient(145deg,#0f766e,#10333b); box-shadow: 0 0 .5rem #2dd4bf33; cursor: pointer; transition: transform .18s,box-shadow .18s,filter .18s; }
.btn-swapper svg { width: 1.125rem; height: 1.125rem; }
.btn-swapper:hover { transform: translateY(-.125rem); box-shadow: 0 0 1rem #2dd4bf88; filter: brightness(1.2); }
.btn-swapper:active { transform: scale(.95); }
.btn-swapper:focus-visible { outline: .125rem solid #99f6e4; outline-offset: .1875rem; }
#btnRandomBalancedSquad:disabled { opacity: .35; filter: grayscale(1); cursor: not-allowed; }
.squad-empty-slot { display: flex; align-items: center; justify-content: center; gap: .25rem; border-style: dashed; color: #8db2cb; background: #101d2b; }
.squad-empty-slot .empty-slot-plus { font-size: 1.75rem; line-height: 1; color: #5eead4; }
.squad-empty-slot small { font-size: .6rem; }
.lobby-empty-slot { display: grid; place-items: center; min-height: 5rem; color: #64748b; border: .0625rem dashed #334155; border-radius: .5rem; font-size: .65rem; }
.adventure-item-card { width: min(32rem,94vw); max-height: calc(100dvh - 1rem); overflow: hidden; border-color: #2dd4bf; }
.adventure-item-card > p { padding: .75rem 1rem; color: #a8bdd0; font-size: .75rem; line-height: 1.5; }
.adventure-item-card h2 { font: 800 .9rem var(--font-pixel-ui); }
#adventureItemChoices { display: grid; gap: .5rem; padding: 0 1rem; }
.adventure-slot-choice { display: flex; align-items: center; gap: .75rem; padding: .5rem; border: .0625rem solid #315269; border-radius: .5rem; color: #e2e8f0; background: #13283a; cursor: pointer; }
.adventure-slot-choice:hover { border-color: #5eead4; box-shadow: 0 0 .75rem #2dd4bf33; }
.adventure-slot-choice img { width: 3rem; height: 3rem; image-rendering: pixelated; }
.adventure-slot-choice > span:first-of-type { display: flex; flex-direction: column; text-align: left; flex: 1; }
.adventure-slot-choice small { font-size: .65rem; color: #94a3b8; }
.adventure-slot-choice > span:last-child { color: #5eead4; font-size: .65rem; font-weight: 800; }
#adventureItemError { color: #fda4af; min-height: 1rem; }
.backpack-slot-icon svg, .shop-item-icon svg, .swapper-victory-reward > svg { width: 1.75rem; height: 1.75rem; }
.swapper-victory-reward { display: flex; align-items: center; justify-content: center; gap: .625rem; margin: .5rem 0; padding: .5rem; border: .0625rem solid #2dd4bf88; border-radius: .5rem; background: #0f766e33; color: #99f6e4; }
.swapper-victory-reward small { display: block; font-size: .6rem; color: #94a3b8; }

.synergy-safe-badge { width: 28px; height: 28px; padding: .25rem; gap: 0; }
.synergy-safe-badge .safe-icon { font-size: 1rem; }

/* A subtle hover response for action buttons; touch controls keep their tap sizing. */
@media (hover: hover) and (pointer: fine) {
  :is(.btn-icon,.btn-title-aux,.bottom-nav-tab,.btn-sub-tower,.btn-pokecenter,.btn-forfeit-run,.btn-pixel-primary,.btn-pixel-secondary,.btn-select-move,.btn-swapper,.training-shiny-pill,.btn-battle-end,.btn-close-modal,.trainer-profile-close,.btn-speed-toggle,.btn-flee-arena,.btn-send-pokemon,.btn-tower-fight) {
    transition: scale .16s ease, transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease, filter .16s ease;
    transform-origin: center;
  }
  :is(.btn-icon,.btn-title-aux,.bottom-nav-tab,.btn-sub-tower,.btn-pokecenter,.btn-forfeit-run,.btn-pixel-primary,.btn-pixel-secondary,.btn-select-move,.btn-swapper,.training-shiny-pill,.btn-battle-end,.btn-close-modal,.trainer-profile-close,.btn-speed-toggle,.btn-flee-arena,.btn-send-pokemon,.btn-tower-fight):hover:not(:disabled):not([aria-disabled="true"]) { scale: 1.035; }
  :is(.btn-icon,.btn-title-aux,.bottom-nav-tab,.btn-sub-tower,.btn-pokecenter,.btn-forfeit-run,.btn-pixel-primary,.btn-pixel-secondary,.btn-select-move,.btn-swapper,.training-shiny-pill,.btn-battle-end,.btn-close-modal,.trainer-profile-close,.btn-speed-toggle,.btn-flee-arena,.btn-send-pokemon,.btn-tower-fight):active:not(:disabled) { scale: .98; }
}
@media (prefers-reduced-motion: reduce) {
  :is(.btn-icon,.btn-title-aux,.bottom-nav-tab,.btn-sub-tower,.btn-pokecenter,.btn-forfeit-run,.btn-pixel-primary,.btn-pixel-secondary,.btn-select-move,.btn-swapper,.training-shiny-pill,.btn-battle-end,.btn-close-modal,.trainer-profile-close,.btn-speed-toggle,.btn-flee-arena,.btn-send-pokemon,.btn-tower-fight) { transition: none; }
}

/* The full-width tower CTA sits flush with its panel; scaling it creates overflow and a scrollbar. */
@media (hover: hover) and (pointer: fine) {
  .btn-tower-fight:hover:not(:disabled):not([aria-disabled="true"]) { scale: 1; }
}

/* Shared type symbols and matchup directions. No tactical-role UI. */
.tt-group-label { display: flex; align-items: center; gap: .3rem; }
.tt-group-label .synergy-direction { flex: 0 0 1rem; }
.tt-matchup-advantage .tt-group-label { color: #34d399; }
.tt-matchup-weakness .tt-group-label { color: #f87171; }
.tt-types-row .game-type-symbol, .tt-chips-wrap .game-type-symbol { flex: 0 0 1.25rem; }
.gt-icon-box .game-type-symbol { width: 2rem; height: 1.5rem; }
.smp-badge { display: inline-flex; align-items: center; gap: .2rem; }
.smp-extra .synergy-direction, .m-eff-badge .synergy-direction { width: .75rem; height: .75rem; vertical-align: middle; }
.type-badge, .type-badge-mini, .m-type-pill { display: inline-flex; align-items: center; justify-content: center; }
.card-mini-types .game-type-symbol { width: 1rem; height: .75rem; }
.training-move-symbol { position: absolute; left: .25rem; top: 50%; translate: 0 -50%; pointer-events: none; }
.training-move-field:has(.training-move-symbol) select { padding-left: 1.75rem; }

.training-pokemon-card small .game-type-symbol { width: 1rem; height: .75rem; }
/* Lightweight CSS particles: fixed elements, no combat allocations or JS animation loop. */
.ui-sparks { display:none; pointer-events:none; }
html:not(.battlemon-mobile) .ui-sparks { display:block; position:absolute; inset:0; border-radius:inherit; overflow:visible; pointer-events:none; z-index:3; }
html:not(.battlemon-mobile) .ui-sparks i { position:absolute; top:18%; left:14%; width:3px; height:3px; border-radius:1px; background:var(--spark-color,#ffdb79); box-shadow:0 0 5px var(--spark-color,#ffdb79); opacity:0; --spark-x:-10px; --spark-delay:0s; }
html:not(.battlemon-mobile) .ui-sparks i:nth-child(2) { left:68%; top:4%; --spark-x:8px; --spark-delay:.8s; }
html:not(.battlemon-mobile) .ui-sparks i:nth-child(3) { left:91%; top:32%; --spark-x:15px; --spark-delay:1.6s; }
html:not(.battlemon-mobile) :is(#accountSubmit,.exp-lock-panel,.bottom-nav-tab.active)>.ui-sparks i { animation:uiSparkDrift 2.6s ease-out var(--spark-delay) infinite; }
@keyframes uiSparkDrift { 0%,20%{transform:translate3d(0,0,0) scale(.3);opacity:0}35%{opacity:1;transform:translate3d(0,-4px,0) scale(1)}100%{opacity:0;transform:translate3d(var(--spark-x),-25px,0) scale(.2)} }
html:not(.battlemon-mobile) #bottomGameNav { overflow:visible; }
html:not(.battlemon-mobile) .bottom-nav-tab.active { --spark-color:var(--tab-color); transform:translateY(-.25rem); box-shadow:inset 0 1px #ffffff44,0 3px 0 #050914,0 0 1.05rem color-mix(in srgb,var(--tab-color) 55%,transparent); }
html:not(.battlemon-mobile) .bottom-nav-tab.center-tower-tab.active { --spark-color:#ffe583; transform:translateY(-.3125rem); box-shadow:inset 0 1px #fff8,0 3px 0 #631122,0 0 1.2rem #fbc94877; }
html:not(.battlemon-mobile) :is(#btnHeaderLeaderboard,#btnHomeLeaderboard) { color:#60a5fa; border-color:#447ec066; }
html:not(.battlemon-mobile) :is(#btnHeaderLeaderboard,#btnHomeLeaderboard) svg { color:#60a5fa; stroke:#60a5fa; }
html:not(.battlemon-mobile) :is(#btnHeaderLeaderboard,#btnHomeLeaderboard) svg * { stroke:currentColor; }
@media(prefers-reduced-motion:reduce){html:not(.battlemon-mobile) :is(#accountSubmit,.exp-lock-panel,.bottom-nav-tab.active)>.ui-sparks i { animation:none; } }

/* Compact PC controls and catalogue breathing room. */
html:not(.battlemon-mobile) :is(#btnHeaderLeaderboard,#btnHomeLeaderboard):hover { border-color:#60a5fa; box-shadow:0 0 1rem #3b82f680,inset 0 0 .4rem #3b82f622; }
html:not(.battlemon-mobile) .currency-pill.coins { justify-content:center; gap:.4rem; }
html:not(.battlemon-mobile) #settingsModal .modal-card { width:min(35rem,94vw); }
html:not(.battlemon-mobile) #settingsModal .modal-footer { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:.8rem 1.2rem; }
html:not(.battlemon-mobile) #settingsModal .settings-version-footer { margin:0; padding:0; border:0; }
html:not(.battlemon-mobile) #settingsModal #btnApplySettings { width:auto; min-width:8rem; padding:.6rem 1rem; }
html:not(.battlemon-mobile) :is(#pokedexCounterBadge,#pokedexShiniesBadge) { display:inline-flex; align-items:center; justify-content:center; min-width:9rem; height:2rem; padding:.3rem .65rem; box-sizing:border-box; white-space:nowrap; }
html:not(.battlemon-mobile) #pokedexShiniesBadge { position:relative; overflow:visible; color:#ffe889; border-color:#fcd34d; box-shadow:0 0 .8rem #fbbf2455; }
html:not(.battlemon-mobile) #pokedexGrid .pokeidle-card.in-squad:after { top:.4rem; left:.4rem; right:auto; }
html:not(.battlemon-mobile) :is(#pokedexGrid,#squadPickerGrid) { padding-top:.7rem; padding-inline:.45rem; scroll-padding-top:.7rem; }
html:not(.battlemon-mobile) .shop-category-col .category-header { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:.4rem 1rem; }
html:not(.battlemon-mobile) .category-header h3 { margin:0; }
html:not(.battlemon-mobile) .category-header .shop-filter-control { grid-column:2; grid-row:1/3; margin:0; }
html:not(.battlemon-mobile) .category-header .category-sub { grid-column:1; }
html:not(.battlemon-mobile) .bottom-nav-tab.center-tower-tab:is(.active,:hover) { transform:translateY(-.125rem); scale:1.01; }
.chat-room-channel { justify-content:flex-start; padding-left:1.25rem; }
.chat-room .btn-chat-send.is-cooling-down { min-width:5.2rem; background:#344155; color:#aab6c8; border-color:#53627a; box-shadow:none; cursor:wait; filter:none; }
.in-battle-screen #btnReturnToMainMenu { display:none !important; }
/* Every shiny name uses the same two lightweight particle pseudo-elements. */
:is(.shiny-name-gold,.training-member-name.is-shiny) { position:relative; display:inline-block; overflow:visible; color:#ffe27b !important; text-shadow:0 0 .3rem #fbbf24,0 0 .65rem #eab30888; }
:is(.shiny-name-gold,.training-member-name.is-shiny):before,:is(.shiny-name-gold,.training-member-name.is-shiny):after,#pokedexShiniesBadge:before,#pokedexShiniesBadge:after { content:''; position:absolute; pointer-events:none; width:3px; height:3px; background:#fff5bc; border-radius:1px; box-shadow:0 0 5px #fbbf24; top:30%; left:5%; animation:shinyNameSpark 2.4s ease-out infinite; }
:is(.shiny-name-gold,.training-member-name.is-shiny):after,#pokedexShiniesBadge:after { left:88%; top:55%; animation-delay:1.2s; }
@keyframes shinyNameSpark { 0%,15%{opacity:0;transform:translateY(4px) scale(.3) rotate(45deg)}35%{opacity:1;transform:translateY(0) scale(1) rotate(45deg)}100%{opacity:0;transform:translateY(-14px) scale(.2) rotate(45deg)} }
@media(prefers-reduced-motion:reduce){:is(.shiny-name-gold,.training-member-name.is-shiny):before,:is(.shiny-name-gold,.training-member-name.is-shiny):after,#pokedexShiniesBadge:before,#pokedexShiniesBadge:after {animation:none;} }

/* Home-only music control mirrors the profile's top and side inset. */
#homeScreen .home-music-toggle { position:absolute; top:1rem; right:1rem; z-index:10; width:3.5rem; height:3.5rem; border-radius:1rem; border-color:#38bdf877; color:#dff5ff; background:linear-gradient(135deg,#1b2b43f5,#0b1426f5); box-shadow:0 .35rem 1.5rem #0006,inset 0 1px #ffffff15; }
#homeScreen .home-music-toggle svg { width:1.55rem; height:1.55rem; }
.home-music-slash { display:none; }
#homeScreen .home-music-toggle[aria-pressed="true"] { color:#fda4af; border-color:#fb718588; }
.home-music-toggle[aria-pressed="true"] .home-music-slash { display:block; }
#homeScreen .home-music-toggle:hover { border-color:#7dd3fc; box-shadow:0 .35rem 1.5rem #0006,0 0 1rem #38bdf840; }
#homeScreen .home-music-toggle:focus-visible { outline:2px solid #7dd3fc; outline-offset:3px; }
html:not(.battlemon-mobile) #btnHomeLeaderboard { color:#fff; }
html:not(.battlemon-mobile) #profileMainTeam .profile-team-pokemon { flex-direction:column; justify-content:flex-start; gap:.25rem; padding:.45rem .3rem; text-align:center; }
html:not(.battlemon-mobile) #profileMainTeam .profile-team-pokemon>span { width:100%; align-items:center; }
html:not(.battlemon-mobile) #profileMainTeam .profile-team-pokemon strong { width:100%; max-width:100%; white-space:normal; overflow:visible; text-overflow:clip; overflow-wrap:anywhere; font-size:.6rem; line-height:1.35; }
html:not(.battlemon-mobile) #topGameHeader .currency-pill.coins { height:2.125rem; box-sizing:border-box; }
html:not(.battlemon-mobile) #topGameHeader .exp-map-wallet { height:2.125rem; min-height:2.125rem; box-sizing:border-box; }

html:not(.battlemon-mobile) #btnQuickMusicToggle { color:#60a5fa !important; border-color:#3b82f677 !important; background:#11243e !important; }
html:not(.battlemon-mobile) #btnQuickMusicToggle:hover { box-shadow:0 0 .7rem #3b82f655; }
html:not(.battlemon-mobile) #btnQuickMusicToggle.muted { color:#f87171 !important; border-color:#ef444488 !important; background:#381723 !important; }
html:not(.battlemon-mobile) #btnQuickMusicToggle.muted:hover { box-shadow:0 0 .7rem #ef444455; }
.header-music-slash { display:none; }
#btnQuickMusicToggle.muted .header-music-slash { display:block; }

/* The selected leader's outer glow needs room beyond its panel's rounded border. */
html:not(.battlemon-mobile) #towerScreen .tower-hub-layout { padding:.65rem; box-sizing:border-box; }
html:not(.battlemon-mobile) #towerScreen .tower-floors-list { padding:.35rem; overflow:visible; }
@media(min-width:1081px){html:not(.battlemon-mobile) #towerScreen .tower-hub-layout { overflow:visible; }}

/* Fit content instead of scrolling it; scroll containers were clipping the trainer glow. */
html:not(.battlemon-mobile) #towerScreen { overflow:visible; }
html:not(.battlemon-mobile) #towerScreen .tower-hub-layout { padding:.9rem; }
html:not(.battlemon-mobile) #towerScreen .tower-challenger-panel { overflow:visible; min-width:0; box-sizing:border-box; }
html:not(.battlemon-mobile) #towerScreen .challenger-card { min-width:0; max-width:100%; gap:clamp(.4rem,1.2dvh,.8rem); }
html:not(.battlemon-mobile) #towerScreen .challenger-team-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:.4rem; }
html:not(.battlemon-mobile) #towerScreen .challenger-card :is(.challenger-meta,.challenger-sector-banner>span,.enemy-preview-poke) { min-width:0; }
html:not(.battlemon-mobile) #towerScreen .challenger-sector-banner { gap:.4rem; flex-wrap:wrap; }
html:not(.battlemon-mobile) #towerScreen .challenger-name { overflow-wrap:anywhere; }
html:not(.battlemon-mobile) #towerScreen .challenger-quote { margin:0; }
html:not(.battlemon-mobile) #towerScreen .challenger-card :is(.ep-name,.ep-bst) { max-width:100%; text-align:center; overflow-wrap:anywhere; }
html:not(.battlemon-mobile) #towerScreen .challenger-sub-actions { grid-template-columns:repeat(2,minmax(0,1fr)); min-width:0; }
html:not(.battlemon-mobile) #towerScreen .tower-challenger-panel:is(.special-challenge,.boss-challenge,.final-challenge) { box-shadow:inset 0 0 1.2rem color-mix(in srgb,var(--challenge-color) 18%,transparent),0 0 .65rem var(--challenge-glow),0 0 1.1rem var(--challenge-glow); }

/* Match the progress frame to the trainer list's horizontal inset. */
html:not(.battlemon-mobile) #towerScreen .tower-overall-progress { margin-inline:.35rem; }
html:not(.battlemon-mobile) #towerScreen .floor-trainer-heading { align-items:center; }
html:not(.battlemon-mobile) #towerScreen .floor-trainer-level { height:.9rem; box-sizing:border-box; padding:0 .3rem; font-size:.58rem; line-height:1; align-items:center; justify-content:center; }

html:not(.battlemon-mobile) #towerScreen .tower-map-header-row { margin-inline:.35rem; }

/* All standard notices omit the generic tower label and center their body copy. */
#gameAlertBadge[hidden] { display:none; }
#gameAlertModal .game-alert-body { text-align:center; }
#gameAlertModal .game-alert-main-text { width:100%; text-align:center; }

html:not(.battlemon-mobile) #movePickerModal .mp-card-stats { align-items:center; }
html:not(.battlemon-mobile) #movePickerModal .mp-card-stats>span { display:inline-flex; align-items:center; line-height:1.2; }
.mp-stab-bonus { color:#10b981; font-weight:800; gap:.2rem; }
.mp-stab-bonus svg { width:.8rem; height:.8rem; flex-shrink:0; }

/* The backpack uses bounded pages and rows rather than a scroll viewport. */
html:not(.battlemon-mobile) #towerBackpackGrid { min-height:0; overflow:hidden; padding:.1rem; grid-template-rows:repeat(var(--backpack-rows,4),minmax(0,1fr)); align-content:stretch; }
html:not(.battlemon-mobile) #towerBackpackGrid .backpack-slot { min-width:0; min-height:0; height:100%; padding:.2rem .4rem; gap:.4rem; }
html:not(.battlemon-mobile) #towerBackpackGrid .backpack-slot-icon svg { width:1.35rem; height:1.35rem; }
.tower-backpack-pagination { display:flex; flex-shrink:0; align-items:center; justify-content:center; gap:.65rem; height:1.7rem; color:#9fc6e9; font:.62rem var(--font-pixel-ui); }
.tower-backpack-pagination[hidden] { display:none; }
.tower-backpack-pagination button { display:grid; place-items:center; width:1.6rem; height:1.5rem; border:1px solid #35567c; border-radius:.3rem; background:#11243d; color:#7dd3fc; cursor:pointer; }
.tower-backpack-pagination button:disabled { opacity:.3; cursor:default; }
.tower-backpack-pagination svg { width:.85rem; height:.85rem; }
/* Shared feedback for music, settings, daily rewards and ranking controls. */
:is(#btnQuickMusicToggle,#btnHomeMusicMute,#btnHeaderLeaderboard,#btnHomeLeaderboard) { --icon-hover-color:#60a5fa; }
:is(#btnOpenSettings,#btnHomeSettings) { --icon-hover-color:#c4d9f0; }
#btnDailyRewards { --icon-hover-color:#fbbf24; }
#btnQuickMusicToggle.muted,#btnHomeMusicMute[aria-pressed="true"] { --icon-hover-color:#f87171; }
@media(hover:hover) and (pointer:fine){
 html:not(.battlemon-mobile) :is(#btnQuickMusicToggle,#btnHomeMusicMute,#btnOpenSettings,#btnHomeSettings,#btnDailyRewards,#btnHeaderLeaderboard,#btnHomeLeaderboard) { transition:scale .16s ease,box-shadow .16s ease,border-color .16s ease; transform-origin:center; }
 html:not(.battlemon-mobile) :is(#btnQuickMusicToggle,#btnHomeMusicMute,#btnOpenSettings,#btnHomeSettings,#btnDailyRewards,#btnHeaderLeaderboard,#btnHomeLeaderboard):hover { transform:none; scale:1.035; border-color:var(--icon-hover-color); box-shadow:0 0 .9rem color-mix(in srgb,var(--icon-hover-color) 60%,transparent),inset 0 0 .4rem color-mix(in srgb,var(--icon-hover-color) 12%,transparent); }
 html:not(.battlemon-mobile) :is(#btnQuickMusicToggle,#btnHomeMusicMute,#btnOpenSettings,#btnHomeSettings,#btnDailyRewards,#btnHeaderLeaderboard,#btnHomeLeaderboard):active { transform:none; scale:.98; }
}
@media(prefers-reduced-motion:reduce){html:not(.battlemon-mobile) :is(#btnQuickMusicToggle,#btnHomeMusicMute,#btnOpenSettings,#btnHomeSettings,#btnDailyRewards,#btnHeaderLeaderboard,#btnHomeLeaderboard){transition:none}}

/* Progression uses shared state; visual spacing is refined independently on desktop. */
.progression-xp-track,.slot-xp-track { display:block; height:3px; background:#20304b; border-radius:3px; overflow:hidden; }
.progression-xp-track i,.slot-xp-track i { display:block; height:100%; background:#38bdf8; border-radius:inherit; }
.progression-xp-track { margin-top:.3rem; }
.slot-xp-info { display:flex; flex-direction:column; gap:.15rem; color:#7dd3fc; font:.53rem/1.1 var(--font-clean); }
.slot-evolution-btn { margin-left:.4rem; padding:.1rem .3rem; border:1px solid #38bdf866; border-radius:.25rem; background:#12314b; color:#7dd3fc; font:800 .5rem var(--font-clean); cursor:pointer; }
.progression-evolution-card { width:min(48rem,calc(100vw - 2rem)); max-height:85dvh; overflow:auto; border-color:#fbbf24; box-shadow:0 0 2rem #fbbf2426; }
.progression-evolution-card .modal-header { display:flex; align-items:center; gap:.8rem; }
.progression-evolution-card .modal-header h2 { flex:1; }
.progression-evolution-description { text-align:center; font:.8rem/1.7 var(--font-clean); padding:1rem; margin:0; }
#pokemonEvolutionChoices { display:grid; grid-template-columns:repeat(auto-fit,minmax(12rem,1fr)); gap:.7rem; padding:0 1rem 1rem; text-align:center; }
.progression-evolution-choice { display:flex; flex-direction:column; align-items:center; justify-content:space-between; gap:.7rem; padding:1rem; background:#101e33; border:1px solid #375373; border-radius:.6rem; }
.progression-evolution-sprites { display:flex; align-items:center; gap:.4rem; color:#38bdf8; }
.progression-evolution-sprites img { width:4rem; height:4rem; object-fit:contain; image-rendering:pixelated; }
.progression-evolution-choice strong { font:800 .8rem var(--font-clean); }
.progression-evolution-choice small { color:#b9cbe2; font:.65rem/1.5 var(--font-clean); }
.progression-evolution-choice button { width:100%; font-size:.65rem; }
.progression-evolution-choice button:disabled { opacity:.5; cursor:not-allowed; }
#pokemonEvolutionError { color:#fda4af; text-align:center; font:.8rem var(--font-clean); padding:0 1rem; }

/* Evolution artwork and the transformation sequence share the original dialog. */
.progression-evolution-card { position:relative; }
.progression-evolution-card .modal-header { justify-content:flex-start; }
.progression-evolution-card .modal-header h2 { margin:0; line-height:1.25; }
.progression-evolution-card .modal-header .btn-close-modal { position:static; margin-left:auto; align-self:center; }
.progression-evolution-icon { display:inline-flex; align-items:center; justify-content:center; width:2.25rem; height:2.25rem; flex:none; color:#6ee7b7; border:1px solid #34d39988; border-radius:.5rem; background:#103d38; box-shadow:0 0 .7rem #34d39933; }
.progression-evolution-icon svg { width:1.8rem; height:1.8rem; }
.progression-evolution-card.is-transforming :is(.progression-evolution-description,#pokemonEvolutionChoices,#pokemonEvolutionError) { visibility:hidden; pointer-events:none; }
.progression-evolution-card.is-transforming .btn-close-modal { opacity:.35; pointer-events:none; }
/* Evolução estilo FireRed (core/progression.js → playEvolutionAnimation) */
.progression-evolution-card.is-transforming { overflow:hidden; min-height:min(28rem,calc(100dvh - 2.5rem)); }
.progression-evolution-animation { position:absolute; inset:4.5rem 1rem 1rem; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:1.2rem; border-radius:.7rem; overflow:hidden; background:radial-gradient(ellipse at center,#1b2f55cc,#0a1222 75%); }
.evo-stage { position:relative; display:grid; place-items:center; width:14rem; height:14rem; flex-shrink:0; }
.evo-rays { position:absolute; inset:-5rem; border-radius:50%; opacity:0; pointer-events:none; transition:opacity 1.2s ease;
  background:repeating-conic-gradient(from 0deg,#ff6b6b66 0 7deg,transparent 7deg 15deg,#ffd93d66 15deg 22deg,transparent 22deg 30deg,#6bcb7766 30deg 37deg,transparent 37deg 45deg,#4d96ff66 45deg 52deg,transparent 52deg 60deg,#c77dff66 60deg 67deg,transparent 67deg 75deg);
  -webkit-mask:radial-gradient(circle,#000 18%,transparent 66%); mask:radial-gradient(circle,#000 18%,transparent 66%); animation:evoSpin 9s linear infinite; }
.evo-ring { position:absolute; width:11rem; height:11rem; border-radius:50%; opacity:0; pointer-events:none;
  background:conic-gradient(from 0deg,#ff6b6b,#ffd93d,#6bcb77,#4d96ff,#c77dff,#ff6b6b);
  -webkit-mask:radial-gradient(circle,transparent 62%,#000 64%,#000 70%,transparent 72%); mask:radial-gradient(circle,transparent 62%,#000 64%,#000 70%,transparent 72%);
  filter:blur(.5px) drop-shadow(0 0 .6rem #fff); animation:evoSpin 2.4s linear infinite, evoRingPulse 1.4s ease-in-out infinite; transition:opacity .8s; }
.evo-ring.ring-2 { width:7.5rem; height:7.5rem; animation-direction:reverse,normal; animation-duration:1.6s,1.1s; }
.evo-sprite { position:absolute; z-index:2; width:8rem; height:8rem; object-fit:contain; image-rendering:pixelated; transition:opacity .06s linear, transform .12s ease, filter .4s ease; }
.evo-to { opacity:0; }
.phase-glow .evo-from { filter:drop-shadow(0 0 .5rem #fff) drop-shadow(0 0 1.2rem #a5f3fc); animation:evoBreath 1.3s ease-in-out infinite; }
.phase-morph .evo-rays, .phase-reveal .evo-rays { opacity:1; }
.phase-morph .evo-ring { opacity:.9; }
.phase-morph .evo-sprite { filter:brightness(0) invert(1) drop-shadow(0 0 .7rem #fff) drop-shadow(0 0 1.6rem #c4b5fd); }
.phase-morph .evo-from { opacity:1; transform:scale(1); }
.phase-morph .evo-to { opacity:0; transform:scale(1.12); }
.phase-morph.show-to .evo-from { opacity:0; transform:scale(.86); }
.phase-morph.show-to .evo-to { opacity:1; transform:scale(1); }
.evo-flash { position:absolute; inset:-30rem; z-index:5; background:#fff; opacity:0; pointer-events:none; }
.phase-flash .evo-flash { animation:evoFlash 1.1s ease-out forwards; }
.phase-reveal .evo-from { opacity:0; }
.phase-reveal .evo-to { opacity:1; transform:scale(1); filter:drop-shadow(0 0 .7rem #fde68a) drop-shadow(0 0 1.6rem #c77dff); animation:evoPop .9s cubic-bezier(.3,1.6,.5,1); }
.phase-reveal .evo-ring { opacity:.6; }
.phase-reveal .evo-rays { animation-duration:4s; }
.evo-spark { position:absolute; left:50%; bottom:1rem; z-index:3; width:5px; height:5px; margin-left:var(--x); border-radius:1px; background:var(--c); box-shadow:0 0 6px var(--c),0 0 12px var(--c); pointer-events:none; animation:evoRise 1.3s ease-out forwards; }
.evo-spark.is-burst { top:50%; bottom:auto; margin:-3px; width:6px; height:6px; animation:evoBurst 1.2s cubic-bezier(.2,.8,.3,1) forwards; }
.evolution-animation-status { max-width:24rem; color:#e0f2fe; font:800 .85rem/1.5 var(--font-pixel-ui); letter-spacing:.04em; text-align:center; text-shadow:0 2px 0 #0b1426; }
.evolution-animation-status.is-done { animation:evoTextPop .7s cubic-bezier(.3,1.6,.5,1); }
.evolution-animation-status b { background:linear-gradient(90deg,#ff6b6b,#ffd93d,#6bcb77,#4d96ff,#c77dff,#ff6b6b); background-size:200% 100%; -webkit-background-clip:text; background-clip:text; color:transparent; text-shadow:none; animation:evoRainbowText 2s linear infinite; }
@keyframes evoSpin { to{transform:rotate(360deg)} }
@keyframes evoRingPulse { 0%,100%{scale:.94} 50%{scale:1.06} }
@keyframes evoBreath { 0%,100%{transform:scale(1)} 50%{transform:scale(1.04)} }
@keyframes evoFlash { 0%{opacity:0} 25%{opacity:1} 100%{opacity:0} }
@keyframes evoPop { 0%{transform:scale(.4)} 60%{transform:scale(1.2)} 100%{transform:scale(1)} }
@keyframes evoRise { from{transform:translate(0,0) scale(1);opacity:1} to{transform:translate(var(--dx),var(--dy)) scale(.2);opacity:0} }
@keyframes evoBurst { from{transform:translate(0,0) scale(1.4);opacity:1} to{transform:translate(var(--dx),var(--dy)) scale(0);opacity:0} }
@keyframes evoTextPop { 0%{transform:scale(.7);opacity:0} 100%{transform:scale(1);opacity:1} }
@keyframes evoRainbowText { to{background-position:200% 0} }
@media(prefers-reduced-motion:reduce){.evo-stage *{animation:none!important;transition:none!important}.evo-flash{display:none}}

#gameAlertIcon>svg { width:1.9rem; height:1.9rem; color:#6ee7b7; }

.title-badge-under { transform: none; margin-top: .9rem; }

/* Fundo quadriculado padrão (o mesmo da loja) em todas as telas; no menu só o azul leva o quadriculado, o padrão de Pokémon fica por cima */
body { background: repeating-conic-gradient(#ffffff05 0 25%, transparent 0 50%) 0 0 / 3rem 3rem, #0b1426; }
.game-title-screen { background: repeating-conic-gradient(#ffffff05 0 25%, transparent 0 50%) 0 0 / 3rem 3rem, #0b1426; }

/* Tooltip: o Shiny desbloqueado aparece só como símbolo */
.tt-shiny-badge { width: 1.6rem; height: 1.6rem; justify-content: center; padding: 0; font-size: .95rem; border-radius: 50%; box-shadow: 0 0 .6rem #fbbf2466; }

/* Tela de vitória: botões do mesmo tamanho, centralizados e com folga para o hover; +N NV. em azul; ícone do Rare Candy */
#battleModal .battle-end-screen:not(.defeat-mode) .battle-end-actions { grid-template-columns: repeat(2, minmax(0, 15rem)); justify-content: center; gap: 1.1rem; margin-top: .6rem; }
#battleModal .battle-end-screen:not(.defeat-mode) .btn-battle-end { width: 100%; min-width: 0; }
.end-poke-xp-tag .end-poke-levelup { color: #38bdf8; font-weight: 800; text-shadow: 0 0 .5rem #38bdf855; }
.perk-icon .perk-candy { width: 2.2rem; height: 2.2rem; display: block; margin: 0 auto; filter: drop-shadow(0 0 .35rem #a78bfa88); }

/* Derrota: menos informação e botões iguais, centralizados e com folga para o hover (vale para vitória e derrota) */
#battleModal .battle-end-screen .battle-end-actions,
#battleModal .battle-end-screen.defeat-mode .battle-end-actions { grid-template-columns: repeat(2, minmax(0, 15rem)); justify-content: center; gap: 1.1rem; margin-top: .6rem; }
#battleModal .battle-end-screen .btn-battle-end,
#battleModal .battle-end-screen.defeat-mode .btn-battle-end { width: 100%; min-width: 0; }
#battleModal .battle-end-screen.defeat-mode .battle-end-badge { display: none; }
#battleModal .defeat-note { margin: .2rem 0 .4rem; color: #cbd5e1; font-size: .9rem; text-align: center; }
#battleModal .defeat-note strong { color: #fde68a; }
