html,
body {
  overflow-x: hidden !important;
  max-width: 100%;
}

html:has(body.page-route-war-core-game-map),
body.page-route-war-core-game-map {
  overflow-y: hidden !important;
  height: 100%;
}

body.page-route-war-core-game-map.modal-open {
  overflow: hidden !important;
}

form .form-control,
form .form-select {
  background: radial-gradient(circle at top left, var(--wm-color-form-bg-start), var(--wm-color-form-bg-end));
  border: 1px solid var(--wm-color-form-border);
  box-shadow: 0 0 6px var(--wm-overlay-success-30);
  color: var(--wm-color-success);
  font-size: 1.05rem;
}
form .form-control:focus,
form .form-select:focus {
  background-color: var(--wm-color-form-text-focus);
  border-color: var(--wm-color-form-border-focus);
  box-shadow: 0 0 8px var(--wm-overlay-success-50);
  color: var(--wm-color-success);
}
form .btn {
  background: radial-gradient(circle at top left, var(--wm-color-form-bg-start), var(--wm-color-form-bg-end));
  border: 1px solid var(--wm-color-form-border);
  font-weight: bold;
  transition: box-shadow 0.3s ease-in-out, background 0.3s ease-in-out;
}
form .btn:hover {
  color: var(--wm-color-form-text-hover);
  box-shadow: 0 0 5px var(--wm-overlay-success-50), 0 0 10px var(--wm-overlay-success-30);
  border: 1px solid var(--wm-color-form-border-hover);
  background: radial-gradient(circle at top left, var(--wm-color-form-bg-hover-start), var(--wm-color-form-bg-hover-end));
}

/* Apply blur only to the fog pane canvas. */
#warmap-pane-fog {
  background-image: radial-gradient(var(--wm-overlay-white-05) 1px, transparent 0);
  background-size: 10px 10px;
  animation: fog-pulse 4s ease-in-out infinite;
  will-change: opacity;
  /* GPU acceleration */
}

#warmap-pane-fog canvas,
canvas.warmap-fog-canvas {
  filter: blur(12px);
  opacity: 0.7;
  mix-blend-mode: multiply;
}

/* Ensure other overlay canvases are not affected by fog styling. */
.leaflet-overlay-pane canvas {
  filter: none;
  opacity: 1;
  mix-blend-mode: normal;
}

/* Movement routes should stay crisp and readable above fog. */
#warmap-pane-routes path.warmap-route-path {
  stroke: var(--wm-color-route-stroke);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-opacity: 0.8;
  filter: drop-shadow(0 0 2px var(--wm-color-route-shadow));
  pointer-events: none;
}

/* Ensures geohash tooltips are not blurred */
.fow-geohash-tooltip {
  filter: none !important;
}

@keyframes fog-pulse {
  0%, 100% {
    opacity: 0.7;
  }
  50% {
    opacity: 1;
  }
}
.custom-npc-icon {
  background: transparent;
  border: 0;
}

.wm-npc-marker {
  position: relative;
  font-size: 1rem;
  height: 32px;
  width: 32px;
  transform: translate3d(0, 0, 0);
  transform-origin: 50% 85%;
  will-change: transform, opacity;
}

.wm-npc-sprite {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: grid;
  font-size: 1.5rem;
  place-items: center;
  transform: translate3d(0, 0, 0);
  will-change: transform, opacity;
}
.wm-npc-sprite i,
.wm-npc-sprite img {
  width: 22px;
  height: 22px;
  display: block;
  color: var(--marker-icon-color, var(--wm-color-text-primary));
  filter: drop-shadow(0 0 4px var(--wm-color-bg));
}

.wm-npc-ring {
  position: absolute;
  inset: 5px;
  border-radius: 999px;
  border: 1px solid var(--wm-color-border-dark-100);
  opacity: 0.35;
  transform: scale(1.02);
  will-change: transform, opacity;
  pointer-events: none;
}

.wm-npc-label {
  position: absolute;
  top: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  pointer-events: none;
}

.wm-npc-marker.wm-npc-animate .wm-npc-ring {
  animation: wm-idle-pulse var(--wm-npc-ring-duration, 2400ms) ease-in-out infinite;
  animation-delay: var(--wm-npc-delay, 0ms);
}

.wm-npc-marker.wm-npc-animate.wm-idle-pulse .wm-npc-sprite {
  animation: wm-idle-sprite-pulse var(--wm-npc-sprite-duration, 2800ms) ease-in-out infinite;
  animation-delay: var(--wm-npc-delay, 0ms);
}

.wm-npc-marker.wm-npc-animate.wm-idle-rotate .wm-npc-sprite {
  animation: wm-idle-rotate var(--wm-npc-sprite-duration, 3200ms) linear infinite;
  animation-delay: var(--wm-npc-delay, 0ms);
}

.wm-npc-marker.wm-npc-animate.wm-idle-bob .wm-npc-sprite {
  animation: wm-idle-bob var(--wm-npc-sprite-duration, 2600ms) ease-in-out infinite;
  animation-delay: var(--wm-npc-delay, 0ms);
}

.wm-npc-marker.wm-alert-ping::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 999px;
  border: 1px solid var(--wm-color-danger);
  opacity: 0;
  transform: scale(0.9);
  animation: wm-alert-ping 1200ms ease-out infinite;
  animation-delay: var(--wm-npc-delay, 0ms);
  pointer-events: none;
}

.wm-npc-marker.wm-npc-jitter {
  animation: wm-npc-jitter 300ms ease-out;
}

.wm-npc-ghost-trail {
  stroke: var(--wm-color-accent-primary) !important;
  stroke-opacity: 0.6 !important;
  filter: drop-shadow(0 0 2px var(--wm-overlay-accent-40));
}

@keyframes wm-idle-pulse {
  0% {
    transform: scale(0.97);
    opacity: 0.35;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.7;
  }
  100% {
    transform: scale(0.97);
    opacity: 0.35;
  }
}
@keyframes wm-idle-sprite-pulse {
  0% {
    transform: scale(0.975);
    opacity: 0.96;
  }
  50% {
    transform: scale(1.03);
    opacity: 1;
  }
  100% {
    transform: scale(0.975);
    opacity: 0.96;
  }
}
@keyframes wm-idle-rotate {
  0% {
    transform: rotate(0deg) translate3d(0, 0, 0);
  }
  100% {
    transform: rotate(360deg) translate3d(0, 0, 0);
  }
}
@keyframes wm-idle-bob {
  0% {
    transform: translate3d(0, 0, 0);
    opacity: 0.95;
  }
  50% {
    transform: translate3d(0, -2px, 0);
    opacity: 1;
  }
  100% {
    transform: translate3d(0, 0, 0);
    opacity: 0.95;
  }
}
@keyframes wm-alert-ping {
  0% {
    opacity: 0.7;
    transform: scale(0.85);
  }
  100% {
    opacity: 0;
    transform: scale(1.5);
  }
}
@keyframes wm-npc-jitter {
  0% {
    transform: translate3d(0, 0, 0);
  }
  30% {
    transform: translate3d(var(--wm-npc-jitter-x, 2px), var(--wm-npc-jitter-y, -1px), 0);
  }
  65% {
    transform: translate3d(calc(var(--wm-npc-jitter-x, 2px) * -1), calc(var(--wm-npc-jitter-y, -1px) * -1), 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .wm-npc-marker,
  .wm-npc-sprite,
  .wm-npc-ring,
  .wm-npc-marker::after {
    animation: none !important;
    transition: none !important;
  }
}
/**
 * NPC Visual Resolver Styling
 *
 * This file provides SCSS styling for NPC marker visual differentiation.
 * It complements the animation framework in _npc-marker-idle.scss with
 * semantic classes for shape, size, rarity, faction, and relationship.
 *
 * Design principles:
 * - Use independent CSS classes for each dimension (shape, size, rarity, etc.)
 * - Maintain small file size and performance for crowded maps
 * - Prefer CSS variables for theming and dark-mode support
 * - Avoid excessive gradients and expensive effects
 * - Use subtle glows instead of neon overload
 */
.wm-npc-sprite i,
.wm-npc-sprite .fa-solid {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1em;
  min-height: 1em;
}

.wm-npc-marker {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  isolation: isolate;
  transform: translate3d(0, 0, 0);
  transform-origin: 50% 85%;
  will-change: transform, opacity;
  /* ensure pointer events are handled by the inner marker content
     so the Leaflet container (.leaflet-marker-icon) can shrink to
     the visual marker size and not keep a larger clickable box */
  pointer-events: auto;
}

/* Make the Leaflet marker container size follow the inner marker
   visuals instead of enforcing a large fixed box. The container
   itself should not capture pointer events; the inner `.wm-npc-marker`
   will handle interactions. */
.leaflet-marker-icon.custom-npc-icon {
  width: auto !important;
  height: auto !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  pointer-events: none !important;
}

/* Re-enable pointer events on the visible marker so clicks still work */
.leaflet-marker-icon.custom-npc-icon > .wm-npc-marker {
  pointer-events: auto;
}

.wm-npc-halo {
  position: absolute;
  inset: -18%;
  z-index: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(45, 238, 220, 0.26) 0%, rgba(45, 238, 220, 0.08) 40%, transparent 74%);
  filter: blur(4px);
  opacity: 0.55;
  pointer-events: none;
}

.wm-npc-core,
.wm-npc-sprite {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  transform: translate3d(0, 0, 0);
  will-change: transform, opacity;
}

.wm-npc-shape {
  position: absolute;
  inset: 3px;
  z-index: 1;
  border: 1px solid rgba(95, 255, 240, 0.26);
  background: linear-gradient(180deg, rgba(7, 18, 22, 0.9), rgba(11, 28, 34, 0.76));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  opacity: 0.98;
  pointer-events: none;
}

.wm-npc-icon {
  position: relative;
  z-index: 3;
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: var(--marker-icon-color, var(--wm-color-text-primary));
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.65);
}
.wm-npc-icon i,
.wm-npc-icon img {
  display: block;
  width: 100%;
  height: 100%;
  color: inherit;
  filter: drop-shadow(0 0 4px rgba(4, 18, 22, 0.9));
}

.wm-npc-level {
  position: absolute;
  right: -6px;
  bottom: -7px;
  z-index: 4;
  min-width: 1.7rem;
  padding: 0.12rem 0.4rem;
  border: 1px solid rgba(95, 255, 240, 0.4);
  border-radius: 999px;
  background: rgba(6, 18, 24, 0.9);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35), 0 0 10px rgba(34, 211, 238, 0.2);
  color: var(--wm-color-text-primary);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.03em;
}

.wm-npc-rarity-ring {
  position: absolute;
  inset: 5px;
  z-index: 1;
  border: 1px solid rgba(100, 255, 240, 0.28);
  border-radius: 999px;
  opacity: 0.34;
  transform: scale(1.02);
  will-change: transform, opacity;
  pointer-events: none;
}

.wm-npc-shape-sphere {
  border-radius: 50%;
}
.wm-npc-shape-sphere .wm-npc-ring {
  border-radius: 50%;
}

.wm-npc-shape-circle {
  border-radius: 50%;
}
.wm-npc-shape-circle .wm-npc-ring {
  border-radius: 50%;
}

.wm-npc-shape-triangle {
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
}
.wm-npc-shape-triangle .wm-npc-ring {
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
}

.wm-npc-shape-diamond {
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}
.wm-npc-shape-diamond .wm-npc-ring {
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.wm-npc-shape-square {
  border-radius: 4px;
}
.wm-npc-shape-square .wm-npc-ring {
  border-radius: 4px;
}

.wm-npc-shape-hexagon {
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}
.wm-npc-shape-hexagon .wm-npc-ring {
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.wm-npc-shape-cross {
  clip-path: polygon(45% 0%, 55% 0%, 55% 45%, 100% 45%, 100% 55%, 55% 55%, 55% 100%, 45% 100%, 45% 55%, 0% 55%, 0% 45%, 45% 45%);
}
.wm-npc-shape-cross .wm-npc-ring {
  clip-path: polygon(45% 0%, 55% 0%, 55% 45%, 100% 45%, 100% 55%, 55% 55%, 55% 100%, 45% 100%, 45% 55%, 0% 55%, 0% 45%, 45% 45%);
}

.wm-npc-shape-star {
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.wm-npc-shape-star .wm-npc-ring {
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.wm-npc-size-xs {
  height: 38px;
  width: 38px;
}
.wm-npc-size-xs .wm-npc-sprite,
.wm-npc-size-xs .wm-npc-icon {
  font-size: 0.9rem;
}
.wm-npc-size-xs .wm-npc-sprite i,
.wm-npc-size-xs .wm-npc-sprite img,
.wm-npc-size-xs .wm-npc-icon i,
.wm-npc-size-xs .wm-npc-icon img {
  width: 24px;
  height: 24px;
}

.wm-npc-size-sm {
  height: 42px;
  width: 42px;
}
.wm-npc-size-sm .wm-npc-sprite,
.wm-npc-size-sm .wm-npc-icon {
  font-size: 1.2rem;
}
.wm-npc-size-sm .wm-npc-sprite i,
.wm-npc-size-sm .wm-npc-sprite img,
.wm-npc-size-sm .wm-npc-icon i,
.wm-npc-size-sm .wm-npc-icon img {
  width: 28px;
  height: 28px;
}

.wm-npc-size-md {
  height: 48px;
  width: 48px;
}
.wm-npc-size-md .wm-npc-sprite,
.wm-npc-size-md .wm-npc-icon {
  font-size: 1.5rem;
}
.wm-npc-size-md .wm-npc-sprite i,
.wm-npc-size-md .wm-npc-sprite img,
.wm-npc-size-md .wm-npc-icon i,
.wm-npc-size-md .wm-npc-icon img {
  width: 38px;
  height: 38px;
}

.wm-npc-size-lg {
  height: 52px;
  width: 52px;
}
.wm-npc-size-lg .wm-npc-sprite,
.wm-npc-size-lg .wm-npc-icon {
  font-size: 1.8rem;
}
.wm-npc-size-lg .wm-npc-sprite i,
.wm-npc-size-lg .wm-npc-sprite img,
.wm-npc-size-lg .wm-npc-icon i,
.wm-npc-size-lg .wm-npc-icon img {
  width: 42px;
  height: 42px;
}

.wm-npc-size-xl {
  height: 64px;
  width: 64px;
}
.wm-npc-size-xl .wm-npc-sprite,
.wm-npc-size-xl .wm-npc-icon {
  font-size: 2.1rem;
}
.wm-npc-size-xl .wm-npc-sprite i,
.wm-npc-size-xl .wm-npc-sprite img,
.wm-npc-size-xl .wm-npc-icon i,
.wm-npc-size-xl .wm-npc-icon img {
  width: 52px;
  height: 52px;
}

.wm-npc-rarity-common {
  --marker-glow-color: var(--wm-color-text-secondary, #808080);
  --marker-glow-intensity: 0;
}

.wm-npc-rarity-uncommon {
  --marker-glow-color: #4caf50;
  --marker-glow-intensity: 4px;
}
.wm-npc-rarity-uncommon .wm-npc-ring {
  border-color: #4caf50;
  opacity: 0.5;
}

.wm-npc-rarity-rare {
  --marker-glow-color: #2196f3;
  --marker-glow-intensity: 6px;
}
.wm-npc-rarity-rare .wm-npc-sprite {
  filter: drop-shadow(0 0 var(--marker-glow-intensity) var(--marker-glow-color));
}
.wm-npc-rarity-rare .wm-npc-ring {
  border-color: #2196f3;
  opacity: 0.82;
  border-width: 1.5px;
}

.wm-npc-rarity-epic {
  --marker-glow-color: #9c27b0;
  --marker-glow-intensity: 8px;
}
.wm-npc-rarity-epic .wm-npc-sprite {
  filter: drop-shadow(0 0 var(--marker-glow-intensity) var(--marker-glow-color));
}
.wm-npc-rarity-epic .wm-npc-ring {
  border-color: #9c27b0;
  opacity: 0.84;
  border-width: 2.5px;
}

.wm-npc-rarity-legendary {
  --marker-glow-color: #ffc107;
  --marker-glow-intensity: 10px;
}
.wm-npc-rarity-legendary .wm-npc-sprite {
  filter: drop-shadow(0 0 var(--marker-glow-intensity) var(--marker-glow-color));
}
.wm-npc-rarity-legendary .wm-npc-ring {
  border-color: #ffc107;
  opacity: 0.9;
  border-width: 3px;
}

.wm-npc-faction-neutral {
  --marker-icon-color: var(--wm-color-text-secondary, #999);
}

.wm-npc-faction-allied {
  --marker-icon-color: #4caf50;
}

.wm-npc-faction-hostile {
  --marker-icon-color: #f44336;
}

.wm-npc-relation-hostile .wm-npc-ring {
  border-color: var(--wm-color-danger, #f44336);
  opacity: 0.75;
}
.wm-npc-relation-hostile.wm-npc-animate::after {
  animation: wm-hostile-pulse 1s ease-out infinite;
}

.wm-npc-relation-neutral .wm-npc-ring {
  border-color: var(--wm-color-text-secondary, #999);
  opacity: 0.5;
}

.wm-npc-relation-friendly .wm-npc-ring {
  border-color: var(--wm-color-success, #4caf50);
  opacity: 0.6;
}

.wm-npc-relation-unknown .wm-npc-ring {
  border-color: var(--wm-color-text-secondary, #999);
  opacity: 0.35;
}

.wm-npc-marker.wm-npc-animate .wm-npc-ring {
  animation: wm-idle-pulse var(--wm-npc-ring-duration, 2400ms) ease-in-out infinite;
  animation-delay: var(--wm-npc-delay, 0ms);
}
.wm-npc-marker.wm-npc-animate.wm-idle-pulse .wm-npc-sprite {
  animation: wm-idle-sprite-pulse var(--wm-npc-sprite-duration, 2800ms) ease-in-out infinite;
  animation-delay: var(--wm-npc-delay, 0ms);
}
.wm-npc-marker.wm-npc-animate.wm-idle-rotate .wm-npc-sprite {
  animation: wm-idle-rotate var(--wm-npc-sprite-duration, 3200ms) linear infinite;
  animation-delay: var(--wm-npc-delay, 0ms);
}
.wm-npc-marker.wm-npc-animate.wm-idle-bob .wm-npc-sprite {
  animation: wm-idle-bob var(--wm-npc-sprite-duration, 2600ms) ease-in-out infinite;
  animation-delay: var(--wm-npc-delay, 0ms);
}

@keyframes wm-hostile-pulse {
  0% {
    opacity: 0.75;
    transform: scale(1);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.05);
  }
  100% {
    opacity: 0.75;
    transform: scale(1);
  }
}
.leaflet-cluster-marker-npc .leaflet-cluster-status {
  visibility: visible;
}

@media (prefers-color-scheme: dark) {
  .wm-npc-ring {
    border-color: var(--wm-color-border-light-20, rgba(255, 255, 255, 0.2));
  }
  .wm-npc-marker .wm-npc-sprite i,
  .wm-npc-marker .wm-npc-sprite img {
    filter: drop-shadow(0 0 4px var(--wm-color-bg-dark, #1a1a1a));
  }
}
@media (prefers-reduced-motion: reduce) {
  .wm-npc-marker,
  .wm-npc-sprite,
  .wm-npc-ring {
    animation: none !important;
    transition: none !important;
  }
}
* {
  scrollbar-color: var(--wm-overlay-accent-30) var(--wm-color-surface-dark-900);
}
*::-webkit-scrollbar {
  height: 3px;
  width: 3px;
}
*::-webkit-scrollbar-thumb {
  background: var(--wm-overlay-accent-35);
  border-radius: 4px;
  -webkit-box-shadow: inset 1px 1px 0 var(--wm-overlay-black-10), inset 0 -1px 0 var(--wm-overlay-black-10);
}

.hidden {
  display: none !important;
}

:root {
  --wm-admin-offset-top: 0px;
}

#game-map-wrapper {
  background-color: transparent;
  position: relative;
  width: 100%;
  min-width: 100%;
  top: var(--wm-admin-offset-top, 0px);
  min-height: calc(100vh - var(--wm-admin-offset-top, 0px));
  min-height: calc(100dvh - var(--wm-admin-offset-top, 0px));
  height: calc(100vh - var(--wm-admin-offset-top, 0px));
  height: calc(100dvh - var(--wm-admin-offset-top, 0px));
  overflow: hidden;
}
#game-map-wrapper .wm-tactical-overlay {
  position: absolute;
  top: 72px;
  right: 0;
  bottom: 0;
  z-index: 600;
  pointer-events: none;
}
#game-map-wrapper .wm-tactical-overlay__panel {
  pointer-events: auto;
  width: 320px;
  max-width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

#wm-map-panel-root {
  --wm-z-map-panel: 1040;
  position: fixed;
  inset: var(--wm-admin-offset-top, 0px) 0 0 0;
  z-index: var(--wm-z-map-panel);
  pointer-events: none;
}

#wm-map-panel {
  --wm-popup-surface-opacity: 0.9;
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: min(460px, 100vw - 24px);
  max-height: min(78vh, 100vh - 84px);
  isolation: isolate;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--wm-color-popup-border, var(--wm-color-border-subtle));
  border-radius: var(--wm-radius-lg, 0.8rem);
  background: transparent;
  box-shadow: var(--wm-shadow-xl);
  overflow: hidden;
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: auto;
}
#wm-map-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, var(--wm-color-surface-dark-700) 0%, var(--wm-color-popup-bg, var(--wm-color-surface-dark-900)) 100%);
  opacity: var(--wm-popup-surface-opacity);
  z-index: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}
#wm-map-panel > * {
  position: relative;
  z-index: 1;
}
#wm-map-panel > #wm-map-panel-header {
  z-index: 2;
}

#wm-map-panel-root[data-state=loading] #wm-map-panel,
#wm-map-panel-root[data-state=open] #wm-map-panel {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

#wm-map-panel[hidden] {
  display: none !important;
}

#wm-map-panel .wm-map-panel__header :is(.wm-popup__header, .wm-popup-header, .wm-popup-card__header) {
  cursor: grab;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

#wm-map-panel .wm-map-panel__header :is(.wm-popup__header, .wm-popup-header, .wm-popup-card__header) :is(a, button, input, select, textarea) {
  cursor: auto;
}

#wm-map-panel.is-dragging .wm-map-panel__header :is(.wm-popup__header, .wm-popup-header, .wm-popup-card__header) {
  cursor: grabbing;
}

.wm-map-panel__header {
  flex: 0 0 auto;
  min-height: 0;
}

.wm-map-panel__header:empty,
.wm-map-panel__tabs:empty,
.wm-map-panel__footer:empty {
  display: none;
}

.wm-map-panel__header > .wm-popup__header,
.wm-map-panel__header > .wm-popup-card__header {
  margin: 0;
}

.wm-map-panel__modebar {
  display: grid;
  gap: 0.45rem;
  padding: 0.75rem 1rem 0.85rem;
  border-top: 1px solid var(--wm-color-border-subtle);
  border-bottom: 1px solid var(--wm-color-border-subtle);
  background: transparent;
}

.wm-map-panel__modebar[hidden] {
  display: none !important;
}

.wm-map-panel__modebar-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.wm-map-panel__modebar-copy {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.wm-map-panel__modebar-label {
  font-size: 0.7rem;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wm-color-text-muted);
}

.wm-map-panel__modebar-title {
  font-weight: 700;
  color: var(--wm-color-text-primary);
}

.wm-map-panel__modebar-description {
  color: var(--wm-color-text-secondary);
  font-size: 0.875rem;
}

.wm-map-panel__modebar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.wm-map-panel__modebar-cancel {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--wm-color-border-subtle);
  border-radius: 999px;
  background: transparent;
  color: var(--wm-color-text-primary);
  padding: 0.35rem 0.75rem;
}

.wm-map-panel__modebar-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.wm-map-panel__mode-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: var(--wm-overlay-white-8, rgba(255, 255, 255, 0.08));
  color: var(--wm-color-text-secondary);
  font-size: 0.75rem;
}

.wm-map-panel__tabs {
  flex: 0 0 auto;
  min-height: 0;
}

.wm-map-panel__tabs > .wm-popup__tabs,
.wm-map-panel__tabs > nav,
.wm-map-panel__tabs > .nav {
  margin: 0;
}

.wm-map-panel__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  max-height: inherit;
  overflow: auto;
  overscroll-behavior: contain;
}

.wm-map-panel__body > .wm-popup,
.wm-map-panel__body > .entity-popup {
  width: 100%;
  min-width: 0;
  max-height: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.wm-map-panel__body > .wm-popup::before,
.wm-map-panel__body > .entity-popup::before {
  display: none;
}

.wm-map-panel__body > .wm-popup .wm-popup__body {
  min-height: 0;
}

.wm-map-panel__body > .wm-popup > :first-child,
.wm-map-panel__body > .entity-popup > :first-child {
  margin-top: 0;
}

.wm-map-panel__footer {
  flex: 0 0 auto;
  min-height: 0;
  border-top: 1px solid var(--wm-color-border-subtle);
  background: transparent;
}

.wm-map-panel__footer > .wm-popup__footer,
.wm-map-panel__footer > .resource-actions,
.wm-map-panel__footer > .wm-actions {
  margin: 0;
}

.wm-map-panel__footer > .resource-actions {
  padding: 0.75rem 1rem;
}

.wm-map-panel__loading,
.wm-map-panel__error {
  display: grid;
  place-items: center;
  gap: 0.75rem;
  min-height: 240px;
  padding: 1.25rem;
  text-align: center;
  color: var(--wm-color-text-primary);
  background: linear-gradient(180deg, var(--wm-color-surface-dark-600) 0%, var(--wm-color-popup-bg, var(--wm-color-surface-dark-900)) 100%);
  border: 1px solid var(--wm-color-popup-border, var(--wm-color-border-subtle));
  border-radius: var(--wm-radius-lg, 0.8rem);
  box-shadow: var(--wm-shadow-xl);
}

.wm-map-panel__loading-copy,
.wm-map-panel__error {
  display: grid;
  gap: 0.3rem;
}

.wm-popup-preview {
  min-width: 180px;
  min-height: 0;
  padding: 0.7rem 0.85rem;
}

@media (max-width: 991.98px) {
  #wm-map-panel {
    right: 0;
    left: 0;
    bottom: 0;
    max-height: min(82vh, 100vh - 64px);
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 1rem 1rem 0 0;
  }
  .wm-map-panel__modebar {
    padding: 0.7rem 0.9rem 0.8rem;
  }
  .wm-map-panel__modebar-main {
    align-items: stretch;
    flex-direction: column;
  }
  .wm-map-panel__modebar-actions {
    justify-content: flex-end;
  }
}
#game-map {
  background: linear-gradient(180deg, var(--wm-color-bg), var(--wm-color-surface-dark-900));
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  z-index: 200;
}
#game-map .leaflet-control-zoom {
  background-color: var(--wm-overlay-black-60);
  border: 1px solid var(--wm-color-border-dark-100);
  box-shadow: 0 0 6px var(--wm-overlay-accent-30);
  border-radius: 6px;
  transform: scale(0.9);
  left: -0.25rem;
  top: -0.5rem;
}
@media (max-width: 575.98px) {
  #game-map .leaflet-control-zoom {
    transform: scale(0.8);
  }
}
#game-map .leaflet-control-zoom a {
  color: var(--wm-color-success);
  font-weight: bold;
  background: transparent;
  text-shadow: 0 0 2px var(--wm-color-success);
}
#game-map .leaflet-control-zoom a:hover {
  background: var(--wm-color-success-bg);
}
#game-map .leaflet-control-attribution {
  background: var(--wm-overlay-black-60);
  border: 1px solid var(--wm-color-border-dark-100);
  box-shadow: 0 0 15px var(--wm-overlay-accent-30);
  border-radius: 6px;
  font-size: 0.75rem;
  right: 0.25rem;
  bottom: 0.25rem;
  padding: 0.1rem 0.3rem;
  color: var(--wm-color-success);
  text-shadow: 0 0 2px var(--wm-color-success);
}
#game-map .leaflet-control-attribution:hover {
  background: var(--wm-overlay-black-70);
  color: var(--wm-color-text-muted);
}
#game-map .leaflet-control-attribution span {
  display: none;
}
#game-map.loading {
  cursor: wait;
  pointer-events: none;
}
#game-map.loading + #game-map-loading {
  display: flex !important;
}
#game-map + #game-map-loading {
  z-index: 200;
}
#game-map .leaflet-control-container {
  z-index: 100;
}
#game-map .leaflet-bottom .leaflet-control a:first-child {
  display: none;
}
#game-map .leaflet-popup {
  z-index: 1000 !important;
}
#game-map.warmap .leaflet-tile-container img {
  filter: brightness(2) contrast(1.1) saturate(0.8);
  transition: filter 0.3s ease;
}

#game-map-boot-splash.wm-map-splash--boot {
  position: fixed !important;
  inset: 0;
  top: 0 !important;
  left: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100vw;
  height: 100vh;
  z-index: calc(var(--wm-z-notification, 7000) + 1) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background-color: #121820;
  background-image: url("/images/bg/splash.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  pointer-events: all;
}
#game-map-boot-splash.wm-map-splash--boot .spinner-border {
  width: 2rem;
  height: 2rem;
}
#game-map-boot-splash.wm-map-splash--boot .visually-hidden + .mt-1,
#game-map-boot-splash.wm-map-splash--boot .mt-1 {
  margin-top: 0 !important;
  margin-left: 0 !important;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.75);
}

@media (max-width: 768px) {
  #game-map-boot-splash.wm-map-splash--boot {
    background-image: url("/images/bg/splash-mobile.webp");
  }
}
#game-map-layers {
  box-shadow: 0 0 5px var(--wm-overlay-accent-40), 0 0 10px var(--wm-overlay-accent-20);
  right: 0.2rem;
  top: 0.2rem;
  min-width: 155px;
  z-index: 999;
}
@media (max-width: 575.98px) or (max-height: 400px) {
  #game-map-layers {
    font-size: 85%;
    min-width: 90px;
  }
}
@media screen and (max-width: 575.98px) {
  #game-map-layers label span {
    display: none !important;
  }
  #game-map-layers .card-body {
    max-width: 90px;
    max-height: 148px;
    overflow-y: auto;
  }
}

#game-map-galaxy-selector {
  box-shadow: 0 0 6px var(--wm-overlay-accent-50), 0 0 12px var(--wm-overlay-accent-30), 0 0 18px var(--wm-overlay-accent-20);
  left: 0.2rem;
  top: 0.2rem;
  min-width: 200px;
  z-index: 1000;
  transition: all 0.3s ease;
}
#game-map-galaxy-selector:hover {
  box-shadow: 0 0 8px var(--wm-overlay-accent-70), 0 0 16px var(--wm-overlay-accent-40), 0 0 24px var(--wm-overlay-accent-30);
}
#game-map-galaxy-selector .card-header {
  background: linear-gradient(135deg, var(--wm-color-info-bg), var(--wm-overlay-accent-10));
  border-bottom: 1px solid var(--wm-overlay-accent-30);
  text-shadow: 0 0 4px var(--wm-overlay-accent-60);
}
#game-map-galaxy-selector .card-header i {
  color: var(--wm-color-accent-primary);
  text-shadow: 0 0 6px var(--wm-overlay-accent-80), 0 0 10px var(--wm-overlay-accent-60);
  animation: galaxy-pulse 3s ease-in-out infinite;
}
#game-map-galaxy-selector #galaxy-selector {
  background: var(--wm-color-surface-dark-700);
  color: var(--wm-color-accent-primary);
  border: 1px solid var(--wm-overlay-accent-40);
  box-shadow: inset 0 0 8px var(--wm-overlay-accent-20);
  transition: all 0.2s ease;
  cursor: pointer;
}
#game-map-galaxy-selector #galaxy-selector:hover {
  border-color: var(--wm-overlay-accent-60);
  box-shadow: inset 0 0 10px var(--wm-overlay-accent-30), 0 0 6px var(--wm-overlay-accent-40);
}
#game-map-galaxy-selector #galaxy-selector:focus {
  border-color: var(--wm-color-accent-primary);
  box-shadow: 0 0 0 0.2rem var(--wm-overlay-accent-25), inset 0 0 10px var(--wm-overlay-accent-40);
  outline: none;
}
#game-map-galaxy-selector #galaxy-selector option {
  background: var(--wm-color-surface-dark-800);
  color: var(--wm-color-accent-primary);
  padding: 0.5rem;
}
#game-map-galaxy-selector #galaxy-selector option:hover {
  background: var(--wm-overlay-accent-30);
}
@media (max-width: 575.98px) or (max-height: 400px) {
  #game-map-galaxy-selector {
    font-size: 85%;
    min-width: 140px;
  }
}
@media screen and (max-width: 575.98px) {
  #game-map-galaxy-selector {
    min-width: 120px;
  }
  #game-map-galaxy-selector #galaxy-selector {
    font-size: 0.85rem;
  }
}

@keyframes galaxy-pulse {
  0%, 100% {
    text-shadow: 0 0 6px var(--wm-overlay-accent-80), 0 0 10px var(--wm-overlay-accent-60);
  }
  50% {
    text-shadow: 0 0 10px var(--wm-color-accent-primary), 0 0 16px var(--wm-overlay-accent-80), 0 0 20px var(--wm-overlay-accent-40);
  }
}
#move-preview {
  z-index: 201;
  opacity: 0.7;
  box-shadow: 0 0 10px var(--wm-overlay-white-30);
  border: 1px solid var(--wm-color-border-dark-300);
  background: var(--wm-overlay-accent-70);
}

.map-popup {
  background: var(--wm-color-map-modal-bg);
  border: 1.5px solid var(--wm-color-map-modal-border);
  border-radius: 18px;
  box-shadow: var(--wm-shadow-map-modal);
  color: var(--wm-color-map-modal-text);
  overflow-x: hidden;
  overflow-y: auto;
  min-width: 320px;
  max-width: 90vw;
  max-height: 70vh;
}

/**
 * @file
 * Styles for the unified game modal system.
 *
 * Supports multiple visual modes:
 * - .game-modal--modal        : Standard centered modal
 * - .game-modal--sheet-right  : Right-side sheet
 * - .game-modal--sheet-bottom : Bottom sheet
 * - .game-modal--drawer-left  : Left drawer
 * - .game-modal--drawer-right : Right drawer
 */
.game-modal {
  color: var(--wm-color-text-primary, var(--bs-body-color));
}
.game-modal .bg-dark-75 {
  background-color: var(--wm-color-surface-subtle) !important;
}
.game-modal .modal-content, .game-modal.offcanvas {
  background: var(--wm-color-modal-bg, var(--bs-body-bg));
  border: 1px solid var(--wm-color-border-subtle, var(--bs-border-color));
  color: var(--wm-color-text-primary, var(--bs-body-color));
}
.game-modal .modal-header,
.game-modal .offcanvas-header {
  background: var(--wm-color-modal-header-bg, var(--wm-color-surface-elevated));
  border-bottom: 1px solid var(--wm-color-border-subtle, var(--bs-border-color));
  padding: 0.75rem 1rem;
}
.game-modal .modal-header .modal-title,
.game-modal .modal-header .offcanvas-title,
.game-modal .offcanvas-header .modal-title,
.game-modal .offcanvas-header .offcanvas-title {
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.game-modal .modal-header .modal-title i,
.game-modal .modal-header .offcanvas-title i,
.game-modal .offcanvas-header .modal-title i,
.game-modal .offcanvas-header .offcanvas-title i {
  opacity: 0.8;
}
.game-modal .modal-body,
.game-modal .offcanvas-body {
  padding: 1rem;
}
.game-modal .btn-close-white {
  filter: invert(1) grayscale(100%) brightness(200%);
  opacity: 0.7;
}
.game-modal .btn-close-white:hover {
  opacity: 1;
}

.game-modal--modal .modal-dialog {
  max-width: 800px;
}
@media (max-width: 576px) {
  .game-modal--modal .modal-dialog {
    margin: 0.5rem;
    max-width: calc(100% - 1rem);
  }
}

.game-modal--sheet-right {
  width: 400px;
  max-width: 90vw;
}
@media (max-width: 576px) {
  .game-modal--sheet-right {
    width: 100%;
    max-width: 100%;
  }
}

.game-modal--sheet-bottom {
  height: 50vh;
  max-height: 80vh;
}
.game-modal--sheet-bottom .offcanvas-body {
  overflow-y: auto;
}
@media (max-width: 576px) {
  .game-modal--sheet-bottom {
    height: 70vh;
  }
}

.game-modal--drawer-left {
  width: 320px;
  max-width: 85vw;
}
@media (max-width: 576px) {
  .game-modal--drawer-left {
    width: 100%;
    max-width: 100%;
  }
}

.game-modal--drawer-right {
  width: 320px;
  max-width: 85vw;
}
@media (max-width: 576px) {
  .game-modal--drawer-right {
    width: 100%;
    max-width: 100%;
  }
}

.leaflet-popup {
  min-width: 25.1rem;
}

.leaflet-popup-content-wrapper {
  border-radius: 10px;
}

.game-map-buttons {
  pointer-events: auto;
}
.game-map-buttons button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
}

.war-badge {
  position: absolute;
  top: -0.5em;
  right: -0.7em;
  display: inline-block;
  min-width: 1.8em;
  height: 1.8em;
  padding: 0 0.5em;
  font-size: 1em;
  background: var(--wm-color-danger);
  color: var(--wm-color-text-primary);
  font-weight: bold;
  border-radius: 1em;
  text-align: center;
  border: 2px solid var(--wm-color-text-primary);
  box-shadow: 0 2px 8px var(--wm-overlay-black-25);
  transition: transform 0.2s;
  z-index: 2;
}

.custom-fa-icon {
  background: transparent;
  border: none;
  text-align: center;
  font-size: 22px;
  color: var(--wm-color-text-primary);
  text-shadow: 0 0 4px var(--wm-color-bg);
}

.wm-unit-divicon {
  background: transparent;
  border: 0;
}

.wm-unit-marker {
  position: relative;
  width: 32px;
  height: 32px;
  color: var(--wm-color-text-primary);
  filter: drop-shadow(0 0 4px var(--wm-color-bg));
}

.wm-unit-marker--busy {
  filter: drop-shadow(0 0 4px var(--wm-color-bg)) drop-shadow(0 0 8px rgba(255, 106, 61, 0.65));
}

.wm-unit-icons {
  position: absolute;
  left: 50%;
  bottom: 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transform: translateX(-50%);
  line-height: 1;
}
.wm-unit-icons i,
.wm-unit-icons img {
  display: block;
  color: var(--marker-icon-color, currentColor);
}
.wm-unit-icons i {
  font-size: 22px;
  text-shadow: 0 0 4px var(--wm-color-bg);
}

.wm-unit-primary-image {
  width: 22px;
  height: 22px;
  -o-object-fit: contain;
     object-fit: contain;
}

.wm-unit-vehicle {
  font-size: 12px !important;
  color: #c8d7ff !important;
  transform: translateY(1px);
}

.wm-unit-count {
  position: absolute;
  top: 1px;
  right: -8px;
  min-width: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--wm-color-danger);
  color: var(--wm-color-text-primary);
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 2px 6px var(--wm-overlay-black-35);
}

.wm-unit-pax-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  padding: 0 6px;
  border-radius: 8px;
  background: var(--wm-color-info);
  color: var(--wm-color-text-primary);
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 2px 6px var(--wm-overlay-black-35);
  z-index: 6;
}

.wm-unit-busy-badge {
  position: absolute;
  top: -3px;
  left: -6px;
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff7a18 0%, #ff3d3d 100%);
  color: #fff;
  font-size: 9px;
  box-shadow: 0 0 0 2px rgba(10, 14, 18, 0.8), 0 2px 6px rgba(0, 0, 0, 0.35);
  animation: wm-busy-pulse 1.6s ease-in-out infinite;
}

.wm-unit-label {
  position: absolute;
  top: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  pointer-events: none;
}

.wm-unit-cargo {
  position: absolute;
  right: -2px;
  bottom: 3px;
  font-size: 10px !important;
  color: #ffcc33 !important;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.75);
  animation: wm-cargo-pulse 1.8s ease-in-out infinite;
}

.wm-rarity-common,
.wm-rarity-uncommon {
  box-shadow: none;
}

.wm-rarity-rare {
  box-shadow: 0 0 8px #2fb5ff;
}

.wm-rarity-epic {
  box-shadow: 0 0 10px #b84cff;
}

.wm-rarity-legendary {
  box-shadow: 0 0 12px #ffb347;
}

@keyframes wm-cargo-pulse {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 0.7;
  }
}
@keyframes wm-busy-pulse {
  0% {
    transform: scale(0.96);
    box-shadow: 0 0 0 2px rgba(10, 14, 18, 0.8), 0 0 0 0 rgba(255, 106, 61, 0.45);
  }
  65% {
    transform: scale(1.08);
    box-shadow: 0 0 0 2px rgba(10, 14, 18, 0.8), 0 0 0 6px rgba(255, 106, 61, 0);
  }
  100% {
    transform: scale(0.96);
    box-shadow: 0 0 0 2px rgba(10, 14, 18, 0.8), 0 0 0 0 rgba(255, 106, 61, 0);
  }
}
.icon-marker {
  position: relative;
  width: 32px;
  height: 32px;
  font-size: 0.9rem;
  line-height: 22px;
  text-align: center;
}
.icon-marker i {
  font-size: 22px;
  color: var(--wm-color-text-primary);
  text-shadow: 0 0 4px var(--wm-color-bg);
}
.icon-marker .icon-badge {
  position: absolute;
  top: 0px;
  right: -16px;
  background: var(--wm-color-danger);
  color: var(--wm-color-text-primary);
  font-size: 12px;
  min-width: 18px;
  padding: 0 4px;
  border-radius: 10px;
  font-weight: bold;
}

.wm-marker-health {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 2px);
  transform: translateX(-50%);
  width: 28px;
  height: 4px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--wm-color-border-dark-100);
  background: var(--wm-overlay-black-55);
  pointer-events: none;
  z-index: 4;
  --wm-marker-health-color: var(--wm-color-success);
}
.wm-marker-health__fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--wm-marker-health-color);
  box-shadow: 0 0 4px var(--wm-marker-health-color);
}
.wm-marker-health--normal {
  --wm-marker-health-color: var(--wm-color-success);
}
.wm-marker-health--warning {
  --wm-marker-health-color: var(--wm-color-warning);
}
.wm-marker-health--danger {
  --wm-marker-health-color: var(--wm-color-danger);
}

.unit-ally i {
  color: var(--wm-color-text-primary);
  text-shadow: 0 0 4px var(--wm-color-success), 0 0 10px var(--wm-color-success), 0 0 15px var(--wm-color-success), 0 0 20px var(--wm-color-info), 0 0 25px var(--wm-color-info);
}
.unit-enemy i {
  color: var(--wm-color-danger);
  text-shadow: 0 0 4px var(--wm-color-danger), 0 0 10px var(--wm-color-danger), 0 0 15px var(--wm-color-danger), 0 0 20px var(--wm-color-accent-tertiary);
}
.unit-neutral i {
  color: var(--wm-color-text-muted);
  text-shadow: 0 0 4px var(--wm-color-text-muted), 0 0 10px var(--wm-color-text-muted), 0 0 15px var(--wm-color-text-muted), 0 0 20px var(--wm-color-success);
}
.unit-hidden {
  display: none !important;
}
.unit-own i {
  color: var(--wm-color-info);
  text-shadow: 0 0 4px var(--wm-color-text-primary);
}

.resource-chest > i {
  color: var(--wm-color-success);
  text-shadow: 0 0 4px var(--wm-color-success), 0 0 10px var(--wm-color-success), 0 0 15px var(--wm-color-accent-secondary);
}
.resource-gold > i {
  color: var(--wm-color-warning);
  text-shadow: 0 0 4px var(--wm-color-warning), 0 0 10px var(--wm-color-warning), 0 0 15px var(--wm-color-accent-tertiary);
}
.resource-loot > i {
  color: var(--wm-color-success);
  text-shadow: 0 0 4px var(--wm-color-success), 0 0 10px var(--wm-color-success), 0 0 15px var(--wm-color-accent-secondary);
}
.resource-water > i {
  color: var(--wm-color-info);
  text-shadow: 0 0 4px var(--wm-color-info), 0 0 10px var(--wm-color-accent-primary), 0 0 15px var(--wm-color-accent-primary);
}
.resource-mine > i {
  color: var(--wm-color-accent-tertiary);
  text-shadow: 0 1px 5px var(--wm-color-text-primary);
}

.wm-popup-card {
  color: var(--wm-color-text-primary);
  font-size: 0.86rem;
  line-height: 1.35;
  min-width: 250px;
  max-width: 340px;
}

/* Ensure hover direction indicators appear above HUD/offcanvas layers */
.wm-direction-indicator,
.wm-map-direction-indicator {
  z-index: 2500 !important;
  pointer-events: none;
}

/* Optional fixed bottom-center indicator for cramped HUD layouts */
.wm-direction-indicator--fixed {
  position: fixed !important;
  left: 50%;
  bottom: calc(3.25rem + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 1400 !important;
  pointer-events: none;
}

/* Make popup unit image / icon indicate fly-to with pointer cursor */
.wm-popup-card .unit-header .unit-image,
.wm-popup-card .unit-header img.unit-icon,
.wm-popup-card .unit-header .wm-unit-primary-image {
  cursor: pointer;
}
.wm-popup-card .unit-header .fly-to {
  cursor: pointer;
}
.wm-popup-card .unit-header .fly-to:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.wm-popup-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.wm-popup-card__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.wm-popup-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.wm-popup-card__badge {
  border: 1px solid var(--wm-overlay-white-25);
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  opacity: 0.9;
}

.wm-popup-card__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.wm-popup-action {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--wm-overlay-white-25);
  background: var(--wm-overlay-white-06);
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.12s ease, border-color 0.12s ease, opacity 0.12s ease;
}

.wm-popup-action:hover,
.wm-popup-action:focus-visible {
  background: var(--wm-overlay-white-15);
  border-color: var(--wm-overlay-white-40);
  opacity: 1;
}

.wm-popup-action:focus-visible {
  outline: 2px solid var(--wm-overlay-white-40);
  outline-offset: 1px;
}

.wm-popup-card__rows {
  margin: 0;
}

.wm-popup-card__row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 8px;
  padding: 4px 0;
  border-top: 1px solid var(--wm-overlay-white-12);
}

.wm-popup-card__row:first-child {
  border-top: 0;
  padding-top: 0;
}

.wm-popup-card__row dt {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  opacity: 0.72;
}

.wm-popup-card__row dd {
  margin: 0;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.wm-planet-layer-control {
  background: var(--wm-surface);
  border-color: var(--wm-border);
  border-radius: 6px;
  padding: 4px;
}

.wm-planet-layer-control__select {
  min-width: 112px;
  height: 30px;
  border: 1px solid var(--wm-border);
  border-radius: 4px;
  background: var(--wm-surface-elevated);
  color: var(--wm-text);
  font-size: 0.78rem;
}

.wm-planet-layer-warning {
  position: absolute;
  right: 12px;
  bottom: 28px;
  z-index: 560;
  max-width: min(340px, 100vw - 24px);
  padding: 8px 10px;
  border: 1px solid var(--wm-warning-border);
  border-radius: 6px;
  background: var(--wm-surface);
  color: var(--wm-text);
  font-size: 0.78rem;
  line-height: 1.35;
  display: none;
  pointer-events: none;
}

.wm-planet-layer-warning.is-visible {
  display: block;
}

/*# sourceMappingURL=game-map.css.map */