/**
 * MMORPG Experience - Estilos oscuros RPG
 * Complementa Tailwind CSS (CDN) con tema Norrath.
 */

/* Variables de tema (por si se quita Tailwind más adelante) */
:root {
  --rpg-dark: #050816;
  --rpg-card: #101827;
  --rpg-accent: #f59e0b;
  --rpg-accent-soft: #78350f;
  --mobile-breakpoint: 768px;
}

@keyframes raid-shake {
  0% { transform: translate(0, 0) rotate(0deg); }
  10% { transform: translate(-2px, 1px) rotate(-0.2deg); }
  20% { transform: translate(2px, -1px) rotate(0.2deg); }
  30% { transform: translate(-3px, 2px) rotate(-0.3deg); }
  40% { transform: translate(3px, -2px) rotate(0.3deg); }
  50% { transform: translate(-2px, -1px) rotate(-0.2deg); }
  60% { transform: translate(2px, 1px) rotate(0.2deg); }
  70% { transform: translate(-3px, -2px) rotate(-0.3deg); }
  80% { transform: translate(3px, 2px) rotate(0.3deg); }
  90% { transform: translate(-1px, 1px) rotate(-0.1deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}
.shake {
  animation: raid-shake 90ms linear infinite;
}

/* Touch: elimina retraso 300ms en móviles, área táctil mínima */
html, body {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
button, a, [role="button"] {
  touch-action: manipulation;
}

/* Overlay de ambiente */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.3;
  background-image: radial-gradient(circle at top, rgba(245, 158, 11, 0.07), transparent 60%);
  z-index: 0;
}

/* Scrollbar del log de crónicas */
#logBox::-webkit-scrollbar {
  width: 6px;
}
#logBox::-webkit-scrollbar-track {
  background: transparent;
}
#logBox::-webkit-scrollbar-thumb {
  background: rgba(55, 65, 81, 0.8);
  border-radius: 3px;
}
#logBox::-webkit-scrollbar-thumb:hover {
  background: rgba(75, 85, 99, 0.9);
}

/* Botón de ciudad resaltado (pantalla por defecto) */
.city-building-highlight {
  box-shadow: 0 0 24px rgba(251, 191, 36, 0.6);
  border-color: rgba(251, 191, 36, 0.9) !important;
}

/* Roster de aventureros en Guild Hall — scroll para 14 personajes */
.roster-scroll {
  scrollbar-width: thin;
  scrollbar-color: rgba(99, 102, 241, 0.8) rgba(30, 41, 59, 0.6);
}
.roster-scroll::-webkit-scrollbar {
  width: 5px;
}
.roster-scroll::-webkit-scrollbar-track {
  background: rgba(30, 41, 59, 0.6);
  border-radius: 3px;
}
.roster-scroll::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.8);
  border-radius: 3px;
}

/* Bestiario: contenedor con scroll (30+ enemigos por zona) */
.bestiary-list {
  min-height: 120px;
  max-height: 360px;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
  flex-shrink: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(217, 119, 6, 0.8) rgba(30, 41, 59, 0.6);
}
/* Scrollbar del Bestiario — delgada y dorada (EverQuest) */
.bestiary-list::-webkit-scrollbar {
  width: 4px;
}
.bestiary-list::-webkit-scrollbar-track {
  background: rgba(30, 41, 59, 0.6);
  border-radius: 2px;
}
.bestiary-list::-webkit-scrollbar-thumb {
  background: rgba(217, 119, 6, 0.8);
  border-radius: 2px;
}
.bestiary-list::-webkit-scrollbar-thumb:hover {
  background: rgba(251, 191, 36, 0.9);
}

/* Ficha de detalle del Bestiario: scroll si hay mucho loot/habilidades */
.bestiary-detail {
  max-height: 320px;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(217, 119, 6, 0.8) rgba(30, 41, 59, 0.6);
}
.bestiary-detail::-webkit-scrollbar {
  width: 4px;
}
.bestiary-detail::-webkit-scrollbar-track {
  background: rgba(30, 41, 59, 0.6);
  border-radius: 2px;
}
.bestiary-detail::-webkit-scrollbar-thumb {
  background: rgba(217, 119, 6, 0.8);
  border-radius: 2px;
}
.bestiary-detail::-webkit-scrollbar-thumb:hover {
  background: rgba(251, 191, 36, 0.9);
}

/* Tooltip flotante del Bestiario (habilidades y loot) */
.enemy-tooltip {
  position: fixed;
  z-index: 200;
  pointer-events: none;
  max-width: 320px;
}
.enemy-tooltip .enemy-tooltip-inner,
.enemy-tooltip .master-tooltip {
  background: rgba(10, 15, 28, 0.95);
  border: 1px solid rgba(59, 130, 246, 0.5);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(251, 191, 36, 0.15);
  color: #e5e7eb;
}
.enemy-tooltip .enemy-tooltip-inner {
  border-color: rgba(217, 119, 6, 0.7);
}

/* Encabezado del Bestiario fijo al hacer scroll */
.bestiary-header-sticky {
  position: sticky;
  top: 0;
  z-index: 5;
  background: linear-gradient(to bottom, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.95));
  padding-bottom: 0.5rem;
  margin-bottom: 0.25rem;
}

/* Asegurar que el contenido esté por encima del overlay */
.relative {
  position: relative;
  z-index: 1;
}

/* Transiciones suaves en botones de edificios */
button[id^="building"] {
  transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
}

/* Platino brillante: degradado metálico para moneda */ degradado metálico para moneda */
.platino-brillante {
  background: linear-gradient(to bottom, #ffffff 0%, #e5e4e2 50%, #b0c4de 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0px 0px 2px rgba(255,255,255,0.5));
}

/* Focus visible para accesibilidad */
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--rpg-accent);
  outline-offset: 2px;
}

/* Ficha de personaje Guild Hall - zona agradable y grande */
#buildingPanel.building-guild-active {
  background: rgba(5, 8, 22, 0.92);
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 0 40px rgba(129, 140, 248, 0.15);
}

/* Rarity glow: box-shadow animado en iconos/slots de ítems */
.raro,
.equip-slot.raro,
.inventory-slot.raro,
.bestiary-loot-icon.raro {
  animation: rarity-glow-raro 2.5s ease-in-out infinite;
}
.bazaar-item.raro {
  animation: none;
}
.epico,
.equip-slot.epico,
.inventory-slot.epico {
  animation: rarity-glow-epico 2.5s ease-in-out infinite;
}
.bazaar-item.epico,
.bestiary-loot-icon.epico {
  animation: none;
}
.bazaar-item-glow.fabled,
.bestiary-loot-icon.fabled {
  animation: rarity-glow-fabled 2.5s ease-in-out infinite;
}
.bazaar-item-glow.artefacto,
.bestiary-loot-icon.artefacto {
  animation: rarity-glow-artefacto 2.5s ease-in-out infinite;
}
@keyframes rarity-glow-fabled {
  0%, 100% { box-shadow: 0 0 12px rgba(239, 68, 68, 0.6), 0 0 24px rgba(220, 38, 38, 0.3); }
  50% { box-shadow: 0 0 20px rgba(239, 68, 68, 0.95), 0 0 40px rgba(220, 38, 38, 0.5); }
}
@keyframes rarity-glow-artefacto {
  0%, 100% { box-shadow: 0 0 12px rgba(251, 146, 60, 0.6), 0 0 24px rgba(234, 88, 12, 0.3); }
  50% { box-shadow: 0 0 20px rgba(251, 146, 60, 0.95), 0 0 40px rgba(234, 88, 12, 0.5); }
}
.legendario,
.equip-slot.legendario,
.inventory-slot.legendario,
.bestiary-loot-icon.legendario {
  animation: rarity-glow-legendario 2.5s ease-in-out infinite;
}
.bazaar-item.legendario {
  animation: none;
}
@keyframes rarity-glow-raro {
  0%, 100% { box-shadow: 0 0 8px rgba(14, 165, 233, 0.5), 0 0 16px rgba(14, 165, 233, 0.2); }
  50% { box-shadow: 0 0 16px rgba(14, 165, 233, 0.8), 0 0 28px rgba(14, 165, 233, 0.4); }
}
@keyframes rarity-glow-epico {
  0%, 100% { box-shadow: 0 0 10px rgba(251, 191, 36, 0.5), 0 0 20px rgba(245, 158, 11, 0.2); }
  50% { box-shadow: 0 0 20px rgba(251, 191, 36, 0.9), 0 0 36px rgba(245, 158, 11, 0.5); }
}
@keyframes rarity-glow-legendario {
  0%, 100% { box-shadow: 0 0 12px rgba(249, 115, 22, 0.5), 0 0 24px rgba(234, 88, 12, 0.2); }
  50% { box-shadow: 0 0 24px rgba(249, 115, 22, 0.9), 0 0 44px rgba(234, 88, 12, 0.5); }
}

/* Atlas zone tiers: T3 azul, T4 rojo, T5 naranja con fuego */
.atlas-zone-tier3 { box-shadow: 0 0 12px rgba(59, 130, 246, 0.4); }
.atlas-zone-tier4 { box-shadow: 0 0 12px rgba(239, 68, 68, 0.5); }
.atlas-zone-tier5 {
  animation: atlas-tier5-fire 2.5s ease-in-out infinite;
  box-shadow: 0 0 16px rgba(251, 146, 60, 0.6);
}
@keyframes atlas-tier5-fire {
  0%, 100% { box-shadow: 0 0 12px rgba(251, 146, 60, 0.5), 0 0 24px rgba(234, 88, 12, 0.2); }
  50% { box-shadow: 0 0 20px rgba(251, 146, 60, 0.9), 0 0 40px rgba(234, 88, 12, 0.5); }
}

/* Heavenly Planes - Plane of Air: aura blanca/cian con viento/rayos */
.heavenly-plane-air {
  animation: heavenly-plane-air-glow 2.5s ease-in-out infinite;
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.5);
}
@keyframes heavenly-plane-air-glow {
  0%, 100% { box-shadow: 0 0 12px rgba(255, 255, 255, 0.4), 0 0 20px rgba(34, 211, 238, 0.5); }
  50% { box-shadow: 0 0 20px rgba(255, 255, 255, 0.7), 0 0 36px rgba(34, 211, 238, 0.8); }
}

.equip-slot {
  transition: background 0.15s, border-color 0.15s;
}
.equip-slot:hover {
  background: rgba(0, 0, 0, 0.8);
  border-color: rgba(129, 140, 248, 0.4);
}

/* Tooltip mejorado para slots de equipo */
.equip-slot[title] {
  cursor: help;
}

/* Slots de equipo: mínimo 44x44px para touch (mobile friendly) */
.equip-slot-droppable {
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
}

/* Selector de Equipo: panel grande para móvil */
#equipmentSelectorModal {
  display: flex;
}
#itemDetailModal.hidden {
  display: none !important;
}
#backupExportModal.hidden,
#backupImportModal.hidden {
  display: none !important;
}
#backupImportCode {
  -webkit-user-select: text;
  user-select: text;
}

/* Chat GM - destacar sobre todo lo demás */
.chronicle-gm-line {
  background: linear-gradient(90deg, rgba(220, 38, 38, 0.25), transparent);
  border-left: 3px solid #ef4444;
  padding: 2px 0 2px 6px;
  margin: 2px 0;
}
.chronicle-gm-name {
  color: #fca5a5 !important;
  text-shadow: 0 0 8px rgba(239, 68, 68, 0.8);
}
.chronicle-gm-msg {
  color: #f87171 !important;
  font-weight: 600;
  text-shadow: 0 0 4px rgba(239, 68, 68, 0.5);
}

/* Chat SERVER - aviso global GM entrada (amarillo/púrpura) */
.chronicle-server-line {
  background: linear-gradient(90deg, rgba(168, 85, 247, 0.2), transparent);
  border-left: 3px solid #a855f7;
  padding: 2px 0 2px 6px;
  margin: 2px 0;
}
.chronicle-server-msg {
  color: #fbbf24 !important;
  text-shadow: 0 0 6px rgba(251, 191, 36, 0.6);
}

/* Habilidades de Named - destacar en Crónicas */
.chronicle-named-line {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.3), transparent);
  border-left: 3px solid #f59e0b;
  padding: 2px 0 2px 6px;
  margin: 2px 0;
}
.chronicle-named-ability {
  color: #fbbf24 !important;
  text-shadow: 0 0 8px rgba(245, 158, 11, 0.7);
}

/* Pregonero - anuncios de desbloqueo de zona (dorado/negrita) */
.chronicle-pregonero {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.2), transparent);
  border-left: 3px solid #f59e0b;
  padding: 4px 0 4px 8px;
  margin: 3px 0;
  font-weight: 600;
}
.chronicle-pregonero .text-amber-400,
.chronicle-pregonero .text-yellow-200 {
  text-shadow: 0 0 6px rgba(251, 191, 36, 0.6);
}

#itemDetailModal .item-detail-panel {
  min-height: min(400px, 70vh);
}
#itemDetailModal #itemDetailActions button {
  flex: 1;
  min-width: 100px;
}
@media (max-width: 767px) {
  #itemDetailModal .item-detail-panel {
    max-height: 85vh;
    min-height: 50vh;
  }
}
#itemToast {
  max-width: 90vw;
}

#equipmentSelectorModal.hidden {
  display: none !important;
}
.equipment-selector-panel {
  min-height: 50vh;
}
@media (max-width: 767px) {
  .equipment-selector-panel {
    max-height: 90vh;
    min-height: 60vh;
  }
}
.equipment-selector-item {
  min-height: 44px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.equipment-selector-item:hover,
.equipment-selector-item:active {
  background: rgba(99, 102, 241, 0.25);
  border-color: rgba(129, 140, 248, 0.5);
}
.equipment-selector-item.equipment-class-compatible {
  border-left: 3px solid rgba(34, 197, 94, 0.8);
}
.equipment-selector-item.equipment-class-incompatible {
  opacity: 0.7;
}

.equip-slot-unico {
  box-shadow: 0 0 12px rgba(255, 51, 51, 0.5);
}

/* Paneles redimensionables: resize + overflow */
.resizable-panel {
  position: relative;
  resize: both;
  overflow: auto;
  min-width: 240px;
  min-height: 160px;
}
.resize-handle {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 16px;
  height: 16px;
  cursor: se-resize;
  z-index: 10;
  touch-action: none;
  background: linear-gradient(135deg, transparent 50%, rgba(245,158,11,0.6) 50%);
  border-radius: 0 0 4px 0;
  opacity: 0.6;
  transition: opacity 0.15s;
}
.resize-handle:hover {
  opacity: 1;
}

/* Tooltip ítem en móvil: centrado para evitar corte lateral */
@media (max-width: 767px) {
  #masterItemTooltip {
    left: 50% !important;
    transform: translateX(-50%);
    max-width: calc(100vw - 24px);
  }
}

/* Tooltip Maestra (Bazaar, Inventario) */
.master-tooltip {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.9), 0 0 1px rgba(255, 255, 255, 0.1);
}
.master-tooltip.border-sky-500\/70 { border-color: rgba(56, 189, 248, 0.7); box-shadow: 0 0 20px rgba(56, 189, 248, 0.25); }
.master-tooltip.border-purple-500\/70 { border-color: rgba(168, 85, 247, 0.7); box-shadow: 0 0 20px rgba(168, 85, 247, 0.25); }
.master-tooltip.border-orange-500\/80 { border-color: rgba(249, 115, 22, 0.8); box-shadow: 0 0 20px rgba(249, 115, 22, 0.25); }
.master-tooltip.border-red-500\/90 { border-color: rgba(239, 68, 68, 0.9); box-shadow: 0 0 24px rgba(239, 68, 68, 0.35); }

/* Barra de control de expedición: contenedor unificado, sin superposición */
#combatControlBar {
  gap: 12px;
  position: relative;
  z-index: 100;
}
#combatControlBar button,
#combatControlBar select,
.combat-log-focus-select,
.combat-log-pause-btn {
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}
.combat-ctrl-btn {
  min-height: 40px;
  padding: 8px 16px;
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}
/* Modo Farmeo: toggle con fondo gris oscuro por defecto */
.combat-ctrl-farming {
  border-color: rgba(75, 85, 99, 0.8) !important;
  background: rgba(31, 41, 55, 0.9) !important;
}
.combat-ctrl-farming.border-emerald-500 {
  border-color: rgba(16, 185, 129, 0.9) !important;
  background: rgba(6, 95, 70, 0.8) !important;
}
/* Retirarse: estilo peligro (rojo) */
.combat-ctrl-retreat {
  border-color: rgba(185, 28, 28, 0.9) !important;
  background: rgba(69, 10, 10, 0.9) !important;
}
.combat-ctrl-retreat:hover {
  background: rgba(127, 29, 29, 0.85) !important;
}
#autoCombatBtn,
#autoCombatBtn.active {
  pointer-events: auto !important;
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}
#autoCombatBtn.active {
  opacity: 1 !important;
}
#combatControlBar,
#combatControlBar * {
  user-select: auto;
}
/* Botón Retirarse: ventana de oportunidad (glow cuando activo) */
.retreat-btn-glow {
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.7), 0 0 40px rgba(245, 158, 11, 0.4);
  animation: retreatGlowPulse 1.2s ease-in-out infinite;
}
.retreat-btn-pause-glow {
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.9), 0 0 48px rgba(245, 158, 11, 0.6), inset 0 0 12px rgba(251, 191, 36, 0.3);
  animation: retreatPauseGlow 0.8s ease-in-out infinite;
  border-color: rgba(251, 191, 36, 0.95) !important;
}
@keyframes retreatGlowPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(245, 158, 11, 0.7), 0 0 40px rgba(245, 158, 11, 0.4); }
  50% { box-shadow: 0 0 28px rgba(245, 158, 11, 0.9), 0 0 50px rgba(245, 158, 11, 0.5); }
}
@keyframes retreatPauseGlow {
  0%, 100% { box-shadow: 0 0 24px rgba(245, 158, 11, 0.9), 0 0 48px rgba(245, 158, 11, 0.6), inset 0 0 12px rgba(251, 191, 36, 0.3); }
  50% { box-shadow: 0 0 32px rgba(251, 191, 36, 1), 0 0 60px rgba(245, 158, 11, 0.8), inset 0 0 16px rgba(251, 191, 36, 0.4); }
}

/* Floaty text de daño/curación */
.combat-card-wrapper {
  position: relative;
  overflow: visible;
}
.combat-floaty {
  position: absolute;
  left: 50%;
  top: 25%;
  --floaty-offset-x: 0px;
  transform: translate(calc(-50% + var(--floaty-offset-x)), -50%);
  font-weight: 700;
  font-size: 1.1em;
  text-shadow: 0 0 4px rgba(0,0,0,0.9), 0 1px 2px rgba(0,0,0,1);
  pointer-events: none;
  z-index: 20;
  opacity: 1;
  transition: none;
}
.combat-floaty.combat-floaty-animate {
  animation: floatyRise 3.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}
.combat-floaty.combat-floaty-crit {
  color: #fef08a !important;
  font-size: 1.65em !important;
  font-weight: 900 !important;
  text-shadow: 0 0 10px rgba(254,240,138,0.9), 0 0 4px rgba(0,0,0,0.9);
}
.combat-floaty.combat-floaty-crit.combat-floaty-animate {
  animation: floatyRiseCrit 3.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}
.combat-floaty.combat-floaty-levelup {
  color: #FFD700 !important;
  font-weight: bold !important;
  font-size: 1.3em !important;
  text-shadow: 0 0 6px rgba(255,215,0,0.9), 0 0 4px rgba(0,0,0,0.9);
}
.combat-floaty.combat-floaty-levelup.combat-floaty-animate {
  animation: floatyRise 3.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}
@keyframes floatyRiseCrit {
  0% { transform: translate(calc(-50% + var(--floaty-offset-x)), -50%) scale(1.3); opacity: 1; }
  20% { transform: translate(calc(-50% + var(--floaty-offset-x)), -45px) scale(1.35); opacity: 1; }
  70% { transform: translate(calc(-50% + var(--floaty-offset-x)), -55px) scale(1.2); opacity: 0.95; }
  100% { transform: translate(calc(-50% + var(--floaty-offset-x)), -90px) scale(1.1); opacity: 0; }
}
@keyframes floatyRise {
  0% {
    transform: translate(calc(-50% + var(--floaty-offset-x)), -50%) scale(1);
    opacity: 1;
  }
  40% {
    transform: translate(calc(-50% + var(--floaty-offset-x)), -35px) scale(1.05);
    opacity: 0.98;
  }
  100% {
    transform: translate(calc(-50% + var(--floaty-offset-x)), -85px) scale(1);
    opacity: 0;
  }
}

/* Moneda dorada flotando al ganar platino en el log */
.combat-platinum-line {
  position: relative;
  min-height: 1.5em;
}
.combat-coin-floaty {
  position: absolute;
  left: 0;
  bottom: 0;
  font-size: 1.5em;
  animation: coinFloatUp 2s ease-out forwards;
  pointer-events: none;
  filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.8));
}
@keyframes coinFloatUp {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  30% { transform: translateY(-12px) scale(1.1); opacity: 1; }
  100% { transform: translateY(-40px) scale(1); opacity: 0; }
}

/* Loot floaty: desplazamiento hacia inventario */
.combat-loot-floaty-container {
  position: absolute;
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.combat-loot-floaty {
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(245, 158, 11, 0.4);
  font-size: 0.95em;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(0) translateX(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}
.combat-loot-floaty-gold { border-color: rgba(251, 191, 36, 0.6); }
.combat-loot-floaty-item { border-color: rgba(34, 197, 94, 0.5); }
.combat-loot-icon { font-size: 1.1em; }
.combat-loot-floaty-animate {
  animation: lootFloatToInventory 2.5s ease-out forwards;
}
@keyframes lootFloatToInventory {
  0% { opacity: 0; transform: translateY(0) translateX(0) scale(0.8); }
  15% { opacity: 1; transform: translateY(-8px) translateX(0) scale(1); }
  100% { opacity: 0; transform: translateY(-80px) translateX(60px) scale(0.9); }
}

/* Layout estático de combate: 6 slots en 2 columnas (3 filas) - aliados y enemigos */
/* Altura +25% para que la 4ª barra (Maná/Ira/Poder) y los iconos de buffs/debuffs sean visibles sin scroll */
.combat-slots-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 8px;
  min-height: 350px;
  height: 100%;
  width: 100%;
  padding-bottom: 8px;
}
.combat-slots-allies,
.combat-slots-enemies {
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(3, minmax(110px, 1fr));
}
.combat-slot {
  min-height: 110px;
  height: auto;
  flex-shrink: 0;
  flex-grow: 1;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
.combat-slot-miniboss,
.combat-slot-boss {
  overflow: visible !important;
  min-height: 110px;
}
.combat-slot-boss {
  min-height: 120px;
}
.combat-slot-inner {
  width: 100%;
  height: 100%;
  min-height: 110px;
  box-sizing: border-box;
  overflow: hidden;
  padding: 4px 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.combat-slot-miniboss .combat-slot-inner,
.combat-slot-boss .combat-slot-inner {
  overflow: visible !important;
}
.combat-slot[data-enemy-idx]:not(.combat-slot-empty) {
  overflow: visible;
}
.combat-slot-enemy-inner {
  overflow-x: visible;
}
.enemy-name-cell {
  min-width: 150px;
  padding-right: 8px;
}
.combat-slot-bars {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.combat-slot-empty {
  visibility: hidden;
  pointer-events: none;
  min-height: 110px;
}
.combat-slot-empty .combat-slot-inner {
  border-color: transparent !important;
  background: transparent !important;
}

/* Pet: miniatura al 50% del tamaño de un personaje normal. Solo HP + barra de ataque. */
.combat-slot-pet {
  width: 50%;
  min-width: 90px;
  max-width: 120px;
  min-height: 44px;
  flex-shrink: 0;
}
.combat-slot-pet .combat-slot-inner {
  min-height: 44px;
  padding: 2px 4px;
  border-color: rgba(245, 158, 11, 0.5) !important;
}
.combat-slot-pet .combat-slot-bars {
  gap: 2px;
}
.combat-party-row {
  display: flex;
  align-items: stretch;
  gap: 6px;
  min-height: 110px;
}
.combat-party-row .combat-slot:not(.combat-slot-pet) {
  flex: 1;
  min-width: 0;
}
.combat-party-row .combat-slot-pet {
  flex-shrink: 0;
  align-self: center;
}

/* Feedback visual: enemigo recibe daño (flash + shake) */
.combat-slot-enemy-hit .combat-slot-inner {
  animation: combat-enemy-hit 0.35s ease-out;
}
.combat-slot-shake .combat-slot-inner {
  animation: combat-enemy-hit 0.35s ease-out, combat-shake 0.35s ease-out;
}
.combat-slot-flash .combat-slot-inner {
  --magic-flash-color: #7c3aed;
  animation: combat-magic-flash 0.35s ease-out;
}
@keyframes combat-enemy-hit {
  0% { filter: brightness(1); box-shadow: 0 0 0 transparent; }
  20% { filter: brightness(1.9); box-shadow: 0 0 12px rgba(239,68,68,0.6); }
  40% { filter: brightness(1.5); box-shadow: 0 0 8px rgba(239,68,68,0.4); }
  100% { filter: brightness(1); box-shadow: 0 0 0 transparent; }
}
@keyframes combat-shake {
  0%, 100% { transform: translateX(0); }
  15% { transform: translateX(-4px); }
  30% { transform: translateX(4px); }
  45% { transform: translateX(-3px); }
  60% { transform: translateX(3px); }
  75% { transform: translateX(-1px); }
}
@keyframes combat-magic-flash {
  0% { filter: brightness(1); box-shadow: 0 0 0 transparent; }
  25% { filter: brightness(1.8); box-shadow: 0 0 14px var(--magic-flash-color); }
  50% { filter: brightness(1.5); box-shadow: 0 0 10px var(--magic-flash-color); }
  100% { filter: brightness(1); box-shadow: 0 0 0 transparent; }
}

/* Enemigo muerto: desvanecimiento suave 1.5s para que el floaty de daño sea visible */
.combat-slot-enemy-fade-out {
  animation: combat-enemy-fade-out 1.5s ease-out forwards;
}
@keyframes combat-enemy-fade-out {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

/* Modo combate inmersivo: oculta navegación, expande combate */
body.combat-ui-active .city-view-nav,
body.combat-ui-active #buildingPanel,
body.combat-ui-active .combat-ui-hide {
  display: none !important;
}
body.combat-ui-active #combatView {
  display: flex !important;
  grid-column: 1 / -1;
  min-height: calc(100vh - 180px);
  max-height: calc(100vh - 120px);
}
body.combat-ui-active #combatLogBox,
body.in-combat #combatLogBox {
  width: 100% !important;
  min-height: 400px !important;
  flex: 1;
  overflow-y: auto;
  margin-bottom: 38px !important;
}
body.in-combat #combat-log,
body.combat-ui-active #combat-log {
  width: 100% !important;
  height: 400px !important;
  display: flex !important;
  flex-direction: column !important;
  margin-bottom: 38px !important;
}
.combat-log-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  padding-bottom: 24px;
  overflow: visible;
}
#combat-log {
  margin-bottom: 38px;
  min-height: 440px;
}
.combat-log-box {
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(251,191,36,0.3);
  border-radius: 8px;
  font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace;
  padding-bottom: 20px;
  min-height: 420px;
  position: relative;
  z-index: 1;
}
/* Modo Foco: borde azul suave cuando hay un personaje seleccionado */
#combat-log.combat-log-focus-mode {
  border-color: rgba(59, 130, 246, 0.7);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.25);
}
.combat-log-pause-btn.paused {
  border-color: rgba(245, 158, 11, 0.7);
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
}
.combat-wave-separator {
  background: rgba(75, 85, 99, 0.15);
  letter-spacing: 0.05em;
}
.combat-slot-miniboss .combat-slot-inner {
  transform: scale(1.15);
  transform-origin: top center;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.6);
  border-color: rgba(59, 130, 246, 0.7) !important;
  min-height: 100px;
}
.combat-slot-boss .combat-slot-inner {
  transform: scale(1.3);
  transform-origin: top center;
  box-shadow: 0 0 16px rgba(251, 191, 36, 0.7), 0 0 8px rgba(239, 68, 68, 0.4);
  border-color: rgba(251, 191, 36, 0.8) !important;
  min-height: 115px;
}
.combat-enemy-name-miniboss {
  margin-top: -16px;
  position: relative;
  z-index: 1;
}
.combat-enemy-name-boss {
  margin-top: -20px;
  position: relative;
  z-index: 1;
  font-size: 1.2em !important;
  font-weight: bold !important;
}
.combat-enemy-hpbar-boss {
  min-width: 120%;
}
.combat-glow-miniboss { filter: drop-shadow(0 0 6px rgba(59, 130, 246, 0.8)); }
.combat-glow-boss { filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.9)) drop-shadow(0 0 4px rgba(239, 68, 68, 0.5)); }
body.in-combat #buildingPanel {
  display: none !important;
}

/* Crónicas y chat: prioridad de foco durante combate (evita overlays que bloqueen el input) */
#chroniclesSection.chronicles-section-combat,
body.in-combat #chroniclesSection,
body.combat-ui-active #chroniclesSection {
  position: relative;
  z-index: 100;
}
#cityChatInput {
  position: relative;
  z-index: 101;
}

/* Lista de usuarios online: scroll horizontal cuando hay muchos */
.online-users-list {
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}
.online-users-list::-webkit-scrollbar {
  height: 4px;
}
.online-users-list::-webkit-scrollbar-thumb {
  background: rgba(75, 85, 99, 0.6);
  border-radius: 2px;
}

/* ========== MOBILE: Layout táctico (max-width: 768px) ========== */
@media (max-width: 768px) {
  body.combat-ui-active #combatView {
    min-height: 100dvh;
    min-height: 100vh;
    max-height: none;
    padding: 8px;
    padding-top: max(8px, env(safe-area-inset-top));
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    gap: 6px;
    flex-direction: column;
  }
  /* Contenedor principal: columna (enemigos arriba 60%, grupo abajo 40%) */
  body.combat-ui-active #combatView > .grid {
    order: 1;
    flex: 1;
    min-height: 0;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px;
  }
  /* Enemigos: 60% superior, centrados, grandes, scroll horizontal si hay varios */
  body.combat-ui-active #combatView > .grid > div:last-child {
    order: 1;
    flex: 0 0 60%;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  body.combat-ui-active #combatView #combatEnemyList {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
    align-items: stretch;
    min-height: 140px;
    min-width: 100%;
    gap: 8px;
    padding-bottom: 4px;
  }
  body.combat-ui-active #combatView #combatEnemyList .combat-slot {
    flex: 0 0 auto;
    min-width: 140px;
    max-width: 180px;
    min-height: 120px;
  }
  body.combat-ui-active #combatView #combatEnemyList .combat-slot-empty {
    min-width: 80px;
  }
  /* Grupo (Party): 40% inferior, cuadrícula 3x2, barras HP horizontales grandes */
  body.combat-ui-active #combatView > .grid > div:first-child {
    order: 2;
    flex: 0 0 40%;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  body.combat-ui-active #combatView #combatPartyList {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 6px;
    min-height: 230px;
    flex: 1;
  }
  body.combat-ui-active #combatView #combatPartyList .combat-slot {
    min-height: 110px;
  }
  body.combat-ui-active #combatView #combatPartyList .combat-slot-bars {
    flex-direction: column;
    gap: 2px;
  }
  body.combat-ui-active #combatView #combatPartyList .combat-slot [style*="height"] {
    min-height: 10px !important;
    height: 12px !important;
  }
  /* Log: colapsable, 3 líneas visibles o colapsado */
  #combat-log {
    order: 2;
    min-height: 36px;
    max-height: 80px;
    position: relative;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 8px;
    flex-shrink: 0;
    overflow: visible;
  }
  #combat-log #combatLogBox {
    min-height: 0;
    max-height: 4.5em;
    overflow-y: auto;
    padding: 8px 12px;
    font-size: 11px;
    line-height: 1.4;
  }
  #combat-log.collapsed {
    min-height: 36px;
    max-height: 36px;
  }
  #combat-log.collapsed #combatLogBox {
    display: none !important;
  }
  .combat-slots-allies .combat-slot,
  .combat-slots-enemies .combat-slot {
    min-height: 110px;
  }
  .combat-slot-inner {
    min-height: 110px;
    padding: 4px 6px;
  }
  #autoCombatBtn,
  #farmingModeBtn {
    min-height: 44px;
    min-width: 44px;
    padding: 10px 14px;
    font-size: 13px;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
  }
  .atlas-phase-select {
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
  }
  #combatControlBar,
  #autoCombatBtn,
  #atlasBestiaryContainer {
    position: relative;
    z-index: 999999 !important;
  }
  .atlas-map-container,
  #atlasBestiaryContainer,
  #buildingPanel .atlas-map-container,
  #buildingContent .atlas-map-container {
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box;
  }
  #atlasBestiaryContainer .bestiary-list,
  #atlasBestiaryContainer .bestiary-detail {
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box;
  }
}

/* Botones Taberna: área táctil 44px */
.tavern-hire-btn {
  min-width: 44px;
  min-height: 44px;
  padding: 10px 14px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Proyectiles VFX */
#combatView {
  position: relative;
}
.combat-vfx-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 15;
  overflow: hidden;
}
/* Muerte: mismo frame que floaty final */
.combat-card-wrapper.combat-dead {
  animation: combatDeathPulse 0.3s ease-out forwards;
}
@keyframes combatDeathPulse {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(0.98); }
  100% { opacity: 0.6; transform: scale(1); }
}

.combat-projectile {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  margin-left: -8px;
  margin-top: -8px;
  box-shadow: 0 0 12px currentColor;
  animation: projectileFly 0.4s ease-out forwards;
}
@keyframes projectileFly {
  0% {
    transform: translate(0, 0);
    opacity: 1;
  }
  100% {
    transform: translate(var(--to-x, 0), var(--to-y, 0));
    opacity: 0.3;
  }
}

/* Lay on Hands - partículas doradas */
.combat-loh-particle {
  position: absolute;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  margin-top: -6px;
  border-radius: 50%;
  pointer-events: none;
  animation: lohParticleFly 0.5s ease-out forwards;
}
@keyframes lohParticleFly {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(var(--to-x, 0), var(--to-y, 0)) scale(0.3);
    opacity: 0;
  }
}

/* VFX universal */
.combat-vfx {
  position: absolute;
  margin-left: -8px;
  margin-top: -8px;
  pointer-events: none;
}
.combat-vfx-melee {
  width: 24px;
  height: 4px;
  background: linear-gradient(90deg, #eab308 0%, #fef08a 50%, transparent 100%);
  border-radius: 2px;
  box-shadow: 0 0 8px #eab308;
  animation: vfxMeleeSlash 0.18s ease-out forwards;
}
/* Espada / Corte (Guerrero, Paladín, Monje) */
.combat-vfx-sword {
  width: 28px;
  height: 5px;
  background: linear-gradient(90deg, #eab308 0%, #fef08a 40%, #ca8a04 80%, transparent 100%);
  border-radius: 1px;
  box-shadow: 0 0 10px #eab308, 0 0 4px #fef08a;
  animation: vfxSwordSlash 0.18s ease-out forwards;
}
@keyframes vfxSwordSlash {
  0% { transform: translate(0, 0) scaleX(0.2); opacity: 1; }
  100% { transform: translate(var(--to-x, 0), var(--to-y, 0)) scaleX(1); opacity: 0.85; }
}
/* Daga (Rogue / Pícaro) */
.combat-vfx-dagger {
  width: 16px;
  height: 3px;
  background: linear-gradient(90deg, #64748b 0%, #94a3b8 60%, transparent 100%);
  border-radius: 1px;
  box-shadow: 0 0 6px #475569;
  animation: vfxDaggerStab 0.14s ease-out forwards;
}
@keyframes vfxDaggerStab {
  0% { transform: translate(0, 0) scaleX(0.5); opacity: 1; }
  100% { transform: translate(var(--to-x, 0), var(--to-y, 0)) scaleX(1); opacity: 0.9; }
}
/* Colmillos / Dientes (animales: Lobo, Cocodrilo, etc.) */
.combat-vfx-fangs {
  width: 22px;
  height: 12px;
  background: linear-gradient(180deg, #94a3b8 0%, #64748b 50%, #475569 100%);
  clip-path: polygon(0 100%, 25% 0, 50% 60%, 75% 0, 100% 100%);
  box-shadow: 0 0 8px #64748b, inset 0 1px 0 rgba(255,255,255,0.3);
  animation: vfxFangsBite 0.16s ease-out forwards;
}
@keyframes vfxFangsBite {
  0% { transform: translate(0, 0) scale(0.6); opacity: 1; }
  100% { transform: translate(var(--to-x, 0), var(--to-y, 0)) scale(1); opacity: 0.85; }
}
.combat-vfx-monk {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  box-shadow: 0 0 12px #fbbf24, 0 0 24px #f59e0b;
  animation: vfxMonkBurst 0.15s ease-out forwards;
}
@keyframes vfxMonkBurst {
  0% {
    transform: translate(0, 0) scale(0.5);
    opacity: 1;
  }
  50% {
    transform: translate(calc(var(--to-x, 0) * 0.5), calc(var(--to-y, 0) * 0.5)) scale(1.2);
    opacity: 0.9;
  }
  100% {
    transform: translate(var(--to-x, 0), var(--to-y, 0)) scale(0.8);
    opacity: 0.6;
  }
}
.combat-bard-note {
  position: absolute;
  font-size: 1.2em;
  font-weight: bold;
  pointer-events: none;
  z-index: 18;
  animation: bardNoteFloat 1.8s ease-out forwards;
  text-shadow: 0 0 8px currentColor;
}
@keyframes bardNoteFloat {
  0% {
    transform: translateY(0) scale(0.8);
    opacity: 0.6;
  }
  30% {
    transform: translateY(-15px) scale(1.1);
    opacity: 1;
  }
  100% {
    transform: translateY(-50px) scale(0.9);
    opacity: 0;
  }
}
@keyframes vfxMeleeSlash {
  0% {
    transform: translate(0, 0) scaleX(0.3);
    opacity: 1;
  }
  100% {
    transform: translate(var(--to-x, 0), var(--to-y, 0)) scaleX(1);
    opacity: 0.8;
  }
}
.combat-vfx-arrow {
  width: 20px;
  height: 4px;
  background: linear-gradient(90deg, #94a3b8 0%, #cbd5e1 100%);
  clip-path: polygon(0 30%, 100% 0, 100% 100%, 0 70%);
  box-shadow: 0 0 6px #64748b;
  animation: vfxProjectileFly 0.35s ease-out forwards;
}
.combat-vfx-projectile {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  box-shadow: 0 0 12px currentColor;
  animation: vfxProjectileFly 0.4s ease-out forwards;
}
@keyframes vfxProjectileFly {
  0% {
    transform: translate(0, 0);
    opacity: 1;
  }
  100% {
    transform: translate(var(--to-x, 0), var(--to-y, 0));
    opacity: 0.3;
  }
}

/* Resaltado de atributos prioritarios por clase (creación de personaje) */
.attr-row-priority {
  border: 2px solid rgba(245, 158, 11, 0.9) !important;
  border-radius: 0.5rem;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.4), inset 0 0 12px rgba(245, 158, 11, 0.08);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(180, 83, 9, 0.06) 100%) !important;
}

/* Panel informativo del Atlas - pergamino/piedra oscura con bordes decorados */
.atlas-zone-panel {
  background: linear-gradient(145deg, #1c1917 0%, #292524 30%, #1c1917 100%) !important;
  background-image:
    linear-gradient(rgba(120, 53, 15, 0.15) 0%, transparent 50%),
    linear-gradient(145deg, #1c1917 0%, #292524 30%, #1c1917 100%) !important;
  box-shadow:
    inset 0 0 60px rgba(0, 0, 0, 0.5),
    inset 0 0 0 1px rgba(180, 83, 9, 0.3),
    0 0 30px rgba(120, 53, 15, 0.4);
  position: relative;
}
.atlas-zone-panel::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: 0.6rem;
  pointer-events: none;
}
.atlas-zone-panel h2 {
  font-family: "Cinzel", "Times New Roman", serif;
  letter-spacing: 0.08em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* Selector de fase inicial: muchas opciones (hasta 10) con scroll nativo del navegador */
.atlas-phase-select {
  min-height: 2.5rem;
  max-height: 3rem;
  -webkit-appearance: menulist-button;
  appearance: menulist-button;
}
.atlas-phase-select option {
  padding: 0.25rem 0.5rem;
}

/* Atlas interactivo - mapa de Antonica */
.atlas-map-container {
  aspect-ratio: 16 / 10;
  min-height: 280px;
  max-height: 70vh;
  padding: 6%;
  box-sizing: border-box;
}
.atlas-map-bg {
  min-height: 100%;
  background-image: url('./assets/images/mapa_antonica.jpg') !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  z-index: 0;
}
.atlas-map-overlay {
  background: transparent !important;
}
.atlas-map-points {
  position: absolute;
  inset: 0;
  z-index: 10;
}
.atlas-map-point-wrapper {
  z-index: 20;
}
.atlas-map-point {
  cursor: pointer;
  position: relative;
  z-index: 20;
}
@media (max-width: 768px) {
  /* Atlas: prioridad de clics en móvil (evita ventanas superpuestas bloqueando iconos) */
  #buildingPanel {
    position: relative;
    z-index: 500;
  }
  .atlas-map-container {
    position: relative;
    z-index: 1;
    min-height: 240px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: manipulation;
  }
  .atlas-map-point {
    min-width: 48px;
    min-height: 48px;
    font-size: 10px;
    touch-action: manipulation;
  }
  /* Crónicas y chat: z-index más bajo en móvil para no tapar el Atlas */
  body:not(.in-combat):not(.combat-ui-active) #chroniclesSection {
    z-index: 50;
  }
}

/* Atlas Tier 2 - iconos desbloqueados */
.atlas-tier2-wrapper {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.5);
  animation: atlas-tier2-fade-in 0.6s ease-out forwards;
}
.atlas-tier2-visible {
  opacity: 1;
}
.atlas-tier2-point {
  border-color: rgba(205, 127, 50, 0.9) !important;
  box-shadow: 0 0 12px rgba(205, 127, 50, 0.4);
}
.atlas-tier2-point:hover {
  border-color: rgba(210, 180, 140, 0.95) !important;
  box-shadow: 0 0 18px rgba(205, 127, 50, 0.6);
}
@keyframes atlas-tier2-fade-in {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}
.atlas-map-connectors {
  z-index: 1;
}
.atlas-tier2-connector {
  stroke: rgba(205, 127, 50, 0.5);
  stroke-width: 1;
  stroke-dasharray: 4 3;
  fill: none;
}
.atlas-tier3-connector {
  stroke: rgba(59, 130, 246, 0.5);
  stroke-width: 1;
  stroke-dasharray: 4 3;
  fill: none;
}
.atlas-tier4-connector {
  stroke: rgba(239, 68, 68, 0.5);
  stroke-width: 1;
  stroke-dasharray: 4 3;
  fill: none;
}
.atlas-tier5-connector {
  stroke: rgba(249, 115, 22, 0.6);
  stroke-width: 1;
  stroke-dasharray: 4 3;
  fill: none;
}
.atlas-tier3-visible,
.atlas-tier4-visible,
.atlas-tier5-visible {
  opacity: 1;
  animation: atlas-tier2-fade-in 0.6s ease-out forwards;
}
