.territory-overlay__box-fill,
.territory-overlay__box-border {
  shape-rendering: geometricPrecision;
}

.territory-overlay__connection-halo,
.territory-overlay__connection-line {
  stroke-linecap: round;
  stroke-linejoin: round;
  shape-rendering: geometricPrecision;
}

.territory-overlay__connection-halo {
  stroke: rgba(0, 0, 0, 0.82);
  stroke-width: 6px;
}

.territory-overlay__connection-line {
  stroke: rgba(255, 255, 255, 0.72);
  stroke-width: 3px;
}

.territory-overlay__animated-border {
  stroke-linejoin: round;
  stroke-linecap: square;
  stroke-dasharray: 12 8;
  stroke-opacity: 0.95;
  shape-rendering: geometricPrecision;
  animation: territory-border-march
    var(--territory-recent-border-march-duration, 0.8s) linear infinite;
}

.territory-overlay__warning-border {
  stroke: var(--territory-warning-color);
  stroke-width: 4px;
  animation:
    territory-border-march var(--territory-warning-border-march-duration, 0.65s)
      linear infinite,
    territory-warning-flash 0.75s ease-in-out infinite alternate;
}

.territory-overlay__label {
  fill: #ffffff;
  stroke: rgba(0, 0, 0, 0.82);
  stroke-width: var(--territory-label-stroke-width, 6px);
  paint-order: stroke fill;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  text-anchor: middle;
  dominant-baseline: central;
  text-rendering: geometricPrecision;
}

.territory-overlay__label-tag {
  font-size: var(--territory-label-tag-size, 38px);
  font-weight: 700;
}

.territory-overlay__label-held {
  fill: rgba(255, 255, 255, 0.9);
  stroke-width: var(--territory-label-held-stroke-width, 4px);
  font-size: var(--territory-label-held-size, 22px);
  font-weight: 650;
}

.territory-overlay__label-icon {
  opacity: 0.96;
  image-rendering: pixelated;
}

@keyframes territory-border-march {
  to {
    stroke-dashoffset: -40;
  }
}

@keyframes territory-warning-flash {
  from {
    stroke: var(--territory-warning-color);
  }

  to {
    stroke: #ff2f2f;
  }
}
