/* Telas da conta (v0.4): entrar, inicial, início, caminho dos troféus, recompensas, coleção */

.hidden { display: none !important; }
.overlay { overflow-y: auto; }
.panel { max-height: 100%; overflow-y: auto; }
.sub.small, p.small { font-size: 12px; opacity: 0.75; margin-top: 8px; }
.waiting::after { content: ''; animation: dots 1.4s steps(4) infinite; }
button.link {
  display: block;
  width: 100%;
  margin-top: 10px;
  background: none;
  box-shadow: none;
  color: #9fb3ff;
  font-weight: 600;
  text-decoration: underline;
  padding: 6px;
}
button.link:active { transform: none; }
#menu-account { margin-top: 14px; }

.auth-form { display: grid; gap: 10px; margin-top: 14px; }
.auth-form input {
  padding: 12px;
  border-radius: 10px;
  border: 2px solid #4d5d94;
  background: #161d36;
  color: #fff;
  font: inherit;
  user-select: text;
  -webkit-user-select: text;
}
.auth-form input:focus { outline: 2px solid #f8d030; border-color: transparent; }

/* Escolha do inicial */
.starter-panel { max-width: 520px; }
#starter-options { display: grid; gap: 10px; margin-top: 14px; }
.starter-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  grid-template-areas: 'img title' 'img hint' 'deck deck' 'btn btn';
  gap: 2px 12px;
  padding: 10px;
  border-radius: 14px;
  text-align: left;
  background: linear-gradient(135deg, color-mix(in srgb, var(--type) 45%, #222b4a), #222b4a 70%);
  border: 2px solid color-mix(in srgb, var(--type) 70%, #fff);
}
.starter-card > img { grid-area: img; width: 64px; height: 64px; image-rendering: pixelated; border-radius: 10px; }
.starter-card h3 { grid-area: title; align-self: end; }
.starter-card p { grid-area: hint; font-size: 13px; opacity: 0.85; }
.mini-deck { grid-area: deck; display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; margin-top: 6px; }
.mini-deck img { width: 100%; image-rendering: pixelated; border-radius: 6px; background: rgba(0, 0, 0, 0.25); }
.starter-card button { grid-area: btn; margin-top: 8px; }

/* Início: ver css/hub.css. Peças reaproveitadas lá: */
.ball-slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 12px; }
.ball-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-height: 92px;
  padding: 6px 4px;
  border-radius: 12px;
  background: #1a2240;
  border: 2px solid #3b4a7d;
  box-shadow: none;
  font-size: 11px;
  text-align: center;
}
.ball-slot img { width: 34px; height: 34px; image-rendering: pixelated; }
.ball-slot b, .ball-slot small { font-size: 11px; }
.ball-slot.empty { justify-content: center; border-style: dashed; opacity: 0.6; }
.ball-slot.empty small { font-size: 9px; }
.ball-slot.unlocking { border-color: #8fb0ff; }
.ball-slot.ready { border-color: #f8d030; background: #3b3416; animation: glow 1.2s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 14px #f8d030; } }
.free-ball { margin-top: 8px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.free-ball img { width: 26px; height: 26px; image-rendering: pixelated; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; margin: 10px 0 8px; text-align: left; }
.check input { width: 18px; height: 18px; accent-color: #f0b400; flex-shrink: 0; }

/* Caminho dos troféus */
.road-panel { display: flex; flex-direction: column; height: 100%; text-align: left; }
#road-list { flex: 1; overflow-y: auto; display: grid; gap: 8px; margin-top: 10px; padding: 2px; }
.road-step {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 12px;
  background: #1a2240;
  border: 2px solid #3b4a7d;
  opacity: 0.6;
}
.road-step.reached { opacity: 1; background: linear-gradient(90deg, color-mix(in srgb, var(--arena) 45%, #1a2240), #1a2240); }
.road-step.current { border-color: #f8d030; box-shadow: 0 0 0 2px #f8d030; }
.road-trophies { font-weight: 800; font-size: 13px; }
.road-body { display: grid; gap: 3px; font-size: 14px; }
.road-body small { opacity: 0.8; font-size: 11px; }
.road-you { font-weight: 900; color: #f8d030; font-size: 12px; }

/* Recompensas */
/* Ball em cima e texto embaixo: com a ball do lado, um texto longo (presente) ficava fora do centro do pop-up */
.reward-title { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 22px; text-align: center; }
.reward-ball { width: 48px; height: 48px; image-rendering: pixelated; animation: wobble 0.6s ease-in-out 2; }
@keyframes wobble { 25% { transform: rotate(-18deg); } 75% { transform: rotate(18deg); } }
/* Cartas centralizadas, mesmo quando são poucas (presente, Poké Ball com 2 cartas...) */
#reward-cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 14px 0; align-items: flex-start; }
#reward-cards .reward-card { width: 76px; flex: 0 0 76px; }
.reward-card { animation: pop 0.35s ease-out both; }
@keyframes pop { from { transform: scale(0.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.reward-card .count { position: absolute; top: 2px; right: 4px; font-weight: 900; font-size: 13px; text-shadow: 0 1px 2px #000; }
.reward-card .new { position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%) rotate(-12deg); background: #ef4444; padding: 1px 6px; border-radius: 6px; font-size: 11px; font-weight: 900; }
#reward-extra { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 14px; font-weight: 700; }
.reward-gold { font-size: 18px; }
.reward-item { display: inline-flex; align-items: center; gap: 4px; }
.item-icon { width: 24px; height: 24px; image-rendering: pixelated; vertical-align: middle; }

/* Cartas na coleção */
/* Moldura única das cartas (Pokédex, deck, balls, mapa, Loja): fundo do tipo e borda da cor da raridade */
.card { border-color: var(--rarity, #e9edf7); box-shadow: 0 3px 0 #0d1226, inset 0 -4px 0 var(--rarity, transparent); }
.card .lvl { position: absolute; top: 2px; right: 3px; font-size: 9px; font-weight: 900; background: rgba(0, 0, 0, 0.55); padding: 0 4px; border-radius: 5px; }
.card.locked { filter: grayscale(1) brightness(0.55); }
.card.can-upgrade::after {
  content: '▲';
  position: absolute;
  bottom: 16px;
  right: 3px;
  color: #7dff8a;
  font-size: 12px;
  text-shadow: 0 1px 2px #000;
  animation: glow-up 1s ease-in-out infinite;
}
@keyframes glow-up { 50% { transform: translateY(-3px); } }
#deck-gold { font-weight: 800; font-size: 13px; }
.info-actions { display: flex; flex-direction: column; gap: 6px; }
.copies { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.copies-bar { position: relative; flex: 1; min-width: 90px; height: 18px; border-radius: 9px; background: #0f1430; overflow: hidden; }
.copies-bar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(#7dd3fc, #2563eb); }
.copies-bar span { position: relative; display: block; text-align: center; font-size: 11px; font-weight: 800; line-height: 18px; text-shadow: 0 1px 1px #000; }
.copies button { flex: 0 0 auto; padding: 6px 10px; font-size: 12px; }
.locked-hint { display: block; opacity: 0.85; font-size: 12px; line-height: 1.4; }
.item-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.item-row button { flex: 0 0 auto; padding: 4px 8px; font-size: 12px; display: inline-flex; align-items: center; gap: 4px; }
#deck-msg { min-height: 1.2em; font-size: 13px; font-weight: 700; text-align: center; }
#deck-msg.good { color: #7dff8a; }
#deck-msg.bad { color: #ff8a8a; }

/* Fim de partida */
#end-reward { display: grid; gap: 8px; margin: -6px 0 16px; }
.trophy-delta { font-size: 26px; font-weight: 900; }
.trophy-delta.up { color: #7dff8a; }
.trophy-delta.down { color: #ff8a8a; }
.trophy-delta small { font-size: 14px; color: #fff; opacity: 0.75; }
.won-ball { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 14px; }
.won-ball img { width: 30px; height: 30px; image-rendering: pixelated; }
.won-ball.muted { opacity: 0.75; font-size: 13px; }
.arena-up { padding: 8px; border-radius: 10px; background: rgba(248, 208, 48, 0.15); border: 1px solid #f8d030; font-size: 14px; }

.road-body small { display: block; }

/* Miniaturas dos mapas como fundo do caminho dos troféus */
.road-step { background: linear-gradient(90deg, rgba(26, 34, 64, 0.95), rgba(26, 34, 64, 0.7)), var(--map, none) center 40% / cover, #1a2240; }
.road-step.reached { background: linear-gradient(90deg, rgba(26, 34, 64, 0.9), rgba(26, 34, 64, 0.35)), var(--map, none) center 40% / cover, #1a2240; }

/* Deck inicial no celular: 2 fileiras de 4 para os ícones não ficarem minúsculos */
@media (max-width: 560px) {
  .starter-panel { padding: 16px 12px; }
  .mini-deck { grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
  .mini-deck span { display: block; border-radius: 8px; background: rgba(0, 0, 0, 0.25); }
  .mini-deck img { display: block; width: 100%; max-width: 72px; margin: 0 auto; }
}

/* ---------- Ball abrindo (antes das recompensas) ---------- */
.reward-panel { min-height: 320px; }
/* Compra na loja: o painel entra com um pulinho e um brilho girando atrás do que você ganhou */
.reward-panel.reward-pop { animation: pop 0.3s ease-out; position: relative; overflow: hidden; }
.reward-panel.reward-pop::before {
  content: ''; position: absolute; left: 50%; top: 42%; width: 360px; height: 360px; margin: -180px 0 0 -180px; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgba(255, 230, 120, 0.09) 0 12deg, transparent 12deg 30deg);
  border-radius: 50%; animation: purchase-rays 6s linear infinite, purchase-fade 0.6s ease-out;
}
.reward-panel.reward-pop > * { position: relative; }
@keyframes purchase-rays { to { transform: rotate(360deg); } }
@keyframes purchase-fade { from { opacity: 0; transform: scale(0.4); } }
.reward-icon { display: inline-flex; animation: wobble 0.6s ease-in-out 2; }
.reward-icon img { width: 44px; height: 44px; image-rendering: pixelated; }
.reward-pop .reward-item { font-size: 18px; font-weight: 800; animation: pop 0.35s ease-out both; }
.reward-pop .reward-item img { width: 40px; height: 40px; image-rendering: pixelated; }
.reward-cosmetic { display: grid; justify-items: center; gap: 6px; animation: pop 0.35s ease-out both; }
.ball-open {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  cursor: pointer;
  user-select: none;
}
.ball-svg { width: 150px; height: 150px; overflow: visible; filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.5)); }
.ball-name { margin-top: 14px; font-family: var(--pixel, sans-serif); font-size: 22px; color: #fff; opacity: 0; }
.ball-skip { margin-top: 6px; font-size: 11px; opacity: 0.5; }
.ball-top { transform-box: view-box; transform-origin: 95px 50px; }
.ball-button { transform-box: fill-box; transform-origin: center; }
.ball-burst {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, rgba(255, 245, 180, 0.9) 35%, rgba(255, 220, 120, 0) 70%);
  opacity: 0;
  pointer-events: none;
}
.tier-great .ball-burst { background: radial-gradient(circle, #fff 0%, rgba(150, 200, 255, 0.9) 35%, rgba(80, 140, 255, 0) 70%); }
.tier-ultra .ball-burst { background: radial-gradient(circle, #fff 0%, rgba(255, 220, 90, 0.95) 35%, rgba(255, 190, 0, 0) 70%); }
.tier-master .ball-burst { background: radial-gradient(circle, #fff 0%, rgba(230, 150, 255, 0.95) 35%, rgba(180, 80, 255, 0) 70%); }

/* Sequência: cai (0–0,45 s) → balança 3x (0,5–1,6 s) → botão brilha (1,6–1,9 s) → abre e clarão (1,9–2,6 s) */
.ball-open.playing .ball-svg { animation: ball-drop 0.45s cubic-bezier(0.3, 1.6, 0.6, 1) both, ball-shake 0.36s ease-in-out 0.5s 3; transform-origin: 50% 90%; }
.ball-open.playing .ball-button { animation: ball-glow 0.3s ease-in-out 1.6s 2 alternate; }
.ball-open.playing .ball-top { animation: ball-lid 0.45s cubic-bezier(0.2, 1.4, 0.5, 1) 1.95s both; }
.ball-open.playing .ball-burst { animation: ball-burst 0.7s ease-out 1.95s both; }
.ball-open.playing .ball-name { animation: ball-name 0.4s ease-out 0.3s both; }
@keyframes ball-drop { from { transform: translateY(-160px) scale(0.6); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }
@keyframes ball-shake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-16deg); } 75% { transform: rotate(16deg); } }
@keyframes ball-glow { to { fill: #fff6b0; transform: scale(1.25); } }
@keyframes ball-lid { to { transform: translate(-2px, -12px) rotate(48deg); } } /* dobradiça à direita: o lado esquerdo sobe */
@keyframes ball-burst { 0% { opacity: 0; transform: scale(0.5); } 30% { opacity: 1; } 100% { opacity: 0; transform: scale(9); } }
@keyframes ball-name { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Grades de cartas: cada linha tem a altura da carta (sem isso, com muitas cartas as linhas
   encolhiam até zero e as cartas ficavam umas sobre as outras), e arrastar por cima rola a lista.
   As cartas da mão na partida continuam com touch-action: none para poder arrastar. */
#deck-grid, #deck-slots, #reward-cards, .deck-strip, .mini-deck { grid-auto-rows: max-content; }
#deck-grid .card, #deck-slots .card, #reward-cards .card, .deck-strip .card { touch-action: pan-y; }

/* Ficha do Pokémon (toque numa carta da Pokédex): abre por cima da coleção, com a carta grande e os atributos em blocos */
.deck-panel { position: relative; }
#deck-info.open {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 12px;
  border-radius: inherit;
  background: rgba(6, 10, 24, 0.75);
}
.card-sheet {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: 100%;
  overflow-y: auto;
  padding: 14px;
  border-radius: 18px;
  text-align: left;
  background: linear-gradient(180deg, color-mix(in srgb, var(--type) 30%, #1d2a52), #141d3b 55%);
  border: 2px solid var(--rarity);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
  animation: drop-down 0.18s ease-out;
}
.card-sheet .info-close { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; padding: 0; font-size: 14px; z-index: 1; }
.sheet-head { display: flex; gap: 14px; align-items: center; padding-right: 30px; }
.sheet-card {
  position: relative;
  flex: 0 0 auto;
  width: 96px;
  height: 128px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(160deg, color-mix(in srgb, var(--type) 85%, #fff), color-mix(in srgb, var(--type) 70%, #000));
  border: 3px solid var(--rarity);
  box-shadow: 0 4px 0 #0d1226, inset 0 -5px 0 var(--rarity);
}
.sheet-card img { position: absolute; inset: 8px 6px 14px; width: calc(100% - 12px); height: calc(100% - 22px); object-fit: contain; image-rendering: pixelated; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.4)); }
.sheet-card.not-owned img { filter: grayscale(1) brightness(0.55); }
.sheet-cost {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #e9a6ff, #a03ad6);
  border: 2px solid #fff;
  font-weight: 800;
  font-size: 14px;
  text-shadow: 0 1px 1px #000;
}
.sheet-lvl { position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 0; text-align: center; font-size: 12px; font-weight: 900; background: rgba(0, 0, 0, 0.55); }
.sheet-title { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.sheet-tag { font-size: 12px; font-weight: 700; color: var(--text-dim); }
.sheet-title h3 { margin: 0; font-size: 22px; line-height: 1.1; }
.sheet-chips { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.rarity-pill { padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; color: #10162e; background: var(--rarity); }
.sheet-atk { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-dim); }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px; }
.stat-tile { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 6px; align-items: center; padding: 6px 8px; border-radius: 10px; background: rgba(8, 12, 30, 0.55); border: 1px solid var(--line-soft); }
.stat-ico { grid-row: span 2; font-size: 20px; line-height: 1; }
.stat-ico .ico { width: 22px; height: 22px; }
.stat-tile small { font-size: 10px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-tile b { font-size: 14px; white-space: nowrap; }
.stat-tile b em { margin-left: 3px; font-style: normal; font-size: 11px; color: #7dff8a; }
.sheet-desc { margin: 10px 0 0; font-size: 13px; line-height: 1.4; color: #dfe6ff; }
.card-sheet .copies { margin-top: 10px; }
.card-sheet .info-actions { flex-direction: row; margin-top: 12px; }
.card-sheet .info-actions:empty { display: none; }
.card-sheet .info-actions button { flex: 1; padding: 12px; font-size: 15px; }

@media (max-width: 760px) {
  #deck-info:not(.open) { min-height: 0; padding: 6px 10px; }
  #deck-grid { min-height: 150px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .sheet-card { width: 84px; height: 112px; }
  .sheet-title h3 { font-size: 19px; }
}

/* Placar do desafio do Líder (melhor de 3) na tela de fim */
.gym-score { padding: 8px; border-radius: 10px; background: rgba(226, 70, 59, 0.15); border: 1px solid #e2463b; font-size: 15px; }
.road-step.gym .road-body b { color: #ffd84a; }

/* Vitória no desafio do Líder: a insígnia em destaque, com brilho girando atrás */
.badge-win { display: grid; justify-items: center; gap: 4px; }
.badge-win-art { position: relative; width: 120px; height: 120px; display: grid; place-items: center; }
.badge-win-rays {
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  background: repeating-conic-gradient(rgba(255, 216, 74, 0.35) 0 12deg, transparent 12deg 30deg);
  -webkit-mask: radial-gradient(circle, #000 30%, transparent 70%);
  mask: radial-gradient(circle, #000 30%, transparent 70%);
  animation: badge-spin 8s linear infinite;
}
.badge-win-art img {
  position: relative;
  width: 92px;
  height: 92px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(255, 216, 74, 0.8));
  animation: badge-pop 0.7s cubic-bezier(0.2, 1.6, 0.4, 1) both;
}
.badge-win-name { font-family: var(--pixel); font-size: 22px; color: #ffd84a; text-shadow: 0 2px 0 #7a5a00; }
.badge-win > small { font-size: 13px; opacity: 0.85; }
.badge-win-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 6px; }
.reward-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 12px;
}
.reward-chip img { width: 18px; height: 18px; image-rendering: pixelated; }
.reward-chip.muted { opacity: 0.7; }
@keyframes badge-spin { to { transform: rotate(360deg); } }
@keyframes badge-pop { 0% { transform: scale(0) rotate(-30deg); } 100% { transform: scale(1) rotate(0); } }

/* ---------- Mapa de Kanto (aba Mapa): caminho vertical da jornada ---------- */
.road-next {
  flex: 0 0 auto; /* o painel é uma coluna flexível: sem isso o card estica até a metade da tela */
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 8px 12px;
  text-align: left;
  border-radius: 14px;
  background: var(--panel-2, #1a2649);
  border: 2px solid var(--line, #2f4a8a);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.35);
}
.road-next img { flex: 0 0 auto; width: 40px; height: 40px; object-fit: contain; image-rendering: pixelated; }
.road-next > span { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.road-next b { font-family: var(--pixel); font-size: 15px; }
.road-next small { font-family: var(--text); font-size: 12px; opacity: 0.85; }
.road-next.challenge { color: #fff; background: linear-gradient(180deg, #e2463b, #b42318); border-color: #ffb4a8; box-shadow: 0 4px 0 #6e1209; animation: gym-pulse 1.6s ease-in-out infinite; }
.road-next.challenge img { border-radius: 50%; background: rgba(0, 0, 0, 0.25); }

.road-map { position: relative; flex: 1; overflow-y: auto; margin-top: 10px; padding: 18px 4px 24px; }
/* A linha do caminho passa pelo meio; cada etapa pinta o trecho até a de baixo */
.map-step { position: relative; display: grid; grid-template-columns: 1fr 76px 1fr; align-items: center; min-height: 84px; }
.map-step::before {
  content: '';
  position: absolute;
  left: calc(50% - 4px);
  top: 50%;
  height: 100%;
  width: 8px;
  border-radius: 4px;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0 10px, transparent 10px 18px);
}
.map-step.reached::before { background: linear-gradient(180deg, #ffd84a, #e0a800); box-shadow: 0 0 8px rgba(255, 216, 74, 0.45); }
.map-step:last-child::before { display: none; }
.map-node {
  position: relative;
  grid-column: 2;
  justify-self: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #24335f;
  border: 3px solid #4b5f99;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.45);
  z-index: 1;
}
.map-step.gym .map-node { width: 72px; height: 72px; border-color: #b38a1c; background: radial-gradient(circle, #3a2a52 55%, #241a36); }
.map-step.reached .map-node { border-color: #ffd84a; }
.map-step.locked .map-node { filter: grayscale(0.9) brightness(0.6); }
/* Rota: o retrato do Pokémon recortado redondo, preenchendo o círculo (como um avatar) */
.map-mascot { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; image-rendering: pixelated; }
.map-badge { width: 46px; height: 46px; object-fit: contain; image-rendering: pixelated; }
.map-step.gym.reached .map-badge { filter: drop-shadow(0 0 6px rgba(255, 216, 74, 0.8)); }
.map-lock { position: absolute; bottom: -6px; right: -6px; font-size: 16px; filter: none; }
.map-step.current .map-node { border-color: #fff; box-shadow: 0 0 0 4px rgba(255, 216, 74, 0.6), 0 4px 0 rgba(0, 0, 0, 0.45); }
/* "Você": o retrato do treinador pulando em cima da etapa atual */
.map-you {
  position: absolute;
  top: -26px;
  left: 50%;
  width: 34px;
  height: 34px;
  margin-left: -17px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: #2a3a6e;
  image-rendering: pixelated;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.5);
  animation: map-bounce 1.2s ease-in-out infinite;
}
.map-label { display: flex; flex-direction: column; gap: 2px; padding: 0 8px; min-width: 0; }
.map-step.right .map-label { grid-column: 3; grid-row: 1; text-align: left; align-items: flex-start; }
.map-step.left .map-label { grid-column: 1; grid-row: 1; text-align: right; align-items: flex-end; }
/* Nomes na fonte comum: na pixel, "Rota 12" parece "Rota 18" */
.map-label b { font-family: var(--text); font-weight: 800; font-size: 14px; }
.map-step.gym .map-label b { color: #ffd84a; }
.map-step.locked .map-label { opacity: 0.6; }
.map-label small { font-family: var(--text); font-size: 11px; opacity: 0.85; }
.map-types { display: flex; flex-wrap: wrap; gap: 3px; }
.map-step.left .map-types { justify-content: flex-end; }
.map-types .type-chip, .map-types span { font-size: 9px; }
@keyframes map-bounce { 50% { transform: translateY(-5px); } }

/* Painel da etapa (toque num círculo do mapa): os Pokémon que entram nas balls a partir dela */
.road-panel { position: relative; }
.map-node { cursor: pointer; }
.stage-info { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; padding: 12px; border-radius: inherit; background: rgba(6, 10, 24, 0.72); }
.stage-info.hidden { display: none; }
.stage-box { width: 100%; max-width: 420px; max-height: 100%; overflow-y: auto; padding: 14px; border-radius: 16px; background: var(--panel, #142042); border: 2px solid #ffd84a; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); animation: drop-down 0.18s ease-out; }
.stage-head { display: flex; align-items: center; gap: 10px; }
.stage-head img { width: 48px; height: 48px; object-fit: contain; image-rendering: pixelated; }
.stage-head img.round { border-radius: 50%; background: #24335f; object-fit: cover; }
.stage-head > span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.stage-head b { font-family: var(--text); font-size: 17px; font-weight: 800; }
.stage-head small { font-family: var(--text); font-size: 12px; opacity: 0.85; }
.stage-box > .sub { margin: 10px 0 8px; font-family: var(--text); }
.stage-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.stage-grid .card.not-owned img { filter: grayscale(1) brightness(0.55); }
